Remove or hide desktop folder in ~ (Xubuntu)

7,510

There are two possible solutions (as far as I can tell):

Move the Desktop folder

  1. Open the file ~/.config/user-dirs.dirs in a text editor
  2. Change the line XDG_DESKTOP_DIR="$HOME/Desktop" to point to some other location
    (for example: XDG_DESKTOP_DIR="$HOME/.config/desktop")
    • Do not just remove the line:
      Doing so will make it use the default value ($HOME/Desktop) and you'll end up in the same situation that you are already in :-)
  3. Save the file
  4. Log out and back in

Screenshot after editing and applying the change

Disable the desktop entirely (advanced)

This is a more advanced method that will disable desktop management entirely (including desktop folder creation and display).

  1. Launch a terminal (if you don't know how than this isn't for you)
  2. Type in this command: xfconf-query --channel "xfce4-session" --property "/sessions/Failsafe/Client4_Command" --type string --set ""
    • Basically it tells the session manager (the thing that starts and monitors your desktop and window manager, panel, ...) to not start any desktop manager ("Client2") anymore
  3. Log out and back in

If you wish to re-enable desktop management later on, do the same steps as above but use the command xfconf-query --channel "xfce4-session" --property "/sessions/Failsafe/Client4_Command" --type string --set "xfdesktop" instead.

Share:
7,510

Related videos on Youtube

Sebastian
Author by

Sebastian

The founder and designer of www.nottelo.com, searching for right people to work with. Especially Javascript / Typescript / Angular 2 / Java developers are welcomed. Let me know via e-mail form on nottelo.com/joinus!

Updated on September 18, 2022

Comments

  • Sebastian
    Sebastian almost 2 years

    I've never used "Desktop" folder in my home directory for anything and I would like to remove but it always recreates itself when I delete it or hide it. It's pretty sticky.

    I've also tried include folder into .hidden file, editing user-dirs.conf in /etc and /etc/xdg but with no success.

    It reminds me every day that I'm not able to get rid of it :-)

    Thank you for any information.

    • Sebastian
      Sebastian almost 9 years
      Actually that's what I did and it did not work.
    • Jacob Vlijm
      Jacob Vlijm almost 9 years
      AH, sorry, I read over it...
    • A.B.
      A.B. almost 9 years
      Edit your question and add your used steps.
  • ntninja
    ntninja almost 9 years
    Don't forget to upvote and mark as accepted answer if this helped you! Do ask for clarification if something doesn't make sense to you!
  • Sebastian
    Sebastian almost 9 years
    Fantastic, Alexander, you solved it for me. Thank you so much for your answer!
  • anonymous2
    anonymous2 almost 8 years
    Could you be a bit more precise on exactly what the OP has to do?
  • Christian V
    Christian V almost 8 years
    My post was not directed at advising the OP, but more at anyone else who may find this discussion and want to attempt the provided solutions. If you mean that you want my explanation to be more precise, then I am happy to oblige: after encountering the problem I described (of my desktop background disappearing) the problem resolved itself once I had re-edited the config file so that it was identical to what it had been before, then rebooting the computer.
  • anonymous2
    anonymous2 almost 8 years
    That's great, thanks! Askubuntu.com is aimed at providing clear questions and answers, unlike many forums, where discussion is acceptable.