9

Environment: Debian 7, gnome-shell.

I dislike having a Desktop folder and a Home folder. I like all the applications to use my home folder. Specifically I am concerned about nautilus and gnome-terminal.

I set nautilus to use Home as Desktop using dconf-editor and property org.gnome.nautilus.preferences.desktop-is-home-dir==true.

That works well.

But when I launch a gnome-terminal it starts a shell at /home/username/Desktop. That is highly annoying because I do not use that dir.

I am sure that my home dir is properly set:

$ grep username /etc/passwd
username:x:1000:1000:username,,,:/home/username:/bin/bash
$ echo $HOME
/home/username

how can I change that behavior so the shell starts at /home/username?

1
  • I am using the default gnome-shell that comes with debian stable. For me stability and resiliency are way way more valuable than features. Your suggestion worked like a charm. Not sure if you can/want to promote it to an answer so you can take credit for it, but it sure is a valid answer. Nov 13, 2014 at 14:56

1 Answer 1

10

You actually want to disable the Desktop directory and prevent the DE to automatically recreate it.

Short answer:
Edit ~/.config/user-dirs.dirs and change XDG_DESKTOP_DIR value to $HOME:

XDG_DESKTOP_DIR="$HOME"

Long answer:
How to disable/relocate the User Directories (Desktop, Pictures, Documents etc) ?

On a freedesktop compliant DE this is done via the XDG user directories configuration file, namely $(XDG_CONFIG_HOME)/user-dirs.dirs:

$(XDG_CONFIG_HOME)/user-dirs.dirs specifies the current set of directories for the user.

If not set or empty, XDG_CONFIG_HOME defaults to ~/.config so, for most users, the file in question is ~/.config/user-dirs.dirs.

Applications read this file to find those directories. The file consists of key=value pairs, one per line.
The default locations are:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_TEMPLATES_DIR="$HOME/.Templates"
XDG_VIDEOS_DIR="$HOME/Videos"

To relocate a certain directory edit the config file and replace the current value with the location of your choice, e.g.

XDG_DOCUMENTS_DIR="/run/media/mybackupdrive/documents"

To disable a certain directory point it to the home directory:

XDG_DESKTOP_DIR="$HOME"

For those who prefer a CLI tool, XDG provides xdg-user-dirs:

Relocate VIDEOS:

xdg-user-dirs-update --set VIDEOS /media/bkdrive/myvideos

Query current location for VIDEOS:

xdg-user-dir VIDEOS

/media/bkdrive/myvideos

Note:
After configuring user-dirs.dirs, if some User Dirs are on drives that are not accessible at startup you might want to disable /etc/xdg/user-dirs.conf (if present on your system), i.e. edit the enabled line to read:

enabled=False

see this discussion for more details.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .