You are not logged in.

#1 2011-04-13 11:52:44

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 355
Website

Solution to ck-launch-session, compiz and mounting in thunar/udisks

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 :-)

Offline

#2 2011-04-13 12:51:33

jlindgren
Member
Registered: 2011-02-27
Posts: 256

Re: Solution to ck-launch-session, compiz and mounting in thunar/udisks

I believe you are correct, everything in the session needs to be a child of ck-launch-session in order to use ConsoleKit.

Offline

#3 2011-12-28 00:26:19

Joel
Member
From: Tijuana, BC, México
Registered: 2011-12-21
Posts: 121

Re: Solution to ck-launch-session, compiz and mounting in thunar/udisks

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 smile


* 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.

Offline

Board footer

Powered by FluxBB