Skip to content

Commit

Permalink
Steam: fix 2 first-launch failures
Browse files Browse the repository at this point in the history
Remove crashhandler.so as referenced in
ptitSeb/box64#2021
Add back the desktop launcher in the original location to prevent file
copying failure and error exit
  • Loading branch information
Botspot committed Nov 22, 2024
1 parent 4e1c389 commit 391b491
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions apps/Steam/install-64
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,24 @@ rm -f /home/${USER}/Desktop/steam.desktop' | sudo tee /usr/local/bin/steam || er
# set execution bit
sudo chmod +x /usr/local/bin/steam

#remove crashhandler.so from archive that is extracted to ~/.local/share/Steam/ubuntu12_32/crashhandler.so
#fixes first launch error
rm -rf /tmp/bootstraplinux_ubuntu12_32
mkdir -p /tmp/bootstraplinux_ubuntu12_32 || error "failed to make temp folder /tmp/bootstraplinux_ubuntu12_32"
tar -xf '/usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz' -C /tmp/bootstraplinux_ubuntu12_32 || error "failed to extract bootstraplinux_ubuntu12_32.tar.xz"
rm -f /tmp/bootstraplinux_ubuntu12_32/ubuntu12_32/crashhandler.so || error "failed to remove crashhandler.so"
#overwrite the archive (changes will be overwritten on steam.deb update, but this is only needed once for first setup to not fail)
sudo tar -cJf '/usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz' -C /tmp/bootstraplinux_ubuntu12_32 . || error "failed to compress new bootstraplinux_ubuntu12_32.tar.xz"
rm -rf ~/.local/share/Steam/ubuntu12_32/crashhandler.so /tmp/bootstraplinux_ubuntu12_32 #remove it in case it already exists

# move official steam.desktop file to /usr/local and edit it (move it so users ignoring the reboot warning cannot find the wrong launcher)
# we can't edit the official steam.desktop file since this will get overwritten on a steam update (asteam adds its own apt repo)
# we can't edit the official steam.desktop file since this will get overwritten on a steam update (steam adds its own apt repo)
# if a matching name .desktop file is found in /usr/local/share/applications it takes priority over /usr/share/applications
sudo mv -f /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
#symlink to original location to prevent first-run steam exit when file is missing, and to prevent /usr/local/share in PATH from being a hard requirement (Chances are the user will reboot before steam.deb gets an update)
sudo ln -s /usr/local/share/applications/steam.desktop /usr/share/applications/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."
else
warning "Steam should be able to launch right now from the menu, but if it fails, try rebooting."
fi
status "Steam should be able to launch right now from the menu, but if it fails, try rebooting."

0 comments on commit 391b491

Please sign in to comment.