Comment 8 for bug 330258

Revision history for this message
Lorant Nemeth (loci) wrote :

I'm trying to set up the same docking/undocking functionality with disper as xrandr doesn't give valuable output (using T61P with nvidia Quadro FX 570M):

loci@kolibri:~$ xrandr -d :0.0 --verbose|grep conne
xrandr: Failed to get size of gamma for output default
default connected 2560x1024+0+0 (0x4da) normal (normal) 0mm x 0mm

disper however works like a charm from within the X session, but not from the script. While playing with the script I found an interesting scenario:

- open gnome-terminal
- disper -l works with normal user
- sudo su -
- disperl -l works fine
- root@kolibri:~# echo $DISPLAY
:0.0
- unset DISPLAY
- disperl -l says No suitable backend found
- DISPLAY=:0.0
- disperl -l says No suitable backend found

So disper works after sudo su -, but if I unset and set DISPLAY to the same value (:0.0) it doesn't. XAUTHORITY=/var/run/gdm/auth-for-username-sesstionstring/database in both cases, HOME=/root.

Was anybody able to set up a script which can handle the dock event and change settings based on connected device types/numbers?