protonscr

Steam creates ~/Desktop file instead of a dir.

steamclosed reviewedSteam client
ValveSoftware/steam-for-linux#1796 · opened 2013-02-15 by YorikSar · updated 2013-03-13 · 3 comments · github
YYorikSar 2013-02-15 github

This is somewhat related to issue #655. I don't have any Desktop dir. I don't use any bundled desktop environment and I don't have any "desktop" as collection of icons with links. /usr/bin/steam script fails because of the same snippet as in #655:

test -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" && source "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs"
DESKTOP_DIR="${XDG_DESKTOP_DIR:-$HOME/Desktop}"

cp "/usr/share/applications/$STEAMPACKAGE.desktop" "$DESKTOP_DIR"
chmod +x "$DESKTOP_DIR/$STEAMPACKAGE.desktop"

But for me the problem looks like this (bash -x /usr/bin/steam output):

+ test -f /home/yorik/.config/user-dirs.dirs
+ DESKTOP_DIR=/home/yorik/Desktop
+ cp /usr/share/applications/steam.desktop /home/yorik/Desktop
+ chmod +x /home/yorik/Desktop/steam.desktop
chmod: cannot access ‘/home/yorik/Desktop/steam.desktop’: Not a directory

The problem is that if the dir does not exist, script will copy steam.desktop file to ~/Desktop file. So it should either create the dir if it does not exist ([ -d "$DESKTOP_DIR" ] || mkdir -p $DESKTOP_DIR) or fail earlier (add one / to the end of cp command: cp "/usr/share/applications/$STEAMPACKAGE.desktop" "$DESKTOP_DIR"/).

Ccpages 2013-02-15 github

I also hit this problem. I think a preferable solution would be just to simply avoid copying the .desktop file if the destination dir does not exist.

Sslouken 2013-02-24 github

This is fixed for a future update, thanks!

Aam1github 2013-03-13 github

Aehm.. is it possible to turn that off? I do not want this .desktop-file on my Desktop. I've a clean Desktop.
When i edit the file, steam updates itself and the edited-file is overwritten with the orig. This sucks :-1:

Nothing extracted yet.