Since not all applications behave the same, we decided to create some examples to help you get started adding games and applications to Sunshine.
| Field | Value |
|---|---|
| Application Name | Desktop
|
| Image | desktop.png
|
FreeBSD
| Field | Value | |---------------------------—|---------------------------------------------------—| | Application Name |
| | Command Preparations -> Undo |
| | Detached Commands |
| | Image |
|
Linux
| Field | Value | |---------------------------—|---------------------------------------------------—| | Application Name |
| | Command Preparations -> Undo |
| | Detached Commands |
| | Image |
|
macOS
| Field | Value | |---------------------------—|---------------------------------------------—| | Application Name |
| | Command Preparations -> Undo |
| | Detached Commands |
| | Image |
|
Windows
| Field | Value | |---------------------------—|----------------------------------------—| | Application Name |
| | Command Preparations -> Undo |
| | Detached Commands |
| | Image |
|
Windows
| Field | Value | |---------------—|----------------------------------------------------------------------------------------------------------------------------------------------------—| | Application Name |
| | Commands |
|
Windows
| Field | Value | |----------------—|---------------------------------------------------------—| | Application Name |
| | Command |
| | Working Directory |
|
Windows
| Field | Value | |----------------—|----------------------------------------------------------------------—| | Application Name |
| | Command |
|
FreeBSD
| Field | Value | |----------------—|---------------------------------------------------—| | Application Name |
| | Detached Commands |
|
Linux
| Field | Value | |----------------—|---------------------------------------------------—| | Application Name |
| | Detached Commands |
|
macOS
| Field | Value | |----------------—|-------------------------------------------—| | Application Name |
| | Detached Commands |
|
Windows
| Field | Value | |----------------—|--------------------------------------—| | Application Name |
| | Detached Commands |
|
FreeBSD
| Field | Value | |----------------—|-----------------------------------------------------------—| | Application Name |
| | Command |
| | Working Directory |
|
Linux
| Field | Value | |----------------—|-----------------------------------------------------------—| | Application Name |
| | Command |
| | Working Directory |
|
macOS
| Field | Value | |----------------—|-----------------------------------------------------------—| | Application Name |
| | Command |
| | Working Directory |
|
Windows
| Field | Value | |----------------—|----------------------------------------------------------------------------—| | Application Name |
| | Command |
| | Working Directory |
|
FreeBSD
| Field | Value | |----------------—|---------------------------------------------------------------------—| | Application Name |
| | Command |
|
Linux
| Field | Value | |----------------—|---------------------------------------------------------------------—| | Application Name |
| | Command |
|
macOS
| Field | Value | |----------------—|---------------------------------------------------------------------—| | Application Name |
| | Command |
|
Windows
| Field | Value | |----------------—|------------------------------------------------------------------------------------------—| | Application Name |
| | Command |
|
| Prep Step | Command |
|---|---|
| Do | sh -c "xrandr --output HDMI-1 --mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --rate ${SUNSHINE_CLIENT_FPS}"
|
| Undo | xrandr --output HDMI-1 --mode 3840x2160 --rate 120
|
| Prep Step | Command |
|---|---|
| Do | sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""
|
| Undo | wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz
|
| Prep Step | Command |
|---|---|
| Do | sh -c "xrandr --output HDMI-1 --mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --rate ${SUNSHINE_CLIENT_FPS}"
|
| Undo | xrandr --output HDMI-1 --mode 3840x2160 --rate 120
|
| Prep Step | Command |
|---|---|
| Do | sh -c "displayconfig-mutter set --connector HDMI-1 --resolution ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --refresh-rate ${SUNSHINE_CLIENT_FPS} --hdr ${SUNSHINE_CLIENT_HDR}"
|
| Undo | displayconfig-mutter set --connector HDMI-1 --resolution 3840x2160 --refresh-rate 120 --hdr false
|
Installation instructions for displayconfig-mutter can be found here. Alternatives include gnome-randr-rust and gnome-randr.py, but both of those are unmaintained and do not support newer Mutter features such as HDR and VRR.
| Prep Step | Command |
|---|---|
| Do | sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"
|
| Undo | kscreen-doctor output.HDMI-A-1.mode.3840x2160@120
|
| Prep Step | Command |
|---|---|
| Do | sh -c "nvidia-settings -a CurrentMetaMode=\"HDMI-1: nvidia-auto-select { ViewPortIn=${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}, ViewPortOut=${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}+0+0 }\""
|
| Undo | nvidia-settings -a CurrentMetaMode=\"HDMI-1: nvidia-auto-select { ViewPortIn=3840x2160, ViewPortOut=3840x2160+0+0 }"
|
| Prep Step | Command |
|---|---|
| Do | sh -c "displayplacer \"id:<screenId> res:${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} hz:${SUNSHINE_CLIENT_FPS} scaling:on origin:(0,0) degree:0\""
|
| Undo | displayplacer "id:<screenId> res:3840x2160 hz:120 scaling:on origin:(0,0) degree:0"
|
Sunshine has built-in support for changing the resolution and refresh rate on Windows. If you prefer to use a third-party tool, you can use QRes as an example.
| Prep Step | Command |
|---|---|
| Do | cmd /C "FullPath\qres.exe /x:%SUNSHINE_CLIENT_WIDTH% /y:%SUNSHINE_CLIENT_HEIGHT% /r:%SUNSHINE_CLIENT_FPS%"
|
| Undo | FullPath\qres.exe /x:3840 /y:2160 /r:120
|
Elevating Commands (Windows)
If you've installed Sunshine as a service (default), you can specify if a command should be elevated with administrative privileges. Simply enable the elevated option in the WEB UI, or add it to the JSON configuration. This is an option for both prep-cmd and regular commands and will launch the process with the current user without a UAC prompt.
Example