SMAPI
SMAPI copied to clipboard
Modify launch script to autohide terminal on the Steam Deck
I'm not 100% certain that I edited the correct file. It appears to be but it differs slightly (due to modification by the installer?).
Quick rundown of what this does.
cat /etc/os-release
reads and prints the file "os-release" in this case to the buffer. (Let's pretend this isn't from my desktop. Copying text from/to the Deck is a PITA.)
NAME="Arch"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux-logo
This is then piped into sed -n '1p'
. This takes the current buffer and drops everything but the first line.
NAME="Arch"
This is then further piped into awk '{print substr($1,7,7)}'
which starts reading from the 7th character (in this case the A) and reads until the 7th character.
On my desktop this yields an invalid result and SMAPI runs as normal. If it matches the expected "SteamOS" the terminal is hidden.
I'm a bit stumped. The script works when called directly from either a terminal or file manager but when ran through steam it still shows the terminal and even stranger, in desktop mode it tries to launch the windows version of the game.
The main terminal logic for Linux does something like this:
if not USE_CURRENT_SHELL:
open terminal;
else if SKIP_TERMINAL:
launch without console output;
else
launch with console output;
You set SKIP_TERMINAL
later in the script, after the check which sets USE_CURRENT_SHELL=true
, so that first block still gets run. Checking for SteamOS earlier in the script (e.g. between "Read environment variables" and "Read command-line arguments") should fix that.
I'll close this since it's still a draft, and I don't have a Steam Deck to finish & test it myself. Feel free to submit a new pull request if you can address the above comments. Thanks for the PR though!
Stop sending me this shit
On Fri, 18 Mar 2022 at 05.25, Helly @.***> wrote:
I'm not 100% certain that I edited the correct file. It appears to be but it differs slightly (due to modification by the installer?).
Quick rundown of what this does.
cat /etc/os-release reads and prints the file "os-release" in this case to the buffer. (Let's pretend this isn't from my desktop. Copying text from/to the Deck is a PITA.)
NAME="Arch" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://bugs.archlinux.org/" LOGO=archlinux-logo
This is then piped into sed -n '1p'. This takes the current buffer and drops everything but the first line.
NAME="Arch"
This is then further piped into awk '{print substr($1,7,7)}' which starts reading from the 7th character (in this case the A) and reads until the 7th character.
On my desktop this yields an invalid result and SMAPI runs as normal. If it matches the expected "SteamOS" the terminal is hidden.
You can view, comment on, or merge this pull request online at:
https://github.com/Pathoschild/SMAPI/pull/834 Commit Summary
- 736b97f https://github.com/Pathoschild/SMAPI/pull/834/commits/736b97f3426b4d22361aea373f1333b058d42671 Modify launch script to autohide terminal on the Steam Deck
File Changes
(1 file https://github.com/Pathoschild/SMAPI/pull/834/files)
- M src/SMAPI.Installer/assets/unix-launcher.sh https://github.com/Pathoschild/SMAPI/pull/834/files#diff-85141d5b317575ba80f8efe19c9b52bcf48972266e4979d69a52dfda0e376374 (6)
Patch Links:
- https://github.com/Pathoschild/SMAPI/pull/834.patch
- https://github.com/Pathoschild/SMAPI/pull/834.diff
— Reply to this email directly, view it on GitHub https://github.com/Pathoschild/SMAPI/pull/834, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASLXOXFTMQC5TYICTZIKYKDVAQAVJANCNFSM5RAYL4WA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
...you do know you're getting sent those, because YOU subscribed? Just unsubscribe.
@OliviaKimberly19 There's an unsubscribe link at the bottom of each email you get.