Skip to content

Commit

Permalink
Steam: prevent xterm from becoming default terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
Botspot committed Dec 6, 2023
1 parent 96a7784 commit 5208c35
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions apps/Steam/install-64
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ if package_installed steamlink ; then
sudo apt purge -y steamlink
fi

#prevent lxterm dependency from becoming default terminal
default_terminal="$(readlink -f /usr/bin/x-terminal-emulator)"

echo "Installing steam_latest.deb"
install_packages https://repo.steampowered.com/steam/archive/stable/steam_latest.deb || exit 1

#check if terminal choice was changed after steam was installed
if [ ! -z "$default_terminal" ] && [ "$(readlink -f /usr/bin/x-terminal-emulator)" != "$default_terminal" ];then
#restore previous choice
sudo update-alternatives --set x-terminal-emulator "$default_terminal"
fi

sudo mkdir -p /usr/local/bin /usr/local/share/applications
# if a matching name binary is found in /usr/local/bin it takes priority over /usr/bin
echo '#!/bin/bash
Expand All @@ -46,9 +55,7 @@ sudo chmod +x /usr/local/bin/steam
sudo cp /usr/share/applications/steam.desktop /usr/local/share/applications/steam.desktop
sudo sed -i 's:Exec=/usr/bin/steam:Exec=/usr/local/bin/steam:' /usr/local/share/applications/steam.desktop

# remove deb
rm /tmp/steam.deb
rm -f /home/${USER}/Desktop/steam.desktop
rm -f $HOME/Desktop/steam.desktop

if ! echo "$XDG_DATA_DIRS" | grep -q "/usr/local/share" || ! echo "$PATH" | grep -q "/usr/local/bin" ; then
warning "YOU NEED TO REBOOT before starting steam. This is because Steam is the first application on your system to be installed into the /usr/local folder."
Expand Down

0 comments on commit 5208c35

Please sign in to comment.