Sunshine is a Gamestream host for Moonlight
If you do not wish to clutter your PC with development files, yet you want the very latest version... You can use these build scripts They make use of docker to handle building Sunshine automatically
Ubuntu 20.04: Install the following:
sudo apt install cmake gcc-10 g++-10 libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libevdev-dev
sudo apt install libxtst-dev libx11-dev libxrandr-dev libxfixes-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev
This requires additional setup.
sudo apt install libdrm-dev libcap-dev
This is for wlroots based compositores, such as Sway
sudo apt install libwayland-dev
This requires proprietary software On Ubuntu 20.04, the cuda compiler will fail since it's version is too old, it's recommended you compile the sources with the build scripts
sudo apt install nvidia-cuda-dev nvidia-cuda-toolkit
You might require ffmpeg version >= 4.3. Check the troubleshooting section for more information.
git clone https://github.com/loki-47-6F-64/sunshine.git --recurse-submodules
cd sunshine && mkdir build && cd build
cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 ..
make -j ${nproc}
sunshine needs access to uinput to create mouse and gamepad events:
Add user to group 'input':
usermod -a -G input $USER
Create udev rules:
nano /etc/udev/rules.d/85-sunshine-input.rules
KERNEL=="uinput", GROUP="input", MODE="0660"
CTRL+X
to start exitY
to save modificationsassets/sunshine.conf
is an example configuration file. Modify it as you see fit, then use it by running:
sunshine path/to/sunshine.conf
Configure autostart service
path/to/build/dir/sunshine.service
is used to start sunshine in the background. To use it, do the following:
cp sunshine.service ~/.config/systemd/user/
systemctl --user start sunshine
systemctl --user enable sunshine
assets/apps.json
is an example of a list of applications that are started just before running a stream
Please note that cap_sys_admin
may as well be root, except you don't need to be root to run it.
It's necessary to allow Sunshine to use KMS
sudo setcap cap_sys_admin+p sunshine
If you get "Could not create Sunshine Gamepad: Permission Denied", ensure you are part of the group "input":
groups $USER
If Sunshine sends audio from the microphone instead of the speaker, try the following steps:
pacmd list-sources | grep "name:"
pactl info | grep Source
. In some causes you'd need to use the sink
device. Try pactl info | grep Sink
, if Source doesn't work.If you get "Error: Failed to create client: Daemon not running", ensure that your avahi-daemon is running:
systemctl status avahi-daemon
If you use hardware acceleration on Linux using an Intel or an AMD GPU (with VAAPI), you will get tons of graphical issues if your ffmpeg version is < 4.3. If it is not available in your distribution's repositories, consider using a newer version of your distribution.
First you need to install MSYS2, then startup "MSYS2 MinGW 64-bit" and install the following packages using pacman -S
:
mingw-w64-x86_64-binutils mingw-w64-x86_64-openssl mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-opus mingw-w64-x86_64-x265 mingw-w64-x86_64-boost git mingw-w64-x86_64-make cmake make gcc
git clone https://github.com/loki-47-6F-64/sunshine.git --recursive
cd sunshine && mkdir build && cd build
cmake -G"Unix Makefiles" ..
mingw32-make
https://xxx.xxx.xxx.xxx:47990
where xxx.xxx.xxx.xxx
is the IP address of your computerAll shortcuts start with CTRL + ALT + SHIFT, just like Moonlight
Note: You can change the Application List in the "Apps" section of the User Interface https://xxx.xxx.xxx.xxx:47990/
{
"name":"An App",
"cmd":"command to open app",
"prep-cmd":[
{
"do":"some-command",
"undo":"undo-that-command"
}
],
"detached":[
"some-command",
"another-command"
]
}
Linux
{
"env":{
"DISPLAY":":0",
"DRI_PRIME":"1",
"XAUTHORITY":"$(HOME)/.Xauthority",
"PATH":"$(PATH):$(HOME)/.local/bin"
},
"apps":[
{
"name":"Low Res Desktop",
"prep-cmd":[
{ "do":"xrandr --output HDMI-1 --mode 1920x1080", "undo":"xrandr --output HDMI-1 --mode 1920x1200" }
]
},
{
"name":"Steam BigPicture",
"output":"steam.txt",
"cmd":"steam -bigpicture",
"prep-cmd":[]
}
]
}
Windows
{
"env":{
"PATH":"$(PATH);C:\\Program Files (x86)\\Steam"
},
"apps":[
{
"name":"Steam BigPicture",
"output":"steam.txt",
"prep-cmd":[
{"do":"steam \"steam://open/bigpicture\""}
]
}
]
}