After lots of hours trying to figure out why thunar would not mount with something like
$ cat .xinitrc ck-launch-session dbus-launch compiz ccp & thunar
I came up with two things:
That instance of thunar will not mount. Nor anything else that mounts through udisks
If I run thunar through a compiz hotkey instead of .xinitrc, that one DOES work
Thunar didn't mount if I ran it as dbus-launch thunar, but did show the "mountable media icons".
So I read and read and read how ck-launch-session works, and I found out the problem.
ck-launch-session passes an enviroment variable to it's child (in this case, compiz).
Thunar, and anything else executed inside .xinitrc don't get this enviroment variable, because they're not children of ck-launch-session, or compiz.
I fixed this with a dirty hack:
$ cat .xinitrc ck-launch-session dbus-launch $HOME/.startcompiz $ cat $HOME/.startcompiz compiz ccp & thunar & etc\ \:-\)
Now everything started by xinitrc is a child of ck-launch-session, so everything consolekit-related, and udisks-related works perfectly.
Can some-one else step up, and:
Make sure this is 100% right.
Tell me if there's a less hacky way to fix this.
Tell me if I should document this on the wiki or not :-)
Hope this helps lots of people, even if it's dirty :-)
I believe you are correct, everything in the session needs to be a child of ck-launch-session in order to use ConsoleKit.
I'd like to post in this (maybe) old topic to say thanks to the member hobarrera, because it helped me in my debian machine about the same problem of using ck-launch-session's.
Now, I don't use any display manager, which are faster boot, use a window manager and let my script call the other apps, I'm sharing with you my codes:
#!/bin/bash # ~/.bash_profile if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then startx &>/dev/null fi
#!/bin/bash # ~/.xinitrc # see https://bbs.archlinux.org/viewtopic.php?id=116853 exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "$HOME/.startcompiz"
#!/bin/bash # ~/.startcompiz exec /usr/bin/compiz & wmpid=$! export GTK2_RC_FILES="$HOME/.gtkrc-2.0" sh "$HOME/.fehbg" lxpanel & wicd-gtk & xscreensaver -no-splash & wait $wmpid
Happier linux user
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.
* AUR contributor.