Tue 2008/Aug/26
Predefined desktop items for Nautilus
Back in the Summer of Code 2007, Sayamindu Dasgupta worked on adding support for predefined desktop items to Nautilus. This is so that system administrators can set up desktop links that will appear on users' desktops. A university could set up an icon to take people to the university's intranet, for example.
Basically, I'm reviving Sayamindu's patch and bringing it up to date for the current Nautilus. The idea is that you set up a GConf key, /apps/nautilus/desktop/predefined_items_dir, and point it to a directory which holds .desktop files. This kind of indirection through a GConf key is what makes the scheme work nicely for deployments with Sabayon: sysadmins can have predefined items for various groups of users, and select among those by simply changing a mandatory GConf key for each user. This wouldn't be so easy if there were a hardcoded directory like /var/nautilus/global-desktop-items.
Sysadmins should be able to define mandatory items, which users cannot change or delete, and also "normal" items, which users can tweak or remove. Mandatory ones would be ones like "Company Intranet" or "Link to Helpdesk". Distros could use normal items for their marketing materials; the perenially hacky "Welcome to FooLinux" icons that currently are hard to do properly.
The problem I'm having is how to make non-mandatory items work. You want this behavior:
I'm leaning toward having two extra boolean values in .desktop files: an X-GNOME-Mandatory and X-GNOME-Deleted. If the "mandatory" value is false, then the user may change or delete the item. For changes, the item is copied from the predefined_items_dir to the user's ~/Desktop and that version is modified. For deletions, the item is copied there as well, but then the "deleted" flag gets turned on.
If the user wants an item back, he turns on "show hidden files" and those files get shown again. (Or we could hack the Trash to restore the item by turning off the "deleted" flag...)
If the sysadmin updates an item in the predefined_items_dir, this item will override items of the same name in users' desktops, based on the item's timestamp.
Does this make sense? Am I overlooking something?
Syndicated 2008-08-26 11:42:00 from Federico Mena-Quintero - Activity Log
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!