I had mentioned my encounter with some new directories in Ubuntu 7.10, the Gutsy Gibbon:
- Documents
- Music
- Pictures
- Public
- Templates
- Videos
These showed up on an upgrade from 7.04 Feisty Fawn and on a fresh install of 7.10. On installs of previous versions, there has been the Desktop folder, and I’ve kept that around as a special dir that is actually linked to the desktop somehow. (Saved items in ~/Desktop will show up on the GNOME desktop.)
I was put off at first by these, concerned that we might be moving in to the Microsoft territory of “My Documents” and “My Favorites” types of folders, and rigid expectations of where we should put things, but after some investigation they don’t seem like such a bad idea, and they’re not all that intrusive. You can make as much or little or no use of them as you want. (I’m happy that the developers stayed away from the infantilizing “My” label, and clearly, /home/scarpent/Documents is much preferable to C:\Documents and Settings\scarpent\My Documents.)
I noticed the Documents, Music, Pictures, and Videos directories showed up as items in the “Places” menu, and also in dialogs like File “Save As…”. My first reaction was to remove them, since I have my own places I like to keep these things. After deleting them, the Places menu simply stopped showing them. No complaints. It was quite painless. (Windows would have warned me about drastic consequences and begged me not to touch them.)
But I had become curious about why these had been added and where the GNOME developers were going with this. I thought it might be useful to have my Places menu and file save dialogs include shortcuts to the locations where I actually keep these things. For new users, I don’t think there’s anything wrong with providing common folders in their home dir up front that they can start using, and that applications can know about and default to opening or saving different kinds of files in a likely location. My searches uncovered a lot of information, but nothing that brought it all together for me. Here is some of what I found, in the hopes of helping other searchers. Apologies for the vagueness of it all. I’m just getting my head around these different features and configurations.
I first found an Ubuntu Forums thread pointing to freedesktop standards as the source of these directories, pointing out that this isn’t necessarily Ubuntu specific. Something to do with an XDG Base Directory specification. (Also see freedesktop.org and the freedesktop.org Wikipedia entry.)
Someone in the Ubuntu forum mentioned editing ~/.config/user-dirs.dirs to change the defaults. I immediately seized on this as the key and spent a lot of time trying to configure my own dirs there, but couldn’t tell if my changes were having any effect. In fact, I thought my changes there were having no effect because I expected them to be reflected in the Places menu. I was thoroughly confusing two different things. I thought the Places menu entries and the “Save As” dialogs (a GTK widget?) were tied to this as well, but that is another thing: gtk-bookmarks. So when I updated my user-dirs.dirs file, and ran xdg-user-dirs-update, I couldn’t see any visible effect of my actions. Either applications aren’t using user-dirs.dirs much yet, or I just don’t know which ones take advantage of it.
So I spun my wheels for a while with user-dirs.dirs. There is a freedesktop.org page on xdg-user-dirs, which mentions /etc/xdg/user-dirs.conf and /etc/xdg/user-dirs.defaults, and I played around with the defaults also. I found another discussion where someone pointed out that if you move or rename these directories in Nautilus, that the user-dirs.dirs file would be updated, and I saw that this was true.
I’m sure it is a good idea to keep user-dirs.dirs in sync with the actual directories I use, but it turns out that what I had really been trying to do was figure out was how the Places menu worked. (Or at least one part of the Places menu.) For that, I discovered the ~/.gtk-bookmarks file, which starts out looking like:
file:///home/scarpent/Documents file:///home/scarpent/Music file:///home/scarpent/Pictures file:///home/scarpent/Videos
You can modify or add new entries in this format, and they’ll automatically appear in the Places menu. If the directory doesn’t exist, Places won’t list it.
What further confused me was that it seemed like OpenOffice.org 2.3 was using user-dirs.dirs to determine it’s default save directory. It would pick ~/Documents if that dir existed, but wouldn’t pick the new dir that I assigned in user-dirs.dirs. After a while it occurred to me to check in the OO.o config, and I then saw it had its own setting for a data directory.
Has this helped at all? It seems like there is some work to do in this area. I can imagine it’s hard to develop new desktop standards and get everyone to agree on how configuration should be handled for these things, including adding GUI support. The nice part again is that it’s relatively unobtrusive. No one is dictating that they should be used. There is potentially some annoyance if the directories are created when not wanted and not needed, but once user-dirs.dirs is set with the user-specific directories I’m hoping that future upgrades won’t keep recreating the defaults.
Related: Ubuntu 7.10 Gutsy Gibbon Swings In



8 Comments
I find the easiest way to add folders to my place menu is to:
1. Open nautilus
2. Navigate till I can see the folder I want to link to
3. Drag that folder onto the places pane of the nautilus window
4. All done .. voila you can now use that shortcut in the nautilus window and the places menu
Unfortunately that doesn’t solve the openoffice issue.
23 October 2007 at 12:49 pm
It looks to me like a good idea that needs to propagate a little while….
It also looks to me that *ANYTHING* that makes backup and desktop administration work better than Vista is a *Good Idea* (not hard). Having a agreed upon set of folders that default out for third party vendors to hang their hat on is that. I really like how “/media” worked out.
23 October 2007 at 4:11 pm
Thanks, Rax. I should remember to always experiment with clicking and dragging in Nautilus. Lots of things work nice that way.
Hi, Embedded — I agree. No problem having common defaults, and then of course we want to let people change them if they want.
23 October 2007 at 4:25 pm
hate it. clogs up home dir without me using it. for everyone just looking for the place to disable it, it is /etc/xdg/user-dirs.conf
17 November 2007 at 5:45 am
Hello, I found another way to add folder to Places. Open the folder that you want to show on Places and bookmark it…
5 December 2007 at 11:10 am
Thanks, Juan. Looking at that caused me to look more closely at the “Bookmarks” menu in Nautilus, which I’ve previously glossed over. Funny how you can have blinders on with things you use frequently.
5 December 2007 at 4:38 pm
My solution is a damn small trick. I removed these directories using “rmdir” and created the symbolic links using “ln -s” to the Windows folders with the same names. That’s work!
rmdir Documents
ln -s /media/sda1/My\ Documents Documents
29 December 2007 at 8:11 pm
Very handy informational guide. This is a little bit old, but it is this kind of information that isn’t readily and clearly explained.
One day I hope that Ubuntu will ship with solid, clear, technical manuals that explain how things work. The man pages are great, but how are you to find a topic in there without knowing the topic before hand? :(
Thanks very much!
29 July 2008 at 2:41 pm