protonscr

Stream making symlink loop ~/.steam/root -> /home/<Me>/.steam/root after login

steamclosed reviewed
ValveSoftware/steam-for-linux#3696 · opened 2015-01-31 by qantourisc · updated 2020-02-11 · 24 comments · github
Qqantourisc 2015-01-31 github

Yesterday during a game, the game suddenly froze for a second, then steam and the game exited.
I could restart steam, and log in again. However it warns me of "You are missing the following 32-bit libraries, and Steam may not run: libc.so.6" (No changes to my system where made between working and not working, and the lib is present.) When launching Dota it complains the steamclient is out of date.

Checking the symbolic links after login:

ls ~/.steam -l
total 20
lrwxrwxrwx 1 steam users 25 jan 31 08:57 bin -> /home/steam//.steam/bin32
lrwxrwxrwx 1 steam users 35 jan 31 08:57 bin32 -> /home/steam/.steam/root/ubuntu12_32
lrwxrwxrwx 1 steam users 35 jan 31 08:57 bin64 -> /home/steam/.steam/root/ubuntu12_64
-rw-r--r-- 1 steam users 565 jan 31 08:57 registry.vdf
lrwxrwxrwx 1 steam users 23 jan 31 08:57 root -> /home/steam/.steam/root
lrwxrwxrwx 1 steam users 31 jan 31 08:57 sdk32 -> /home/steam/.steam/root/linux32
lrwxrwxrwx 1 steam users 31 jan 31 08:57 sdk64 -> /home/steam/.steam/root/linux64
-rw-r--r-- 1 steam users 0 jan 31 08:59 starting
lrwxrwxrwx 1 steam users 23 jan 31 08:57 steam -> /home/steam/.steam/root
-rw-r--r-- 1 steam users 8822 jan 30 19:02 steam_install_agreement.txt
-rw-r--r-- 1 steam users 6 jan 31 08:57 steam.pid
prw------- 1 steam users 0 jan 30 19:02 steam.pipe

Before login (after running steam.sh) the symlinks are ok:

ls ~/.steam -l
total 20
lrwxrwxrwx 1 steam users 25 jan 31 09:02 bin -> /home/steam//.steam/bin32
lrwxrwxrwx 1 steam users 42 jan 31 09:02 bin32 -> /home/steam/.local/share/Steam/ubuntu12_32
...

If you wish an strace I can provide, one, but it's quite long, even if only limiting to the relevant output.
Also I have not been able to see anything specific, during an strace yet.

Qqantourisc 2015-01-31 github

Temp workaround for others who are suffering:

  1. Start steam
  2. Log in
  3. run stream.sh to fix the symlinks
  4. Enjoy
ZZer0t3ch 2015-02-27 github

I am having the same problem. Steam starts up just fine with no warning, but upon trying to launch CS:GO, I get a popup saying:

FATAL ERROR: Failed to connect with local Steam Client Process

and this is what I get in the terminal that was running Steam: http://pastebin.com/DtAViQVG

So I checked some of my symlinks, and here's what I think is causing the problem:

[chaos .steam]$ pwd
/home/data/linsteam/.steam
[chaos .steam]$ ls -al
total 28
drwxr-xr-x 2 chaos chaos 4096 Feb 27 07:01 .
drwxr-xr-x 6 chaos chaos 4096 Feb 27 07:01 ..
lrwxrwxrwx 1 chaos chaos   33 Feb 27 07:01 bin -> /home/data/linsteam//.steam/bin32
lrwxrwxrwx 1 chaos chaos   43 Feb 27 07:01 bin32 -> /home/data/linsteam/.steam/root/ubuntu12_32
lrwxrwxrwx 1 chaos chaos   43 Feb 27 07:01 bin64 -> /home/data/linsteam/.steam/root/ubuntu12_64
-rw-r--r-- 1 chaos chaos  639 Feb 27 07:01 registry.vdf
lrwxrwxrwx 1 chaos chaos   31 Feb 27 07:01 root -> /home/data/linsteam/.steam/root
lrwxrwxrwx 1 chaos chaos   39 Feb 27 07:01 sdk32 -> /home/data/linsteam/.steam/root/linux32
lrwxrwxrwx 1 chaos chaos   39 Feb 27 07:01 sdk64 -> /home/data/linsteam/.steam/root/linux64
-rw-r--r-- 1 chaos chaos    0 Feb 27 07:01 starting
lrwxrwxrwx 1 chaos chaos   31 Feb 27 07:01 steam -> /home/data/linsteam/.steam/root
-rw-r--r-- 1 chaos chaos    6 Feb 27 07:00 steam.pid
prw------- 1 chaos chaos    0 Feb 26 18:08 steam.pipe
-rw------- 1 chaos chaos 8822 Feb 26 18:08 steam_install_agreement.txt

As you can see, /home/data/linsteam/.steam/root is a symlink to itself, and I can't find a stream.sh anywhere on my system to fix this.

ZZer0t3ch 2015-02-27 github

