From 586ebf29ab1b740e102ce5dab33c9ea796b6da83 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 11 Aug 2023 00:10:49 -0700 Subject: [PATCH] fix: Handle steam shortcuts properly between deck and desktop, clean up by moving some tasks to bazzite-arch --- Containerfile | 4 ++-- system_files/deck/shared/usr/bin/bazzite-steam | 7 +++++++ system_files/deck/shared/usr/bin/bazzite-steam-runtime | 7 ------- system_files/desktop/shared/usr/bin/bazzite-user-setup | 3 +-- .../desktop/shared/usr/share/ublue-os/just/custom.just | 2 -- 5 files changed, 10 insertions(+), 13 deletions(-) create mode 100755 system_files/deck/shared/usr/bin/bazzite-steam delete mode 100755 system_files/deck/shared/usr/bin/bazzite-steam-runtime diff --git a/Containerfile b/Containerfile index 76537618..ed4cadd3 100644 --- a/Containerfile +++ b/Containerfile @@ -278,10 +278,10 @@ RUN rm /usr/share/applications/winetricks.desktop && \ ln -s /usr/bin/steamos-logger /usr/bin/steamos-info && \ ln -s /usr/bin/steamos-logger /usr/bin/steamos-notice && \ ln -s /usr/bin/steamos-logger /usr/bin/steamos-warning && \ - sed -i 's@/usr/bin/steam-runtime@/usr/bin/bazzite-steam-runtime@g' /usr/share/applications/steam.desktop && \ + sed -i 's@/usr/bin/steam@/usr/bin/bazzite-steam@g' /usr/share/applications/steam.desktop && \ mkdir -p "/etc/xdg/autostart" && \ cp "/usr/share/applications/steam.desktop" "/etc/xdg/autostart/steam.desktop" && \ - sed -i 's@/usr/bin/bazzite-steam-runtime %U@/usr/bin/bazzite-steam-runtime -silent %U@g' /etc/xdg/autostart/steam.desktop && \ + sed -i 's@/usr/bin/bazzite-steam %U@/usr/bin/bazzite-steam -silent %U@g' /etc/xdg/autostart/steam.desktop && \ cp "/usr/share/ublue-os/firstboot/yafti.yml" "/etc/yafti.yml" && \ sed -i 's/#HandlePowerKey=poweroff/HandlePowerKey=suspend/g' /etc/systemd/logind.conf && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ diff --git a/system_files/deck/shared/usr/bin/bazzite-steam b/system_files/deck/shared/usr/bin/bazzite-steam new file mode 100755 index 00000000..5bf2a612 --- /dev/null +++ b/system_files/deck/shared/usr/bin/bazzite-steam @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +if [[ "$XDG_SESSION_TYPE" = "wayland" ]]; then + env LD_PRELOAD=/usr/lib/extest/libextest.so /usr/bin/steam "$*" +else + /usr/bin/steam "$*" +fi \ No newline at end of file diff --git a/system_files/deck/shared/usr/bin/bazzite-steam-runtime b/system_files/deck/shared/usr/bin/bazzite-steam-runtime deleted file mode 100755 index 585cc27c..00000000 --- a/system_files/deck/shared/usr/bin/bazzite-steam-runtime +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -if [[ "$XDG_SESSION_TYPE" = "wayland" ]]; then - env LD_PRELOAD=/usr/lib/extest/libextest.so /usr/bin/steam-runtime "$*" -else - /usr/bin/steam-runtime "$*" -fi \ No newline at end of file diff --git a/system_files/desktop/shared/usr/bin/bazzite-user-setup b/system_files/desktop/shared/usr/bin/bazzite-user-setup index 73c9a4cd..8c8839e2 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-user-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-user-setup @@ -11,9 +11,8 @@ if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then echo 'Running setup for Kinoite on Steam Deck' echo 'Creating Desktop shortcuts' + mkdir -p $HOME/Desktop/ cp /usr/share/applications/steam.desktop ~/Desktop/steam.desktop - sed -i 's@ (Runtime)@@g' ~/Desktop/steam.desktop - sed -i 's@/usr/bin/steam-runtime@/usr/bin/bazzite-steam-runtime@g' ~/Desktop/steam.desktop cp /etc/skel.d/Desktop/Return.desktop ~/Desktop/Return.desktop cp /usr/share/applications/lutris.desktop ~/Desktop/lutris.desktop cp /usr/share/applications/yafti.desktop ~/Desktop/yafti.desktop diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/custom.just b/system_files/desktop/shared/usr/share/ublue-os/just/custom.just index bffed19f..222798e5 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/custom.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/custom.just @@ -10,7 +10,6 @@ install-bazzite-arch: fi distrobox-enter -n bazzite-arch -- ' /usr/bin/bazzite-steam-runtime --silent &' distrobox-enter -n bazzite-arch -- ' distrobox-export --app steam' - sed -i 's@/usr/bin/steam-runtime@/usr/bin/bazzite-steam-runtime@g' ~/.local/share/applications/bazzite-arch-steam.desktop cp ~/.local/share/applications/bazzite-arch-steam.desktop ~/.config/autostart/bazzite-arch-steam-silent.desktop sed -i 's@/usr/bin/bazzite-steam-runtime %U@/usr/bin/bazzite-steam-runtime -silent %U@g' ~/.config/autostart/bazzite-arch-steam-silent.desktop distrobox-enter -n bazzite-arch -- ' distrobox-export --app lutris' @@ -20,7 +19,6 @@ install-bazzite-arch: mv ~/.steam/steamcmd ~/.steam/steamcmd.sh if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then cp ~/.local/share/applications/bazzite-arch-steam.desktop ~/Desktop/bazzite-arch-steam.desktop - sed -i 's@ (Runtime)@@g' ~/Desktop/bazzite-arch-steam.desktop sed -i 's@ (on bazzite-arch)@@g' ~/Desktop/bazzite-arch-steam.desktop cp ~/.local/share/applications/bazzite-arch-net.lutris.Lutris.desktop ~/Desktop/bazzite-arch-net.lutris.Lutris.desktop sed -i 's@ (on bazzite-arch)@@g' ~/Desktop/bazzite-arch-net.lutris.Lutris.desktop