Abstracting the Linux Desktop from the File-system

Abstracting the Linux Desktop from the File-system

One of the most intimidating things to new users about Linux is the layout of the file-system. Users who are learning to hack Linux have to just clench their teeth and learn their way around, but what about a user who just wants to send e-mails, browse the web and type up a few documents? ie. ninety-something percent of computer users. Do they need to know the difference between /var, /usr and /tmp to send an e-mail? Do they need to know that their home directory is in /home/{username}? Do they need to know that their cdrom is mounted in /mnt?

Do you ever hear complaints from OsX users about the OsX file-system? Is the OsX file-system any more intuitive than the Linux one? Do you even know anything about the OsX file-system? Will you ever know anything about the OsX file-system? Probably not. Microsoft have added the My Documents Folder to Windows... Apple have abstracted the desktop from the file-system in OsX... Which OS is acclaimed for being intuitive and easy to use?

Advanced users might want to install some software that they've downloaded from the net, do some website development, maybe even some software development. But when you think about it, the majority of desktop computing tasks, whether simple or advanced, can be performed without any mention of /usr, /var or /home. I'm not saying it's not good for people to learn about how Linux works under the hood. I'm saying that they should have to make a conscious decision and go look under the hood if they want to learn. There should not be bits of engine sticking out of the dash of the car. ie. There should be a clear line drawn between the desktop and the file-system.

I'm a Gnome user and hacker(well almost) so I'm going to talk about Gnome because it is what I know the best. Linux has a reputation for being an overly complicated hackers toy and I'm hoping that a next generation of abstracted Linux desktop, mixed with improved software installation systems[1], will alleviate this problem. I am not going to talk about how KDE should be abstracted because I don't know it well enough. But I would love to see KDE and Gnome move forward hand in hand to make the Linux desktop easier to use.

The Current Situation

Currently in Gnome there are three main entities presented to the user: the desktop, the home folder and the start-here folder. In my opinion none of these are used to their full potential: The desktop usually ends up empty except a few launchers and a link to the home folder, and is inaccessible because it is stored in a hidden folder. The home folder ends up full of random files and in need of regular re-organization. The start-here folder is just a way to edit your menus at the moment.

Figure 1. A default Gnome 2.1 Desktop showing the start-here folder, a home directory and the desktop

The Desktop and Home Directory

The first way to abstract the Gnome desktop is to tell nautilus to use the home directory as the desktop[2]. This is turned off by default at the moment, but if Gnome is to be abstracted in the future I feel that it needs to be made an integral part of how nautilus and gnome works. With this done two of the aforementioned elements are have been merged. Now we have a single entity where we used to have a desktop and a home directory.

The next step is to create some useful folders on the desktop by default with relevant emblems. eg. Documents, Music, Images, Software. These directories need to be used properly by relevant applications. eg. Gimp and the screenshot taker should use 'Images' as their default folder, Rhythmbox should automatically add all songs in 'Music' to it's library, Abiword and gedit should save and open from 'Documents', etc... This helps to make the desktop more task based and better organized.

Note: You can access these folders quickly by pressing ALT+F2 to open a run dialog and typing in the name of the folder. The folder will be opened in nautilus.

Start Here

By Gnome 2.4 Desktop Preferences, Server Settings and System Settings will have been merged into a single 'Preferences' top level menu. That will leave only "Applications" and "Preferences" in start-here:// . Both of these items will be top level menus on the panel and will hopefully be accessible in nautilus via a "Browse ..." or "Edit ..." item in their context menus. This would make start-here redundant unless anything else has made it in there by then. So I would propose that it be removed from the desktop and nautilus.

Figure 2. A desktop without a separate home folder or a start-here folder. applications:// and preferences:// are accessed via the panel menu context-menu instead.

The File Selector

The file selector should continue the metaphor of the desktop being one of the items at the top level of the hierarchy. The user should never have to browse from / to find their home directory. The user should not even need to know that their home directory is in /home. There should of course be a way to browse / - it just shouldn't be the default. The default should always be the desktop. Browsing 'Up' from desktop should not bring the user to /home as this would contradict the idea that Desktop is a top level item in the hierarchy.

