The solution to this problem is not a .xsession script, but a custom tailored gnome session, just like unity, unity2d, gnome-classic are all varieties of the gnome desktop.
The Session file
Place this under /usr/share/gnome-session/sessions
and name it docky.session
[GNOME Session]
Name=Neither Ubuntu nor Gnome
Required=windowmanager;panel;filemanager;
Required-windowmanager=compiz
Required-panel=docky
Required-filemanager=nautilus
DefaultApps=gnome-settings-daemon;synapse;
The xsession file
Place this under /usr/share/xsessions
and name it docky.desktop
[Desktop Entry]
Name=Docky
Comment=This session logs you into Ubuntu
Exec=gnome-session --session=docky
TryExec=gnome-session
Icon=
Type=Application
X-Ubuntu-Gettext-Domain=gnome-session-2.0
It is just too much work to figure out which freedesktop stuff like DBus, policykit, gvfs has to be started in which order, just let the gnome-session do the heavy lifting and concentrate on what is considered essential.
EDIT: This works with 11.04 and gdm, but the session file format has changed in 11.10, so docky.session
needs to look like:
[GNOME Session]
Name=Docky
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;panel;launcher;
DefaultProvider-windowmanager=compiz
DefaultProvider-panel=docky
DefaultProvider-launcher=synapse
IsRunnableHelper=/usr/lib/gnome-session/gnome-session-check-accelerated
DesktopName=Docky
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
? – aquaherd Oct 04 '11 at 19:27I still can't mount partitions and the User Accounts section of gnome-control-center still segfaults. I'm installing gdb now to test the gnome-control-center issue.
– Clueless Oct 06 '11 at 16:10