UPDATE: So I found where ~/.steam/root is supposed to point to, and I'm able to patch it, but Steam breaks it every time it starts up, so I wrote my own simple patch script:

#!/bin/bash
cd $HOME/.steam
rm root
ln -s $HOME/.local/share/Steam/ ./root

EDIT: In this form, it doesn't actually work for me because I alter my $HOME in the Steam script (games don't know how not to clutter my $HOME) but it should work for anyone who doesn't do this.

Sstephensrmmartin 2015-03-11 github

I am having the same issue. Arch linux 64bit. It breaks several games.

ZZer0t3ch 2015-03-11 github

Were you able to fix it using the script I posted?

Sstephensrmmartin 2015-03-11 github

Yes, but it is incredibly frustrating to do that every time I log into steam. It needs to be fixed.

ZZer0t3ch 2015-03-11 github

I can understand that. You could probably throw it at the end of your steam script if you wanted, though. Should "fix" the problem. You can which steam to find your steam script, usually /usr/bin/steam

I'm planning on finding the issue with the script and submitting a pull request with a fix.

BBlaxar 2015-03-14 github

I made an ArchLinux forum post about it, got no response, so I ended up looking deeper and stumbled upon this weird looping symlink too, then from that I found this ticket.

https://bbs.archlinux.org/viewtopic.php?pid=1510748#p1510748

Your fix doesn't do the trick for me though.

[EDIT] Ok, I just needed to run the fix after launching steam (in another terminal), thanks ! [/EDIT]

Hhyperlocalheroes 2015-04-29 github

still using Zer0t3ch fix here...

ZZer0t3ch 2015-05-07 github

Has any "representative" of this repo spoken anywhere on this issue? It doesn't seem to have even been acknowledged in any way other than having @johnv-valve assigned to it.

According to GitHub, @johnv-valve has not contributed to any public projects since October 2014.

**EDIT - Opened issue #3837 in reference to this, requesting that all issues assigned to @johnv-valve be reassigned.

Ffiws 2015-08-14 github
BBlaxar 2015-08-15 github

Wow thanks @fiws, this solved it for me too.

Qqantourisc 2016-01-09 github

Can confirm removing the ending slash from the home_path fixes this issues.
For me the home path of the user was /home/steam/ I changed this to /home/steam (in /etc/password, or using usermod) and now it works perfeclty.

Lllybin 2016-03-19 github

I confirm removal of slash solves the problem. I run like this:
$ HOME=/home/$USER steam

Jjoshward91 2016-10-30 github

Followed a combined thing of this and this to get mine working.

Essentially:

export LD_LIBRARY_PATH=$HOME/.local/share/Steam/ubuntu12_32:$HOME/.local/share/Steam/linux32_:$HOME/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib:$HOME/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu:$HOME/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu
steam --reset
MMJohnson459 2016-12-02 github

So this has been afflicting my for a while now with only temporary fixes working. I spent some time digging through the bash scripts and found this check in ~/.local/share/Steam/steam.sh:

567 if [ "$STEAMROOT" != "$STEAMROOTLINK" -a "$STEAMROOT" != "$STEAMDATALINK" ]; 
...
572     rm -f "$STEAMROOTLINK" && ln -s "$STEAMROOT" "$STEAMROOTLINK"

So it seems this bug occurs when the != checks fail which is normally caused by the $HOME being weird. In my case it has an extra ./ /./home/<me> and others have mentioned an extra / /home/<me>/.

Now $STEAMROOT is set using $PWD while $STEAMROOTLINK is set using ~ aka $HOME. $PWD will return the clean path unlike ~ which means that the two variables will be differing when using the check above.

This can be fixed by wrapping both ways in a readlink -f call:

# Technically not need as $PWD will return the clean path
22  STEAMROOT="`readlink -f $(cd $(dirname $0) && echo $PWD)`"  
...
# Used to set $STEAMROOTLINK
518 STEAMCONFIG=`readlink -f ~/.steam`

Making this change will stop steam.sh from accidentally overwriting the links and make the if statement do what it is supposed to be doing.

Unfortunately when steam.sh does run successfully, it causes steam to update and overwrite itself removing the fixes...

Hhyperlocalheroes 2017-05-22 github

it's been a year since i fixed this doing clean installs on newer clients

Kkisak-valve maintainer 2017-05-22 github

Hello, is anyone still experiencing this issue with an up to date system?

Kkisak-valve maintainer 2017-06-26 github

Closing as this appears to have been resolved.

Fffiarpg 2020-02-10 github

I have this issue right now.

Kkisak-valve maintainer 2020-02-10 github

Hello @ffiarpg, what does echo $HOME give you? Also, are you on an up to date system?

Fffiarpg 2020-02-11 github

Hi @kisak-valve , appreciate the response.

echo $HOME gives me /home/kyle

My system is up to date. KDE Neon (Ubuntu/Debian based)

I've tried pretty much everything in this thread, so I'm wondering if maybe I have the same problem but a different root cause.

Kkisak-valve maintainer 2020-02-11 github

Thanks for checking, please open a new issue report so it can be tracked properly.