22Since not all applications behave the same, we decided to create some examples to help you get started adding games
33and applications to Sunshine.
44
5- @attention {Throughout these examples, any fields not shown are left blank. You can enhance your experience by
6- adding an image or a log file (via the ` Output ` field).}
5+ > [ !TIP]
6+ > Throughout these examples, any fields not shown are left blank. You can enhance your experience by
7+ > adding an image or a log file (via the ` Output ` field).
78
8- @note {When a working directory is not specified, it defaults to the folder where the target application resides.}
9+ > [ !WARNING]
10+ > When a working directory is not specified, it defaults to the folder where the target application resides.
911
1012
1113## Common Examples
@@ -18,8 +20,10 @@ adding an image or a log file (via the `Output` field).}
1820| Image | @code {}desktop.png@endcode |
1921
2022### Steam Big Picture
21- @note {Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
22- process is killed.}
23+
24+ > [ !NOTE]
25+ > Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
26+ > process is killed.
2327
2428@tabs {
2529 @tab {Linux | <!-- -->
@@ -49,7 +53,9 @@ process is killed.}
4953}
5054
5155### Epic Game Store game
52- @note {Using URI method will be the most consistent between various games.}
56+
57+ > [ !NOTE]
58+ > Using the URI method will be the most consistent between various games.
5359
5460#### URI
5561
@@ -84,7 +90,9 @@ process is killed.}
8490}
8591
8692### Steam game
87- @note {Using URI method will be the most consistent between various games.}
93+
94+ > [ !NOTE]
95+ > Using the URI method will be the most consistent between various games.
8896
8997#### URI
9098
@@ -169,49 +177,49 @@ process is killed.}
169177| Do | @code {}sh -c "xrandr --output HDMI-1 --mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --rate ${SUNSHINE_CLIENT_FPS}"@endcode |
170178| Undo | @code {}xrandr --output HDMI-1 --mode 3840x2160 --rate 120@endcode |
171179
172- @ hint {The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS
173- and iOS devices, since they use non-standard resolutions.
174-
175- You can update the `` Do `` command to this:
176- ``` bash
177- bash -c " ${HOME} /scripts/set-custom-res.sh \" ${SUNSHINE_CLIENT_WIDTH} \" \" ${SUNSHINE_CLIENT_HEIGHT} \" \" ${SUNSHINE_CLIENT_FPS} \" "
178- ```
179-
180- The ` set-custom-res.sh ` will have this content:
181- ``` bash
182- #! /bin/ bash
183- set -e
184-
185- # Get params and set any defaults
186- width= ${1 :- 1920}
187- height =${2 :- 1080 }
188- refresh_rate =${3 :- 60 }
189-
190- # You may need to adjust the scaling differently so the UI/text isn't too small / big
191- scale= ${4 :- 0.55}
192-
193- # Get the name of the active display
194- display_output= $( xrandr | grep " connected " | awk ' { print $1 } ' )
195-
196- # Get the modeline info from the 2nd row in the cvt output
197- modeline= $( cvt ${width} ${height} ${refresh_rate} | awk ' FNR == 2 ' )
198- xrandr_mode_str= ${modeline // Modeline \" * \" / }
199- mode_alias= " ${width} x ${height} "
200-
201- echo " xrandr setting new mode ${mode_alias} ${xrandr_mode_str} "
202- xrandr --newmode ${mode_alias} ${xrandr_mode_str}
203- xrandr --addmode ${display_output } ${mode_alias }
204-
205- # Reset scaling
206- xrandr --output ${display_output} --scale 1
207-
208- # Apply new xrandr mode
209- xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
210-
211- # Optional reset your wallpaper to fit to new resolution
212- # xwallpaper --zoom /path/to/ wallpaper.png
213- ```
214- }
180+ > [ !TIP ]
181+ > The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS
182+ > and iOS devices, since they use non-standard resolutions.
183+ >
184+ > You can update the `` Do `` command to this:
185+ > ``` bash
186+ > bash -c " ${HOME} /scripts/set-custom-res.sh \" ${SUNSHINE_CLIENT_WIDTH} \" \" ${SUNSHINE_CLIENT_HEIGHT} \" \" ${SUNSHINE_CLIENT_FPS} \" "
187+ > ` ` `
188+ >
189+ > The ` set-custom-res.sh ` will have this content:
190+ > ` ` ` bash
191+ > #! /bin/bash
192+ > set -e
193+ >
194+ > # Get params and set any defaults
195+ > width =${1 :- 1920 }
196+ > height =${2 :- 1080 }
197+ > refresh_rate= ${3 :- 60}
198+ >
199+ > # You may need to adjust the scaling differently so the UI/text isn't too small / big
200+ > scale= ${4 :- 0.55}
201+ >
202+ > # Get the name of the active display
203+ > display_output= $( xrandr | grep " connected " | awk ' { print $1 } ' )
204+ >
205+ > # Get the modeline info from the 2nd row in the cvt output
206+ > modeline= $( cvt ${width} ${height} ${refresh_rate} | awk ' FNR == 2 ' )
207+ > xrandr_mode_str= ${modeline // Modeline \" * \" / }
208+ > mode_alias= " ${width} x ${height} "
209+ >
210+ > echo " xrandr setting new mode ${mode_alias} ${xrandr_mode_str} "
211+ > xrandr --newmode ${mode_alias } ${xrandr_mode_str }
212+ > xrandr --addmode ${display_output} ${mode_alias}
213+ >
214+ > # Reset scaling
215+ > xrandr --output ${display_output} --scale 1
216+ >
217+ > # Apply new xrandr mode
218+ > xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
219+ >
220+ > # Optional reset your wallpaper to fit to new resolution
221+ > # xwallpaper --zoom /path/to/wallpaper.png
222+ > ` ` `
215223
216224# ##### Wayland (wlroots, e.g. hyprland)
217225
@@ -220,7 +228,8 @@ xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rot
220228| Do | @code{}sh -c " wlr-xrandr --output HDMI-1 --mode \" ${SUNSHINE_CLIENT_WIDTH} x${SUNSHINE_CLIENT_HEIGHT} @${SUNSHINE_CLIENT_FPS} Hz\" " @endcode |
221229| Undo | @code{}wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz@endcode |
222230
223- @hint {` wlr-xrandr ` only works with wlroots-based compositors.}
231+ > [! TIP]
232+ > ` wlr-xrandr` only works with wlroots-based compositors.
224233
225234# ##### Gnome (X11)
226235
@@ -240,12 +249,12 @@ Installation instructions for displayconfig-mutter can be [found here](https://g
240249[gnome-randr-rust](https://github.com/maxwellainatchi/gnome-randr-rust) and [gnome-randr.py](https://gitlab.com/Oschowa/gnome-randr), but both of those are
241250unmaintained and do not support newer Mutter features such as HDR and VRR.
242251
243- @ hint {HDR support has been added to Gnome 48, to check if your display supports it you can run this:
244- ```
245- displayconfig-mutter list
246- ```
247- If it doesn't, then remove `` --hdr `` flag from both `` Do `` and `` Undo `` steps.
248- }
252+ > [ ! TIP]
253+ > HDR support has been added to Gnome 48, to check if your display supports it, you can run this:
254+ > ` ` `
255+ > displayconfig-mutter list
256+ > ` ` `
257+ > If it doesn ' t, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
249258
250259###### KDE Plasma (Wayland, X11)
251260
@@ -254,22 +263,22 @@ If it doesn't, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
254263| Do | @code{}sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"@endcode |
255264| Undo | @code{}kscreen-doctor output.HDMI-A-1.mode.3840x2160@120@endcode |
256265
257- @ attention {The names of your displays will differ between X11 and Wayland.
258- Be sure to use the correct name, depending on your session manager .
259- e.g. On X11, the monitor may be called `` HDMI-A-0 `` , but on Wayland, it may be called `` HDMI-A-1 `` .
260- }
261-
262- @ hint {Replace `` HDMI-A-1 `` with the display name of the monitor you would like to use for Moonlight.
263- You can list the monitors available to you with:
264- ```
265- kscreen-doctor -o
266- ```
267-
268- These will also give you the supported display properties for each monitor. You can select them either by
269- hard-coding their corresponding number (e.g. `` kscreen-doctor output.HDMI-A1.mode.0 `` ) or using the above
270- `` do `` command to fetch the resolution requested by your Moonlight client
271- (which has a chance of not being supported by your monitor).
272- }
266+ > [!CAUTION]
267+ > The names of your displays will differ between X11 and Wayland .
268+ > Be sure to use the correct name, depending on your session manager .
269+ > e.g., On X11, the monitor may be called ``HDMI-A-0``, but on Wayland, it may be called ``HDMI-A-1``.
270+
271+ > [!TIP]
272+ > Replace ``HDMI-A-1`` with the display name of the monitor you would like to use for Moonlight.
273+ > You can list the monitors available to you with:
274+ > ```
275+ > kscreen-doctor -o
276+ > ```
277+ >
278+ > These will also give you the supported display properties for each monitor. You can select them either by
279+ > hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mode.0``) or using the above
280+ > ``do`` command to fetch the resolution requested by your Moonlight client
281+ > (which has a chance of not being supported by your monitor).
273282
274283###### NVIDIA
275284
@@ -281,9 +290,11 @@ hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mod
281290##### macOS
282291
283292###### displayplacer
284- @note {This example uses the ` displayplacer ` tool to change the resolution.
285- This tool can be installed following instructions in their
286- [ GitHub repository] ( https://github.com/jakehilborn/displayplacer ) }.
293+
294+ > [!NOTE]
295+ > This example uses the `displayplacer` tool to change the resolution.
296+ > This tool can be installed following instructions in their
297+ > [GitHub repository](https://github.com/jakehilborn/displayplacer).
287298
288299| Prep Step | Command |
289300|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -295,8 +306,10 @@ Sunshine has built-in support for changing the resolution and refresh rate on Wi
295306third-party tool, you can use *QRes* as an example.
296307
297308###### QRes
298- @note {This example uses the * QRes* tool to change the resolution and refresh rate.
299- This tool can be downloaded from their [ SourceForge repository] ( https://sourceforge.net/projects/qres ) .}
309+
310+ > [!NOTE]
311+ > This example uses the *QRes* tool to change the resolution and refresh rate.
312+ > This tool can be downloaded from their [SourceForge repository](https://sourceforge.net/projects/qres).
300313
301314| Prep Step | Command |
302315|-----------|---------------------------------------------------------------------------------------------------------------------------|
@@ -306,8 +319,10 @@ This tool can be downloaded from their [SourceForge repository](https://sourcefo
306319### Additional Considerations
307320
308321#### Linux (Flatpak)
309- @attention {Because Flatpak packages run in a sandboxed environment and do not normally have access to the
310- host, the Flatpak of Sunshine requires commands to be prefixed with ` flatpak-spawn --host ` .}
322+
323+ > [!CAUTION]
324+ > Because Flatpak packages run in a sandboxed environment and do not normally have access to the
325+ > host, the Flatpak of Sunshine requires commands to be prefixed with `flatpak-spawn --host`.
311326
312327#### Windows
313328**Elevating Commands (Windows)**
0 commit comments