Figure 3. This is a modified version of the file selector being worked on at http://home.wanadoo.nl/sbm/. Click to see the animated version.

The Nautilus Tree View

In the Nautilus tree view sidebar, I feel that / should not be the top level. There should be no single top-level: Desktop, /, Network Places and Removable Media should all be top level items, to fit in with the file selection dialog.

Figure 4. Mockup of an improved tree view.

The Desktop Metaphor

The idea of the desktop metaphor is that everything related to the user is either on or "below" the desktop (often synonymous with the "screen"). The root directory is what is on the hard-drive (often synonymous with the PC Box itself). These two entities and the distinction between them offer useful parallels:

my stuff V's system stuff = screen V's PC = desktop V's root file-system.

This visualization is very easy for users of all levels to understand and for even the most advanced user it can be very useful to have a distinction drawn between user space and system space.

Removable Media

The way we handle our removable media in Linux is far from desktop friendly. A lot of the time one has to browse out of home, into the / filesystem, and then to /mnt, just to browse a cd-rom or a floppy. There is also the issue of having to "mount" removable media. This issue should be overcome by the use of automount or magicdev, neither of which I'm going to go into as they should be configured by your distribution.

What I want to see is the user being about to browse removable media without breaking the desktop metaphor. I think that the best way to do this is to have media:// (or something similar, the name is not important) which is accessible from the nautilus tree view, the file selector(see screen-shots above) and the desktop(via an icon).

media:// would contain all removable devices on the system whether they are mounted are not. When browsing media:// in nautilus devices would be mounted/viewed by clicking on the icon, and ejected/unmounted via an item in the icon's context menu. Removable media devices should be treated as sub-directories of media:// so that they can be easily browsed, this is especially important when using the file selector or the tree view.

In this configuration, there would be no removable media icons on the desktop, and they would not be created on mount as is the current behavior. The 'Disks' item in the desktop context menu would also be removed. If a user wants to create an icon for a device on the desktop, they can copy one from the media:// , I feel that this is a better behavior that using the context menu. Also, it lets users decide which devices are shown on the desktop, the lack of this freedom is complained about often.

Network Places

There is an excellent new 'Network Servers' Feature in Gnome 2.1. I think that 'Network Places' is a better name because all of the computers on a network are not generally considered "servers" just because they are sharing some files on the network.

At present Network Servers is accessed via the applications menu, but I think that it should be a top level item in the file selector and nautilus tree view. It should also be linked to from the desktop.

Here is a screenshot of this new feature.

I don't think that user-mountable network mounts(in /etc/fstab) should be treated the same as local mounts. ATM This causes problems for people with a large amount of network mounts because their desktop fills with icons. Network mounts should be shown in Network Places whether mounted or not and should be addable to the desktop the in the same way as removable media.

Try it for yourself

A lot of people will respond to the idea of using their home folder as their desktop by saying: "My home folder is a mess, I don't want it all over my desktop". I was the same until I started writing this essay, but now I have a nicely organized desktop without the need for a home folder. here's what I recommend:

  • Open up your home folder and look at what's in it, try to classify what's in there.
  • With that in mind make some new folders on desktop (see Figure 2), I made Documents, Software, Website, Images and Music.
  • Give each of the folders an emblem(Properties->Emblems).
  • Now start dragging and dropping all the files and folders from you home folder into these folders, deleting files you don't want to keep, and creating new folders on the desktop only if absolutely necessary.
  • Once you have cleared your home folder, drag the folders you created on the desktop into your home folder along with anything else on your desktop(except things like home, trash and mount icons created by nautilus).
  • Open a console and run gconftool-2 -s /apps/nautilus/preferences/desktop_is_home_dir true -t bool
  • Log out of gnome and then back in again.

