#9 When using XGL, keytouch launches apps in display :0.0


Keytouch daemon is launched at boot time. The problem comes when using it with XGL.

As it's launched before XGL is running, the default display is :0.0 , but after XGL the display used is :1.0

The consecuences are, that users with XGL can't use keytouch properly. Because it launches apps in the other display and they have no borders, are always in foreground, and cannot be minimized nor moved..

I use Ubuntu, and I made a little workaround to solve this. Just a script launched at session start:


sleep 4
sleep 6
killall keytouch-acpid
killall keytouchd
daemon -r keytouch-acpid
daemon -r keytouchd

(ignore the xbinkeys line ;) )
I also use daemon because of some freezes of keytouch when I started to use it (maybe it's time to check if that's not necesary now)

Maybe an option for keytouch to launch apps in XGL? It would launch, in example, firefox this way:

DISPLAY=:1.0 firefox

That would solve the problem. I don't know any better or automatic way.


  • Logged In: YES
    Originator: NO

    I think it is more an XGL bug. But I will check if I can solve it.

  • hexion

    Logged In: YES
    Originator: NO

    It isn't a bug of XGL but a characteristic of it. It uses other display over the xorg one. XGL is on DISPLAY=:1.0 and XORG is on DISPLAY=:0.0

    The two X servers are running at the time and you can launch an application in any of then adding that prefix (DISPLAY=number) before the app's name.

    The problem is just that when Keytouch is launched XGL is not running yet, and the default display is :0.0 So, when XGL is running Keytouch will start applications in the wrong display causing this bug.

    The proof of this is that, if I kill keytouchd and keytouch-acpid and re-launch them while XGL is running, they will launch the applications in the correct display.

    There are 2 ways of dealing with this: One is with a box in the keytouch settings allowing to change the Display where you want to launch applications. This could be not the best solution for those who switch many times between XGL and non-XGL modes (but I don't think there's many people doing that).
    The other is (somehow) checking when the desktop is fully loaded and consulting the $DISPLAY variable (echo $DISPLAY) or using "xinfo | grep Xgl"

    Hope it helps

  • Logged In: NO

    I would also be interested in a fix for this as it is happening to me too. I have tried using the script, but it doesn't seem to work. However, if I manually kill keytouchd and start it again it will work properly.

  • hexion

    Logged In: YES
    Originator: NO

    Probably the script doesn't work for you because you haven't installed "daemon" application.

    Install it ("sudo aptitude install daemon" in Ubuntu) or delete "daemon -r" in 2 last lines.

  • Logged In: NO

    I just seen that in October the 2.4 beta was released. I'm wondering if this bug is corrected in the beta or being worked on for the 2.4 non-beta release. It's not much of a bug rather than a feature that is highly important to XGL users.


    • status: open --> closed-fixed
  • Fixed in 2.4.1