Steam for Linux

Steam for Linux

tgz Jul 22, 2021 @ 5:01am
Steam works only if launched from terminal
I am using Steam from Valve's repo on Ubuntu 20.04. It worked fine till about two weeks ago. Till then I could use the app menu shortcut to start Steam. Now when I use the app menu shortcut, steam starts and then exits. It happened too fast to catch an error message.

So I tried launching from the terminal to catch the error and it worked. Steam launched properly, all games work properly, even over Proton.

For the app menu shortcut, I edited the launcher to get the app to run in the terminal. This didn't help. It still exits halfway into starting.

So now I am running steam by executing it through the terminal. It is just weird, and I wanted to know if someone else faced this, if the issue is known and a solution is available.
< >
Showing 1-15 of 38 comments
class101 [deck] Jul 22, 2021 @ 6:35am 
What is the exact command used in the launcher when you look in its properties ?

On Arch for example this is /usr/bin/steam-runtime %U so to verify what is going on with the launcher, you have to run /usr/bin/steam-runtime, not just "steam"
Last edited by class101 [deck]; Jul 22, 2021 @ 6:37am
tgz Jul 22, 2021 @ 10:57am 
On the app menu launcher, the command is just "steam". I check the usr/share/applications folder, the steam.desktop file there points to "/usr/bin/steam %U". When I execute the steam.desktop Steam doesn't launch. When I run "/usr/bin/steam" from the terminal it launches just fine.
Marlock Jul 22, 2021 @ 11:24am 
there is one thing I can think of that may be affecting the shortcut but not steam launched from terminal...

I noticed that sometimes menu-launched software might have slightly different environment variables set automatically... or the current working folder may be different

It shouldn't affect steam in the slightest, and it didn't before, but something seems to have changed, so...

Maybe try adding a command to cd into your user home folder (or whichever is the default working folder when you launch the terminal) before launching steam, in the steam.desktop command...

it should then look like
cd "/home/yourusername" && usr/bin/steam %U
Last edited by Marlock; Jul 22, 2021 @ 11:24am
Marlock Jul 22, 2021 @ 11:25am 
also you should have a wuick look at your .bashrc file for potential clues
class101 [deck] Jul 22, 2021 @ 11:26am 
That's weird behavior. One thing he could also try

gtk-launch steam.desktop

This should simulate the launch from the desktop file but from the command line, maybe you get a chance to catch the real error like that
Last edited by class101 [deck]; Jul 22, 2021 @ 11:28am
Marlock Jul 22, 2021 @ 11:45am 
or edit steam.desktop to direct standard output to a file, so you can look at it afterwards, without using the terminal

something looking like this
/usr/bin/steam %U > path/to/output.txt
Last edited by Marlock; Jul 22, 2021 @ 11:45am
class101 [deck] Jul 22, 2021 @ 11:47am 
Yep but if it is like a wrong permission on the desktop file he won't see it like this but with gtk-launch I think will report something like permission denied.
Enigmatic Jul 23, 2021 @ 2:43am 
I am openbox pleb I do not know. App menu? Just dig through your file system where ever the 'app menu' is there is probably a small error in the file when you click to launch. it's probably a text file pointing to the runtime launcher. You can probably manually fix it.
Or just create a new launcher. Add a new desktop file just a small bash script. Plop it on your desktop with your steam command however you run it in bash. make it executable. and put on a icon. It'll be good as new. You can call it steam.sh or whatever, it'll run
cd Desktop
nano steam.sh
steam
(Ctrl +o) + (ctrl+x) or
vim.tiny steam.sh
steam
(esc ':wq' enter)
chmod +x steam.sh
./steam.sh (lol) or click it

I think your problem is not a problem bro.
If steam alone does not work
check output of $PATH.
for the chance steam command was in the games folder and not in your $PATH
you must amend your .bashrc file in /~
with the Import = '/usr/bin:/bin'
kinda thing.
Or again in your little steam.sh you can just write the file location ./
But considering you launch it no problem your fine.
Last edited by Enigmatic; Jul 23, 2021 @ 2:53am
tgz Jul 23, 2021 @ 10:57am 
I can't believe the reason for the crash. It is not the command line, it is the terminal emulator!

