

STEP BY STEP SOLUTION
Using my ArchLinux as a Sunshine server, and Ubuntu as a Moonlight client:
-
Sunshine devs advise using your Distros package manager (“apt” if on Ubuntu/Debian. AURs “yay” or “paru” if on ArchLinux, or “dns” if on Fedora/CentOS/RHEL), instead of using your Distros AppStore, or either AppImage or Flatpak – although they may still work.
-
Run the following on the terminal command line of your Sunshine server:
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
- Restart Sunshine server.
Then either restart Sunshine by opening on your browser https://localhost:47990/troubleshooting or reboot the whole machine if that doesn’t work.
- Set username and password for Sunshine here if prompted:
https://localhost:47990/ - In Moonlight client, click the gear on the top right (settings), then Enable
Capture system keyboard shortcuts - Connect to Sunshine using Moonlight client using the 192.168.xxx.xxx IP of your Sunshine server. Running the following on the terminal of your Sunshine server should show your IP:
ip addr - Input pin shown from Moonlight into
https://localhost:47990/pinwebpage of the Sunshine server. - Use
CTL + Shift + Alt + Qto escape.
Extra info / rant, may not be useful
Again, step 5 is what allows special keys to be ran on the remote host and not the local.
I just tried Sunshine (remote host) and Moonlight (client). There was a bit more setting up. They mention on their docs somewhere to use your distro’s package manager instead of app stores if you can.
On ArchLinux, I needed to run this in the command line first, and then restart.
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
And then after running Sunshine, and accessing its web console https://localhost:47990/, setting a username and password, to access it via Moonshine on my client by putting my 192.168.xxx.xxx IP, then placing the pin on the Sunshine remote host at https://localhost:47990/pin. And then had 2 “Desktop” icons, 1 to connect with high res and another low res; and then a third icon to connect to “Steam” for Steam Big Picture mode connection.
Also Moonlight and Sunshine starts with very low brightness. I’ve fixed this before, by going into the Moonlight or Sunshine settings – I don’t remember which one.
Although Moonlight and Sunshine does not ask for connection verification after I’ve connected once. Rustdesk would ask me everytime, and I did not figure out how to remove Rustdesk prompting the remote host to ask the connection.
And both Moonlight and Rustdesk run the super key on the client host.###


The keys aren’t transferring with RustDesk or Moonlight? Moonlight worked for me with the above.