From 0dd57bb2b7b9a4074735b1e60b1d938415d3772c Mon Sep 17 00:00:00 2001 From: Eriq Taing Date: Thu, 10 Jul 2025 12:01:59 -0400 Subject: [PATCH] Introduced files to block steamos actions as we don't need updating --- files/scripts/changeperms.sh | 21 +++++++++++++++++++ files/system/usr/bin/gamescope-session | 19 +++++++++++++++++ files/system/usr/bin/jupiter-biosupdate | 7 +++++++ .../steamos-polkit-helpers/jupiter-biosupdate | 8 +++++++ .../steamos-set-timezone | 6 ++++++ .../bin/steamos-polkit-helpers/steamos-update | 8 +++++++ files/system/usr/bin/steamos-select-branch | 5 +++++ files/system/usr/bin/steamos-session-select | 6 ++++++ files/system/usr/bin/steamos-update | 6 ++++++ .../usr/share/wayland-sessions/steam.desktop | 7 +++++++ recipes/components/change-perms-module.yml | 4 ++++ recipes/components/dnf-module.yml | 3 +++ recipes/recipe.yml | 1 + 13 files changed, 101 insertions(+) create mode 100644 files/scripts/changeperms.sh create mode 100644 files/system/usr/bin/gamescope-session create mode 100644 files/system/usr/bin/jupiter-biosupdate create mode 100644 files/system/usr/bin/steamos-polkit-helpers/jupiter-biosupdate create mode 100644 files/system/usr/bin/steamos-polkit-helpers/steamos-set-timezone create mode 100644 files/system/usr/bin/steamos-polkit-helpers/steamos-update create mode 100644 files/system/usr/bin/steamos-select-branch create mode 100644 files/system/usr/bin/steamos-session-select create mode 100644 files/system/usr/bin/steamos-update create mode 100644 files/system/usr/share/wayland-sessions/steam.desktop create mode 100644 recipes/components/change-perms-module.yml diff --git a/files/scripts/changeperms.sh b/files/scripts/changeperms.sh new file mode 100644 index 0000000..103183a --- /dev/null +++ b/files/scripts/changeperms.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Tell build process to exit if there are any errors. +set -oue pipefail + +# gamescope session +sudo chmod 755 /usr/bin/gamescope-session + +# jupiter biosupdate +sudo chmod 755 /usr/bin/jupiter-biosupdate +sudo chmod 755 /usr/bin/steamos-polkit-helpers/jupiter-biosupdate + +# steamos select branch +sudo chmod 755 /usr/bin/steamos-select-branch + +# steamos update +sudo chmod 755 /usr/bin/steamos-update +sudo chmod 755 /usr/bin/steamos-polkit-helpers/steamos-update + +# steamos set timezone +sudo chmod 755 /usr/bin/steamos-polkit-helpers/steamos-set-timezone \ No newline at end of file diff --git a/files/system/usr/bin/gamescope-session b/files/system/usr/bin/gamescope-session new file mode 100644 index 0000000..216c872 --- /dev/null +++ b/files/system/usr/bin/gamescope-session @@ -0,0 +1,19 @@ +#!/bin/bash + +# Assume that MangoHud is not installed +MANGOAPP_FLAG="" + +# Check that mangoapp is available. Set the flag if it exists, +# otherwise inform to check that MangoHud is installed and +# proceed without the flag. +if command -v mangoapp &> /dev/null; +then + MANGOAPP_FLAG="--mangoapp" +else + printf "[%s] [Info] 'mangoapp' is not available on your system. Check to see that MangoHud is installed.\n" $0 + printf "[%s] [Info] Continuing without the '--mangoapp' flag.\n" $0 +fi + +gamescope \ + $MANGOAPP_FLAG \ + -e -- steam -steamdeck -steamos3 \ No newline at end of file diff --git a/files/system/usr/bin/jupiter-biosupdate b/files/system/usr/bin/jupiter-biosupdate new file mode 100644 index 0000000..e84a0e6 --- /dev/null +++ b/files/system/usr/bin/jupiter-biosupdate @@ -0,0 +1,7 @@ +#!/bin/bash + +# As this is running on a standard Linux install +# state that no updates configured for this bios +# and exit +echo "No updates configured for this bios" +exit 0; \ No newline at end of file diff --git a/files/system/usr/bin/steamos-polkit-helpers/jupiter-biosupdate b/files/system/usr/bin/steamos-polkit-helpers/jupiter-biosupdate new file mode 100644 index 0000000..588d5a4 --- /dev/null +++ b/files/system/usr/bin/steamos-polkit-helpers/jupiter-biosupdate @@ -0,0 +1,8 @@ +#!/bin/bash + +# Exit immediately on error and throw an error +# when using undefined variables +set -eu + +# Run the jupiter-biosupdate script +exec /usr/bin/jupiter-biosupdate "$0" \ No newline at end of file diff --git a/files/system/usr/bin/steamos-polkit-helpers/steamos-set-timezone b/files/system/usr/bin/steamos-polkit-helpers/steamos-set-timezone new file mode 100644 index 0000000..c20f8a8 --- /dev/null +++ b/files/system/usr/bin/steamos-polkit-helpers/steamos-set-timezone @@ -0,0 +1,6 @@ +#!/bin/bash + +# Do nothing, assuming that the timezone will be set +# when installing Linux or configured separately +# from the terminal or desktop environment +exit 0; \ No newline at end of file diff --git a/files/system/usr/bin/steamos-polkit-helpers/steamos-update b/files/system/usr/bin/steamos-polkit-helpers/steamos-update new file mode 100644 index 0000000..c1bc8dc --- /dev/null +++ b/files/system/usr/bin/steamos-polkit-helpers/steamos-update @@ -0,0 +1,8 @@ +#!/bin/bash + +# Exit immediately on error and throw an error +# when using undefined variables +set -eu + +# Run the steamos-update script +exec /usr/bin/steamos-update "$0" \ No newline at end of file diff --git a/files/system/usr/bin/steamos-select-branch b/files/system/usr/bin/steamos-select-branch new file mode 100644 index 0000000..21e282b --- /dev/null +++ b/files/system/usr/bin/steamos-select-branch @@ -0,0 +1,5 @@ +#!/bin/bash + +# As this is running on a standard Linux install +# state this is not applicable +echo "Not applicable for this OS" \ No newline at end of file diff --git a/files/system/usr/bin/steamos-session-select b/files/system/usr/bin/steamos-session-select new file mode 100644 index 0000000..f1a5642 --- /dev/null +++ b/files/system/usr/bin/steamos-session-select @@ -0,0 +1,6 @@ +#!/bin/bash + +# Shutting down Steam will return to the terminal, +# desktop environment or the login screen (display manager) +# depending on where Steam was launched. +steam -shutdown \ No newline at end of file diff --git a/files/system/usr/bin/steamos-update b/files/system/usr/bin/steamos-update new file mode 100644 index 0000000..99342dd --- /dev/null +++ b/files/system/usr/bin/steamos-update @@ -0,0 +1,6 @@ +#!/bin/bash + +# Steam client updates are managed separately, +# so in this case return exit code 7 stating +# no system updates. +exit 7; \ No newline at end of file diff --git a/files/system/usr/share/wayland-sessions/steam.desktop b/files/system/usr/share/wayland-sessions/steam.desktop new file mode 100644 index 0000000..689099b --- /dev/null +++ b/files/system/usr/share/wayland-sessions/steam.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Steam (Gamescope) +Comment=Run Steam directly in Gamescope +Exec=gamescope-session +Type=Application +DesktopNames=gamescope \ No newline at end of file diff --git a/recipes/components/change-perms-module.yml b/recipes/components/change-perms-module.yml new file mode 100644 index 0000000..de51268 --- /dev/null +++ b/recipes/components/change-perms-module.yml @@ -0,0 +1,4 @@ +modules: + - type: script + scripts: + - changeperms.sh \ No newline at end of file diff --git a/recipes/components/dnf-module.yml b/recipes/components/dnf-module.yml index 0f8b2a6..2d4e8eb 100644 --- a/recipes/components/dnf-module.yml +++ b/recipes/components/dnf-module.yml @@ -65,6 +65,9 @@ modules: - bluez - bluez-tools - firewall-config + + # command to list information about monitors + - lshw # applications # fuzzy finder diff --git a/recipes/recipe.yml b/recipes/recipe.yml index 7042d1c..979071d 100644 --- a/recipes/recipe.yml +++ b/recipes/recipe.yml @@ -15,6 +15,7 @@ modules: - from-file: components/dnf-module.yml - from-file: components/script-module.yml - from-file: components/sys-files-module.yml + - from-file: components/change-perms-module.yml - from-file: components/systemd-module.yml - from-file: components/default-flatpak.yml - from-file: components/chezmoi-module.yml