I'm running a fully updated Ubuntu 11.10 install and I've been using LightDM to launch a "User Defined Session" which executes the .xsession script in my home folder. The script that I have written runs perfectly with the exception that I can not mount partitions in nautilus or access the User Accounts entry of System Settings. I presume this is a problem with policykit not starting correctly due to a problem with my script. Any help would be appreciated.

My .xsession:

#! /bin/bash
ck-launch-session dbus-launch compiz &
ck-launch-session dbus-launch gnome-settings-daemon &
ck-launch-session dbus-launch docky &
ck-launch-session dbus-launch synapse
  • Did you try to manually start /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1? – aquaherd Oct 4 '11 at 19:27
  • @aquaherd I just tried that and it gives me a warning but continues to run: '(polkit-gnome-authentication-agent-1:8642): polkit-gnome-1-WARNING **: Failed to register client: The name org.gnome.SessionManager was not provided by any .service files ' I 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 6 '11 at 16:10
  • It appears that you will need to launch a lot of gnome daemons to get nautilus behave. Is this really what you want? I'll check and retry to recreate your custom session and be back soon. – aquaherd Oct 6 '11 at 17:43
  • It would be great to get nautilus and gnome in general to behave in my custom session, I'm comfortable with running the other daemons but I'm also willing to compromise if it proves to be too difficult. I could always just mount internal drives/partitions using the fstab but then I still experience the problem with external drives that are attached infrequently. It also seems that the problem isn't specific to nautilus as I get the exact same error using Marlin and PCManFM. – Clueless Oct 6 '11 at 18:08
  • Oh I nearly forgot, thanks a lot for the help, I realise that I'm fairly uninformed and likely punching above my weight but I'd love to figure this out if for nothing else but to satisfy my curiosity; I've been trying to get this sorted for a long time and it's become quite frustrating to still have it unresolved. Again, thank you in advance. – Clueless Oct 6 '11 at 18:12

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

The xsession file

Place this under /usr/share/xsessions and name it docky.desktop

[Desktop Entry]
Comment=This session logs you into Ubuntu
Exec=gnome-session --session=docky

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]
  • Sorry for not accepting your answer sooner, I was having some other problems with Ubuntu at the time and decided to try out Arch again. On top of that Uni life has been pretty hectic. Your solution did work but I was still encountering a few issues with nautilus and other file managers however I also encountered them in Gnome-Shell. An update seemed to of fixed this inconsistency with non-Unity DE's and it does now work. Thank you for all of the time that you put into this, I do appreciate it. – Clueless Nov 6 '11 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.