You now have no home folder as such, but everything you save to $HOME will show up on your desktop forcing you to keep you files organized as you go along. Believe me, this is a far superior way to organize your files. Once you take the plunge you will never miss your home folder.


  1. Program Folders in $HOME: some programs store their data in $HOME/{program-name} which means that their data folder will show up on the desktop. Kmail lets you change it's data directory from $HOME/Mail to anything you like and IMHO any program that doesn't should be considered to have a bug. It is more ideal to have programs store their data in $HOME/.{program-name} or something like $HOME/Data/{program-name} . The point has been made to me that there will always be data folders in $HOME. While I do feel that it is better to fix the applications, it might be useful to add a 'Hide Folder' item to the folders' context menu and a 'Show/Hide hidden folders' item to the desktop context menu.
  2. Desktop Launchers in $HOME: If you have any launchers on your desktop they can show up in the file selection dialog. Mozilla filters out non-html files but gnome and openoffice show all the .desktop files.

    Figure 5. Gnome, OpenOffice and Mozilla open file dialogs showing a $HOME that is being used as a desktop.

    There are two ways to solve this problem:
    • Improve the gnome file dialog so that is supports filtering. This will hopefully happen anyway but is not really a proper solution to the problem as it only effects the gnome files selection dialog.
    • Create a $HOME/.desktop-launchers folder where nautilus would keep it's desktop launchers. Nautilus would need to be modified for this to work but it would keep launchers out of your way while letting you access other "real" files on your desktop, so in my opinion this would be a good solution.
  3. Automatically generated files: As you can see in the screen-shot above, the nautilus Trash icon shows up as a file in the gnome file selection dialog. Ideally Trash and other automatically generated files would also end up in $HOME/.desktop-launchers. Although it would be more ideal if nautilus could be programmed not to create these files. Trash is always on the desktop anyway so it really shouldn't need to be recorded as a file.

Relevant Bugs

Gnome Panel
  • Bug 94112: Reconsider Panel Menus - A meta bug linking to and discussing bugs relevant to the the future development of the gnome panel and the gnome menu layout.
  • Bug 92719: Desktop Preferences should be a top level menu - Desktop preferences, System Settings and Server Setting are to be merged and made into their own top level menu.
  • Bug 93506: Cannot add menu items to menus which don't contain launchers: Contains info related to cleaning up the panel menu context menu and adding a "Browse" item which would allow us to browse applications: and settings: without needing start-here:.
  • Bug 94612: Move to ~/Desktop and adjust things to coexist with KDE - a discussion about where the desktop should be located. Includes a lot of arguments for using $HOME.
  • Bug 41671: Desktop lacks auto-arrange/'snap to grid' - If we are going to be using our desktop as $HOME we want out icons to 'snap to grid'
  • Bug 99347: cannot move mounted directory around desktop - once you've made the change it can be useful to mount partitions directly into $HOME. However this bug makes it a little tricky. Includes a work-around.
  • Bug 48470: Sidebar does not remember state - The tree view sidebar is almost useless at the moment because you have to select it every time. Nautilus should remember what sidebar was last used.
  • Bug 82884: Tree view focus doesn't follow file view pane - another bug that cripples the tree view sidebar.
  • Bug 44970: consider mount/automount issues - issues related to how nautilus will deal with removable media in the future.
  • Bug 45953: mounted devices (icons) on desktop are ignorant of position on desktop
  • Bug 62736: No way to disable mounted devices icon creation on the desktop.
  • Ximian Bug 18483: evolution folder conflicts with evolution launcher - $HOME/Evolution should be configurable.

Thanks for reading,
Mark Finlay

[1] The Redhat Network, Ximian's Red Carpet and other systems used by various Linux distributions are improving the situation. Redhat is my favorite distribution at the moment but where they are seriously lacking is an easy way to install a package from the cds with a simple command line argument. This is preformed in mandrake with urpmi packagename and would be very easy to do on redhat if they installed apt-get by default and apt enabled their cds. Anyway, that is totally unrelated to the desktop...

ANTI-FLAME DISCLAIMER: I do not claim that any or all of the ideas I have described in any way original. I know that it is impossible to be original nowadays. The fact that you can already do some of the things I have mentioned in Gnome shows that people have thought of these things before me. As does the fact that there are already bugs on almost all of these issues. In fact a lot of people already use their desktop as described in this essay. But it has taken me a year to discover this great new way of organizing my desktop and in an era of "reasonable defaults", I think that we should ship Gnome so that it behaves this way by default.