Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've deleted the folders, but every time I sign back in they're recreated. I've edited ~/.config/user-dirs.dirs and removed the offending lines, but they're replaced when I log back in! The file say's it's auto-generated by /usr/bin/xdg-user-dirs-update, but that seems to be a dead end.

share|improve this question
    
I deleted the user but that particular user's name is coming at the ubuntu 10.04 lts login prompt and not getting deleted from there. please let me know how to achieve this. thx. –  user101200 Oct 12 '11 at 18:02

4 Answers 4

3 files control the "personal special folders" behaviour:

  • ~/.config/user-dirs.dirs - allow the user to specify a custom path for the special folders. So you can have you Music folder in, say, "$HOME/My Music", or "/datapartition/mp3". Its does not allow you to "disable" those folders. If you delete one line (or the whole file), default values will be used, as you have already noticed.

  • /etc/xdg/user-dirs.conf (overrided by ~/.config/user-dirs.conf) - Allows you to enable or disable the automatic folder (re-)creation. If you set enabled=False, either globally of for your own user only, special folders will not be re-created at login anymore in case you delete or rename the folders.

  • /etc/xdg/user-dirs.defaults- Global template for folders path and name. This is the file read when ~/.config/user-dirs.dirs is re-created. Be aware that changing default names will prevent folder names to be localized (translated) if you change your Language/Locale.

By the way, the service you disabled was just the daemon that would offer to rename the folders in case you changed your Language/Locale.

share|improve this answer

It is actually a daemon that creates those folders, check the startup preferences, its on the system menu i believe, you can easily disable that feature.

share|improve this answer
    
the only thing i can find that looks like it could be it is xdg-user-dirs-gtk-update - Update common folders names to match current locale, which is disabled –  nona Dec 20 '10 at 5:18

You can try install Ubuntu Tweak... under "Personal"+"Default Folder Locations" tab: you can change the location of the folders to wherever you wish or you can just have them all pointing to the same directory (i.e. /home/user/)

share|improve this answer

Your problem has been explained at the software wiki

Settings

Sysadmins can configure things by editing /etc/xdg/user-dirs.conf. At the moment there are only two settings, you can disable the whole thing, and you can specify the charset encoding used for filenames. They can also set or change the default directories and their initial values in /etc/xdg/user-dirs.defaults.

$(XDG_CONFIG_HOME)/user-dirs.dirs specifies the current set of directories for the user. This file is in a shell format, so its easy to access from a shell script. This file can also be modified by users (manually or via applications) to change the directories used. Note: To disable a directory, point it to the homedir. If you delete it it will be recreated on the next login.

So your ~/.config/user-dirs.dirs could be modified as

XDG_DOWNLOAD_DIR="$HOME"
XDG_TEMPLATES_DIR="$HOME"
XDG_PUBLICSHARE_DIR="$HOME"
XDG_DOCUMENTS_DIR="$HOME"
XDG_MUSIC_DIR="$HOME"
XDG_PICTURES_DIR="$HOME"
XDG_VIDEOS_DIR="$HOME"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.