fix(linux): use FQDN naming for all Linux packaging types (#4779)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
@@ -217,12 +217,7 @@ if(${SUNSHINE_ENABLE_TRAY})
|
|||||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
|
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# flatpak icons must be prefixed with the app id or they will not be included in the flatpak
|
set(SUNSHINE_TRAY_PREFIX "${PROJECT_FQDN}")
|
||||||
if(${SUNSHINE_BUILD_FLATPAK})
|
|
||||||
set(SUNSHINE_TRAY_PREFIX "${PROJECT_FQDN}")
|
|
||||||
else()
|
|
||||||
set(SUNSHINE_TRAY_PREFIX "sunshine")
|
|
||||||
endif()
|
|
||||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY_PREFIX="${SUNSHINE_TRAY_PREFIX}")
|
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY_PREFIX="${SUNSHINE_TRAY_PREFIX}")
|
||||||
else()
|
else()
|
||||||
set(SUNSHINE_TRAY 0)
|
set(SUNSHINE_TRAY 0)
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK})
|
|||||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/udev/rules.d")
|
DESTINATION "${SUNSHINE_ASSETS_DIR}/udev/rules.d")
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.conf"
|
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.conf"
|
||||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/modules-load.d")
|
DESTINATION "${SUNSHINE_ASSETS_DIR}/modules-load.d")
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/app-${PROJECT_FQDN}.service"
|
||||||
|
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
|
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine-kms.service"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/00-app-${PROJECT_FQDN}.preset"
|
||||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/00-sunshine-kms.preset"
|
|
||||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user-preset")
|
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user-preset")
|
||||||
else()
|
else()
|
||||||
find_package(Systemd)
|
find_package(Systemd)
|
||||||
@@ -31,11 +31,11 @@ else()
|
|||||||
DESTINATION "${UDEV_RULES_INSTALL_DIR}")
|
DESTINATION "${UDEV_RULES_INSTALL_DIR}")
|
||||||
endif()
|
endif()
|
||||||
if(SYSTEMD_FOUND)
|
if(SYSTEMD_FOUND)
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/app-${PROJECT_FQDN}.service"
|
||||||
|
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||||
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
|
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine-kms.service"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/00-app-${PROJECT_FQDN}.preset"
|
||||||
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/00-sunshine-kms.preset"
|
|
||||||
DESTINATION "${SYSTEMD_USER_PRESET_INSTALL_DIR}")
|
DESTINATION "${SYSTEMD_USER_PRESET_INSTALL_DIR}")
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.conf"
|
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.conf"
|
||||||
DESTINATION "${SYSTEMD_MODULES_LOAD_DIR}")
|
DESTINATION "${SYSTEMD_MODULES_LOAD_DIR}")
|
||||||
@@ -143,42 +143,24 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
|||||||
set(CPACK_RPM_PACKAGE_AUTOREQ ON)
|
set(CPACK_RPM_PACKAGE_AUTOREQ ON)
|
||||||
|
|
||||||
# application icon
|
# application icon
|
||||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps")
|
RENAME "${PROJECT_FQDN}.svg")
|
||||||
else()
|
|
||||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
|
||||||
RENAME "${PROJECT_FQDN}.svg")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# tray icon
|
# tray icon
|
||||||
if(${SUNSHINE_TRAY} STREQUAL 1)
|
if(${SUNSHINE_TRAY} STREQUAL 1)
|
||||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
RENAME "${PROJECT_FQDN}-tray.svg")
|
||||||
RENAME "sunshine-tray.svg")
|
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg"
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg"
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
RENAME "${PROJECT_FQDN}-playing.svg")
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg"
|
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg"
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg"
|
RENAME "${PROJECT_FQDN}-pausing.svg")
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg"
|
||||||
else()
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||||
# flatpak icons must be prefixed with the app id or they will not be included in the flatpak
|
RENAME "${PROJECT_FQDN}-locked.svg")
|
||||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
|
||||||
RENAME "${PROJECT_FQDN}-tray.svg")
|
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
|
||||||
RENAME "${PROJECT_FQDN}-playing.svg")
|
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
|
||||||
RENAME "${PROJECT_FQDN}-pausing.svg")
|
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
|
||||||
RENAME "${PROJECT_FQDN}-locked.svg")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||||
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ endif()
|
|||||||
math(EXPR RC_VERSION_BUILD "${PROJECT_VERSION_PATCH} / 100")
|
math(EXPR RC_VERSION_BUILD "${PROJECT_VERSION_PATCH} / 100")
|
||||||
math(EXPR RC_VERSION_REVISION "${PROJECT_VERSION_PATCH} % 100")
|
math(EXPR RC_VERSION_REVISION "${PROJECT_VERSION_PATCH} % 100")
|
||||||
|
|
||||||
|
message("PROJECT_FQDN: ${PROJECT_FQDN}")
|
||||||
message("PROJECT_NAME: ${PROJECT_NAME}")
|
message("PROJECT_NAME: ${PROJECT_NAME}")
|
||||||
message("PROJECT_VERSION: ${PROJECT_VERSION}")
|
message("PROJECT_VERSION: ${PROJECT_VERSION}")
|
||||||
message("PROJECT_VERSION_MAJOR: ${PROJECT_VERSION_MAJOR}")
|
message("PROJECT_VERSION_MAJOR: ${PROJECT_VERSION_MAJOR}")
|
||||||
@@ -142,6 +143,7 @@ message("PROJECT_YEAR: ${PROJECT_YEAR}")
|
|||||||
message("PROJECT_MONTH: ${PROJECT_MONTH}")
|
message("PROJECT_MONTH: ${PROJECT_MONTH}")
|
||||||
message("PROJECT_DAY: ${PROJECT_DAY}")
|
message("PROJECT_DAY: ${PROJECT_DAY}")
|
||||||
|
|
||||||
|
list(APPEND SUNSHINE_DEFINITIONS PROJECT_FQDN="${PROJECT_FQDN}")
|
||||||
list(APPEND SUNSHINE_DEFINITIONS PROJECT_NAME="${PROJECT_NAME}")
|
list(APPEND SUNSHINE_DEFINITIONS PROJECT_NAME="${PROJECT_NAME}")
|
||||||
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION="${PROJECT_VERSION}")
|
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION="${PROJECT_VERSION}")
|
||||||
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION_MAJOR="${PROJECT_VERSION_MAJOR}")
|
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION_MAJOR="${PROJECT_VERSION_MAJOR}")
|
||||||
|
|||||||
@@ -10,11 +10,10 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
# configure the .desktop file
|
# configure the .desktop file
|
||||||
set(SUNSHINE_DESKTOP_ICON "sunshine")
|
set(SUNSHINE_DESKTOP_ICON "${PROJECT_FQDN}")
|
||||||
if(${SUNSHINE_BUILD_APPIMAGE})
|
if(${SUNSHINE_BUILD_APPIMAGE})
|
||||||
configure_file(packaging/linux/AppImage/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
|
configure_file(packaging/linux/AppImage/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
|
||||||
elseif(${SUNSHINE_BUILD_FLATPAK})
|
elseif(${SUNSHINE_BUILD_FLATPAK})
|
||||||
set(SUNSHINE_DESKTOP_ICON "${PROJECT_FQDN}")
|
|
||||||
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
|
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
|
||||||
else()
|
else()
|
||||||
configure_file(packaging/linux/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
|
configure_file(packaging/linux/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
|
||||||
@@ -25,9 +24,9 @@ elseif(UNIX)
|
|||||||
configure_file(packaging/linux/${PROJECT_FQDN}.metainfo.xml ${PROJECT_FQDN}.metainfo.xml @ONLY)
|
configure_file(packaging/linux/${PROJECT_FQDN}.metainfo.xml ${PROJECT_FQDN}.metainfo.xml @ONLY)
|
||||||
|
|
||||||
# configure service
|
# configure service
|
||||||
|
configure_file(packaging/linux/app-${PROJECT_FQDN}.service.in app-${PROJECT_FQDN}.service @ONLY)
|
||||||
configure_file(packaging/linux/sunshine.service.in sunshine.service @ONLY)
|
configure_file(packaging/linux/sunshine.service.in sunshine.service @ONLY)
|
||||||
configure_file(packaging/linux/sunshine-kms.service.in sunshine-kms.service @ONLY)
|
configure_file(packaging/linux/00-app-${PROJECT_FQDN}.preset.in 00-app-${PROJECT_FQDN}.preset @ONLY)
|
||||||
configure_file(packaging/linux/00-sunshine-kms.preset.in 00-sunshine-kms.preset @ONLY)
|
|
||||||
|
|
||||||
# configure the arch linux pkgbuild
|
# configure the arch linux pkgbuild
|
||||||
if(${SUNSHINE_CONFIGURE_PKGBUILD})
|
if(${SUNSHINE_CONFIGURE_PKGBUILD})
|
||||||
|
|||||||
@@ -448,17 +448,17 @@ After adding yourself to the group, log out and log back in for the changes to t
|
|||||||
#### Services
|
#### Services
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Two service unit files are available. Pick "sunshine" for unprivileged XDG Portal or X11 capture, otherwise
|
> Two service unit files are available. Pick "app-dev.lizardbyte.app.Sunshine" for unprivileged XDG Portal
|
||||||
> pick "sunshine-kms" for privileged KMS capture.
|
> or X11 capture, otherwise pick "sunshine" for privileged KMS capture.
|
||||||
|
|
||||||
**Start once**
|
**Start once**
|
||||||
```bash
|
```bash
|
||||||
systemctl --user start sunshine
|
systemctl --user start sunshine
|
||||||
```
|
```
|
||||||
|
|
||||||
**Start on boot (unprivileged; swap logic for KMS)**
|
**Start on boot (privileged; swap names for unprivileged XDG capture)**
|
||||||
```bash
|
```bash
|
||||||
systemctl --user --now disable sunshine-kms
|
systemctl --user --now disable app-dev.lizardbyte.app.Sunshine
|
||||||
systemctl --user --now enable sunshine
|
systemctl --user --now enable sunshine
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -160,12 +160,12 @@ sudo usermod -aG input $USER
|
|||||||
```
|
```
|
||||||
|
|
||||||
### KMS Streaming fails
|
### KMS Streaming fails
|
||||||
If screencasting fails with KMS, you may be using the unprivileged sunshine service unit. Switch to the privileged
|
If screencasting fails with KMS, you may be using the unprivileged app-dev.lizardbyte.app.Sunshine service unit.
|
||||||
sunshine-kms service:
|
Switch to the privileged sunshine service:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl --user --now disable sunshine
|
systemctl --user --now disable app-dev.lizardbyte.app.Sunshine
|
||||||
systemctl --user --now enable sunshine-kms
|
systemctl --user --now enable sunshine
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
# @PROJECT_DESCRIPTION@
|
||||||
|
# The unprivileged service should preset to disabled
|
||||||
|
|
||||||
|
disable app-@PROJECT_FQDN@.service
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# @PROJECT_DESCRIPTION@
|
|
||||||
# KMS service should preset to disabled
|
|
||||||
|
|
||||||
disable sunshine-kms.service
|
|
||||||
@@ -57,7 +57,7 @@ function install() {
|
|||||||
mkdir -p ~/.config/systemd/user
|
mkdir -p ~/.config/systemd/user
|
||||||
cp -r "$SUNSHINE_SHARE_HERE/systemd/user/" ~/.config/systemd/
|
cp -r "$SUNSHINE_SHARE_HERE/systemd/user/" ~/.config/systemd/
|
||||||
# patch service executable path
|
# patch service executable path
|
||||||
sed -i -e "s#$SUNSHINE_PATH#$(readlink -f $ARGV0)#g" ~/.config/systemd/user/sunshine.service
|
sed -i -e "s#$SUNSHINE_PATH#$(readlink -f $ARGV0)#g" ~/.config/systemd/user/app-dev.lizardbyte.app.Sunshine.service
|
||||||
|
|
||||||
# setcap
|
# setcap
|
||||||
sudo setcap cap_sys_admin+p "$(readlink -f "$SUNSHINE_BIN_HERE")"
|
sudo setcap cap_sys_admin+p "$(readlink -f "$SUNSHINE_BIN_HERE")"
|
||||||
@@ -71,7 +71,7 @@ function remove() {
|
|||||||
sudo rm -f /etc/modules-load.d/60-sunshine.conf
|
sudo rm -f /etc/modules-load.d/60-sunshine.conf
|
||||||
|
|
||||||
# remove service
|
# remove service
|
||||||
sudo rm -f ~/.config/systemd/user/sunshine.service
|
sudo rm -f ~/.config/systemd/user/app-dev.lizardbyte.app.Sunshine.service
|
||||||
}
|
}
|
||||||
|
|
||||||
# process arguments
|
# process arguments
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Description=@PROJECT_DESCRIPTION@
|
|||||||
StartLimitIntervalSec=500
|
StartLimitIntervalSec=500
|
||||||
StartLimitBurst=5
|
StartLimitBurst=5
|
||||||
Conflicts=sunshine.service
|
Conflicts=sunshine.service
|
||||||
After=graphical-session.target xdg-desktop-autostart.target
|
After=graphical-session.target xdg-desktop-autostart.target xdg-desktop-portal.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# Avoid starting Sunshine before the desktop is fully initialized.
|
# Avoid starting Sunshine before the desktop is fully initialized.
|
||||||
@@ -12,6 +12,7 @@ ExecStartPre=/bin/sleep 5
|
|||||||
@SUNSHINE_SERVICE_STOP_COMMAND@
|
@SUNSHINE_SERVICE_STOP_COMMAND@
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
NoNewPrivileges=true
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=graphical-session.target
|
WantedBy=graphical-session.target
|
||||||
@@ -386,9 +386,8 @@ fi
|
|||||||
%caps(cap_sys_admin+p) %{_bindir}/sunshine-*
|
%caps(cap_sys_admin+p) %{_bindir}/sunshine-*
|
||||||
|
|
||||||
# Systemd unit/preset files for user services
|
# Systemd unit/preset files for user services
|
||||||
%{_userunitdir}/sunshine.service
|
%{_userunitdir}/*.service
|
||||||
%{_userunitdir}/sunshine-kms.service
|
%{_userpresetdir}/*.preset
|
||||||
%{_userpresetdir}/00-sunshine-kms.preset
|
|
||||||
|
|
||||||
# Udev rules
|
# Udev rules
|
||||||
%{_udevrulesdir}/*-sunshine.rules
|
%{_udevrulesdir}/*-sunshine.rules
|
||||||
@@ -400,8 +399,8 @@ fi
|
|||||||
%{_datadir}/applications/*.desktop
|
%{_datadir}/applications/*.desktop
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
%{_datadir}/icons/hicolor/scalable/apps/sunshine.svg
|
%{_datadir}/icons/hicolor/scalable/apps/*.Sunshine.svg
|
||||||
%{_datadir}/icons/hicolor/scalable/status/sunshine*.svg
|
%{_datadir}/icons/hicolor/scalable/status/*.Sunshine-*.svg
|
||||||
|
|
||||||
# Metainfo
|
# Metainfo
|
||||||
%{_datadir}/metainfo/*.metainfo.xml
|
%{_datadir}/metainfo/*.metainfo.xml
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Categories=RemoteAccess;Network;
|
|||||||
Comment=@PROJECT_DESCRIPTION@
|
Comment=@PROJECT_DESCRIPTION@
|
||||||
Exec=/usr/bin/env systemctl start --u sunshine
|
Exec=/usr/bin/env systemctl start --u sunshine
|
||||||
Icon=@SUNSHINE_DESKTOP_ICON@
|
Icon=@SUNSHINE_DESKTOP_ICON@
|
||||||
|
StartupWMClass=@PROJECT_FQDN@
|
||||||
Keywords=gamestream;stream;moonlight;remote play;
|
Keywords=gamestream;stream;moonlight;remote play;
|
||||||
Name=@PROJECT_NAME@
|
Name=@PROJECT_NAME@
|
||||||
Type=Application
|
Type=Application
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
# User Service
|
# User Service
|
||||||
mkdir -p ~/.config/systemd/user
|
mkdir -p ~/.config/systemd/user
|
||||||
cp "/app/share/sunshine/systemd/user/sunshine.service" "$HOME/.config/systemd/user/sunshine.service"
|
cp "/app/share/sunshine/systemd/user/app-dev.lizardbyte.app.Sunshine.service" "$HOME/.config/systemd/user/app-dev.lizardbyte.app.Sunshine.service"
|
||||||
echo "Sunshine User Service has been installed."
|
echo "Sunshine User Service has been installed."
|
||||||
echo "Use [systemctl --user enable sunshine] once to autostart Sunshine on login."
|
echo "Use [systemctl --user enable app-dev.lizardbyte.app.Sunshine] once to autostart Sunshine on login."
|
||||||
|
|
||||||
# Load uhid (DS5 emulation)
|
# Load uhid (DS5 emulation)
|
||||||
UHID=$(cat /app/share/sunshine/modules-load.d/60-sunshine.conf)
|
UHID=$(cat /app/share/sunshine/modules-load.d/60-sunshine.conf)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# User Service
|
# User Service
|
||||||
systemctl --user stop sunshine
|
systemctl --user stop app-dev.lizardbyte.app.Sunshine
|
||||||
rm "$HOME/.config/systemd/user/sunshine.service"
|
rm "$HOME/.config/systemd/user/app-dev.lizardbyte.app.Sunshine.service"
|
||||||
systemctl --user daemon-reload
|
systemctl --user daemon-reload
|
||||||
echo "Sunshine User Service has been removed."
|
echo "Sunshine User Service has been removed."
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
Description=@PROJECT_DESCRIPTION@
|
Description=@PROJECT_DESCRIPTION@
|
||||||
StartLimitIntervalSec=500
|
StartLimitIntervalSec=500
|
||||||
StartLimitBurst=5
|
StartLimitBurst=5
|
||||||
Conflicts=sunshine-kms.service
|
Conflicts=app-@PROJECT_FQDN@.service
|
||||||
After=graphical-session.target xdg-desktop-autostart.target xdg-desktop-portal.service
|
After=graphical-session.target xdg-desktop-autostart.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# Avoid starting Sunshine before the desktop is fully initialized.
|
# Avoid starting Sunshine before the desktop is fully initialized.
|
||||||
@@ -12,7 +12,6 @@ ExecStartPre=/bin/sleep 5
|
|||||||
@SUNSHINE_SERVICE_STOP_COMMAND@
|
@SUNSHINE_SERVICE_STOP_COMMAND@
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
NoNewPrivileges=true
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=graphical-session.target
|
WantedBy=graphical-session.target
|
||||||
|
|||||||
@@ -1681,14 +1681,20 @@ namespace platf {
|
|||||||
|
|
||||||
if (!fb->handles[0]) {
|
if (!fb->handles[0]) {
|
||||||
BOOST_LOG(error) << "Couldn't get handle for DRM Framebuffer ["sv << plane->fb_id << "]: Probably not permitted"sv;
|
BOOST_LOG(error) << "Couldn't get handle for DRM Framebuffer ["sv << plane->fb_id << "]: Probably not permitted"sv;
|
||||||
BOOST_LOG((config::video.capture == "kms") ? fatal : error)
|
|
||||||
#if defined(SUNSHINE_BUILD_FLATPAK) || defined(SUNSHINE_BUILD_APPIMAGE)
|
#if defined(SUNSHINE_BUILD_FLATPAK) || defined(SUNSHINE_BUILD_APPIMAGE)
|
||||||
|
BOOST_LOG((config::video.capture == "kms") ? fatal : error)
|
||||||
<< "AppImage and Flatpak do not support KMS capture. Use another capture method."sv;
|
<< "AppImage and Flatpak do not support KMS capture. Use another capture method."sv;
|
||||||
#else
|
#else
|
||||||
<< "You must use the 'sunshine-kms' service instead of the 'sunshine' service for KMS capture.\n"sv
|
{
|
||||||
<< "Please refer to the official documentation:\n"sv
|
const std::string kms_msg =
|
||||||
<< " stable: https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html#linux-1"sv
|
"You must use the 'sunshine' service instead of the 'app-" +
|
||||||
<< " beta: https://docs.lizardbyte.dev/projects/sunshine/master/md_docs_2getting__started.html#linux-1"sv;
|
std::string(PROJECT_FQDN) +
|
||||||
|
"' service for KMS capture.\n"
|
||||||
|
"Please refer to the official documentation:\n"
|
||||||
|
" stable: https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html#linux-1\n"
|
||||||
|
" beta: https://docs.lizardbyte.dev/projects/sunshine/master/md_docs_2getting__started.html#linux-1";
|
||||||
|
BOOST_LOG((config::video.capture == "kms") ? fatal : error) << kms_msg;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user