Running steam from the command line in gnome-terminal and xfce4-terminal produces a crash dump, see the lines after the break below.

These are the system default terminal emulators. The "steam" command executes a script that crashes, even when run from the .desktop shortcut.

I have installed Tilix for my regular work and running "steam" from Tilix doesn't produce this crash dump and assert and Steam runs just fine.

--------------------------------------------------

assert_20210723192948_1.dmp[65850]: Uploading dump (out-of-process)
/tmp/dumps/assert_20210723192948_1.dmp
/home/xxx/.local/share/Steam/steam.sh: line 772: 65751 Segmentation fault (core dumped) $STEAM_DEBUGGER $DEBUGGER_ARGS "$STEAMROOT/$STEAMEXEPATH" "$@"
assert_20210723192948_1.dmp[65850]: Finished uploading minidump (out-of-process): success = yes
assert_20210723192948_1.dmp[65850]: response: CrashID=bp-b22e560e-30cb-4910-9d60-f4f932210723
assert_20210723192948_1.dmp[65850]: file ''/tmp/dumps/assert_20210723192948_1.dmp'', upload yes: ''CrashID=bp-b22e560e-30cb-4910-9d60-f4f932210723''

---------------------------------------------------

I tried to set Tilix as the default terminal emulator but from some reason its not working. The steam.desktop just opens a terminal window and then nothing. I've reverted to gnome-terminal and am now trying to see how to set Tilix as default, or if I should even do that.
Last edited by tgz; Jul 23, 2021 @ 11:00am
Zyro Jul 23, 2021 @ 10:03pm 
Maybe they have a different set of environment variables?
class101 [deck] Jul 24, 2021 @ 2:08am 
I'd go deep rather than comparing how different terminal behaves you are not going to solve your problem like that, or maybe with luck, but the approach is not scientific.

I would check if there is no log entries produced system side
journalctl -p 3 -xb

Otherwise strace, it is very good to catch issues at steam runtime because the amount of logs produced is lower than if you strace something far from the boot time.
# run strace with forks strace -f -o /home/$USER/strace.log <command> # if log is too big, keep the last 100k lines tail -n 100000 /home/$USER/strace.log > /home/$USER/strace-filtered.log 2>&1
Last edited by class101 [deck]; Jul 24, 2021 @ 10:01am
Marlock Jul 24, 2021 @ 3:46am 
i wonder if tilix honors .bashrc and all other standardized sources of aliases and environment parameters that would apply to gnome-terminal

also this may seem silly, but is tilix GTK or QT-based?
Last edited by Marlock; Feb 26, 2023 @ 10:38am
tgz Jul 28, 2021 @ 4:06am 
Journalctl did not show any error. printenv does show different environment variables for Tilix compared to XFCE-Terminal or Gnome-Terminal. Interestingly SHLVL for Tilix is 2 and for XFCE/Gnome terminals is 1. But $PATH is same for both.

Have yet to run strace and see what is happening. Will try it later today.

I have considered just reinstalling steam, but holding back in case it stops working completely. This issue is a pain but at least Steam still works.
zpangwin Jan 11, 2022 @ 12:45pm 
I just ran into this problem last night on Fedora 34 Cinnamon spin. Steam client would disappear when launched from menu but when I tried to see if I got any errors on terminal... it launched.

For me, the solution ended up being that after uninstalling/re-instaliing steam (which I'm not even sure was necessary in hindsight), I just needed to give the steam.desktop file execute permissions.

I added full steps here:
https://github.com/ValveSoftware/steam-for-linux/issues/8232#issuecomment-1010338423
Marlock Jan 11, 2022 @ 2:18pm 
that behavior just doesn't make any sense?!

anyone can explain why the shortcut being executable or not should do any difference? (besides running vs. not running at all)
Last edited by Marlock; Jan 11, 2022 @ 2:18pm
< >
Showing 1-15 of 38 comments
Per page: 1530 50