Unifying ~/Desktop

Havoc Pennington hp at redhat.com
Sun Jun 9 21:49:59 BST 2002


Hi,

Having two concepts of "the desktop" is no good for users, and by
convenient coincidence GNOME has always used ~/.gnome-desktop which
sucks anyhow.

So I'd like to get this fixed. I can volunteer Red Hat developers
(Bero and I probably) to do both the GNOME and KDE patches.

My proposed approach is that we use a package something like this one:
 
   http://pobox.com/~hp/desktop-directory-utils-0.1.tar.gz

This package has ZERO dependencies. ;-) It's all shell scripts. I
propose putting it on freedesktop.org and giving CVS access to people
who currently maintain the GNOME and KDE equivalent functionality.

Here's what the package involves - I am totally willing to change any
of the details though:

 - there's a script desktop-directory-update, to be run on login
 - this script first ensures that ~/Desktop exists
 - then it runs all scripts in sysconfdir/desktop-directory/upgrade.d, 
   these scripts are supposed to migrate old setups such as
   ~/.gnome-desktop. My package currently installs a "gnome-upgrade" 
   script to this directory.
 - then it runs all scripts in
   sysconfdir/desktop-directory/populate.d, these scripts are supposed
   to populate ~/Desktop with default contents. My package currently 
   comes with with a "home-and-trash" script that creates empty files 
   Home.desktop and Trash.desktop - obviously it should do a bit
   more. ;-)

This is really simple, no dependencies, it's nice for sysadmins since
they can add scripts to upgrade.d or populate.d to put custom stuff on
the desktop, it's extensible for distributions, etc. I think KDE
currently has a dir of files that get placed in ~/Desktop by default -
we can have a script in populate.d that copies this dir over, so there
would be no loss of backward compat.

The big outstanding issue: we need to do Home and Trash in the same
way, or at least ignore each other's Home and Trash. In GNOME, both of
these are desktop files but with somewhat funky/nonstandard
contents. I think in KDE Home is a desktop file and Trash is a
directory? Worse, the filenames are ~/Desktop/Trash and
~/.gnome-desktop/Trash so they collide.

~/.gnome-desktop/Trash is special-cased anyhow, so it's possibly quite
easy for us to move to using a directory here. I haven't looked at it
yet.

The KDE Home desktop file on my system has:

  [Desktop Entry]
  Encoding=UTF-8
  Name=Home
  GenericName=Personal Files
  Exec=kfmclient openProfile filemanagement
  Icon=kfm_home
  Type=Application

And Nautilus creates this:

  [Desktop Entry]
  Encoding=Legacy-Mixed
  Name=hp's Home
  Type=X-nautilus-home
  X-Nautilus-Icon=temp-home
  URL=file:///home/hp

I propose something along these lines:

  [Desktop Entry]
  Type=Link
  Encoding=UTF-8
  Name=Home
  GenericName=Personal Files
  URL=file:///home/whoever
  Icon=home

And I'll investigate having GNOME treat a directory called
~/Desktop/Trash the same as the desktop file called
~/.gnome-desktop/Trash.

Comments? Can we get this fix adopted upstream if we make the patches?

Thanks for any help in solving this problem.

Havoc







More information about the kde-core-devel mailing list