Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path to Steam directory cannot contain spaces #3711

Open
tkedwards opened this issue Feb 10, 2015 · 9 comments
Open

Path to Steam directory cannot contain spaces #3711

tkedwards opened this issue Feb 10, 2015 · 9 comments
Assignees
Labels

Comments

@tkedwards
Copy link

I've moved my Steam directory to another location and I've found that Steam won't start if the directory path contains spaces.

Steps to reproduce:

  1. Install Steam as normal
  2. cd ~; mkdir "Program Data"; mv .local/share/Steam "Program Data/"
  3. cd .local/share; ln -s /home/user/"Program Data"/Steam
  4. Start Steam: /usr/bin/steam

Expected result:
Steam starts properly

Actual result:
Steam fails to start with:

$ /usr/bin/steam
Running Steam on ubuntu 14.04 64-bit
STEAM_RUNTIME is enabled automatically
/home/user/Program Data/Steam/steam.sh: line 347: no match: /home/user/ubuntu12_32/steam-runtime.tar.xz.part*
/home/user/Program Data/Steam/steam.sh: line 697: LD_LIBRARY_PATH: unbound variable

Workarounds:
Start Steam at the shell with: cd "/home/user/Program Data/"; ./steam.sh
Change "Program Data" to "Program_Data"

Suggested Fix:
As far as I can tell the way you set STEAMROOT using dirname $0 is wrong - you need to enclose it in quotes to account for file paths that have spaces:
STEAMROOT="$(cd "$(dirname "$0")" && echo $PWD)"

@Oxalin
Copy link

Oxalin commented Feb 11, 2015

Your short log points at another problem about LD_LIBRARY_PATH not being defined:
/home/user/Program Data/Steam/steam.sh: line 697: LD_LIBRARY_PATH: unbound variable
This is a bug already reported: issue 3697 (#3697)
This can be solved by defining LD_LIBRARY_PATH as follow:
export LD_LIBRARY_PATH=""
Then launch steam.

That said, about the reported bug, indeed the missing quotes seem to be the real problem.

Updated comment: removed question about the symlink.

@Oxalin
Copy link

Oxalin commented Feb 11, 2015

By the way, your suggested fix makes sense. ;)

@tkedwards
Copy link
Author

Thanks for the quick response. In case it helps still I've done the symlink thing, it hasn't made a difference:

$ cd .local/share/
$ rm Steam
$ ln -s /home/user/Program\ Data/Steam
$ steam
Repairing installation, linking /home/user/.steam/steam to /home/user/.local/share/Steam
Running Steam on ubuntu 14.04 64-bit
STEAM_RUNTIME is enabled automatically
/home/user/Program Data/Steam/steam.sh: line 347: no match: /home/user/ubuntu12_32/steam-runtime.tar.xz.part*
/home/user/Program Data/Steam/steam.sh: line 697: LD_LIBRARY_PATH: unbound variable

@zman0900
Copy link

This would be a smarter way to set the STEAMROOT variable:

STEAMROOT=$(dirname "$(readlink -f "$0")")

@Oxalin
Copy link

Oxalin commented Feb 12, 2015

Yes, that would be another solution. But, from a bug encountered in a launch script, wouldn't it be better to add quotes like this:
STEAMROOT="$(dirname "$(readlink -f "$0")")"

@tkedwards
Copy link
Author

Any chance of putting one of these fixes in the next release? I still see the problem after the latest update.

@nanonyme
Copy link

nanonyme commented Oct 18, 2018

Not sure how probable this is for anyone with *nix-only background since most such people know to use underscores instead of spaces for compatibility. Not saying I wouldn't like to see this bug squished

@tkedwards
Copy link
Author

*nix has always supported spaces in filenames, and that's commonly used in people's home directories. This is a bug worth fixing

@MagicD3VIL
Copy link

Your short log points at another problem about LD_LIBRARY_PATH not being defined: /home/user/Program Data/Steam/steam.sh: line 697: LD_LIBRARY_PATH: unbound variable This is a bug already reported: issue 3697 (#3697) This can be solved by defining LD_LIBRARY_PATH as follow: export LD_LIBRARY_PATH="" Then launch steam.

That said, about the reported bug, indeed the missing quotes seem to be the real problem.

Unreal that I have encountered a problem tied to this somehow 7 years later. I tried to find out for 5 hours how it is possible that Steam segfaults when I try to open it via terminal (Konsole) with

/home/magicd3vil/.local/share/Steam/steam.sh: line 794: 372749 Segmentation fault      (core dumped) "$STEAMROOT/$STEAMEXEPATH" "$@"

and when I launch it in KDE via the desktop shortcut it works with no problems.

And... for no apparent reason when I try to launch it from the terminal via LD_LIBRARY_PATH="" steam suddenly it works :')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants