For configuring external displays, I'm successfully using the disper and autodisper tools.
It needs a bit of fiddling around, but you can comfortably bind it to a key combination and setup your displays the way you want them.
Basically, you connect your displays and then use disper to setup your screen.
Then you can save this configuration under a unique identifier using autodisper.
It will also remember which displays (i.e. name of the display) are connected where and use that information to automatically switch to the correct mode later on.
This way, I can simply switch to dual external monitors when I get to work, and switch back to the built-in display when I'm on the road.
I also wrote some scripts that I are activated by udev when I dock/undock and these will in turn call autodisper, so I can comfortably just dock my NB and it will switch to the external monitors. Docking/undocking can be recognized by the presence of a certain USB-device.
Some links to point you guys in the right direction:
https://github.com/wertarbyte/auto-disper
http://www.favias.org/post/automatic...on-auto-disper
http://blog.alex.bepple.de/276/
Also, here is the wrapper script that is called upon docking/undocking and after the gnome-login:
Filename: /sbin/display-setup-wrapper
Code:
#!/bin/bash
/bin/sleep 1
USER=`whoami`
if [ "$USER" == "<MY_USERNAME>" ]
then
export DISPLAY=:0
/home/<MY_USERNAME>/.Xdbus
/usr/local/bin/autodisper -c --force
/home/<MY_USERNAME>/.runsynergy
else
/bin/su - MY_USERNAME -c "export DISPLAY=:0; . /home/<MY_USERNAME>/.Xdbus; /usr/local/bin/autodisper -c --force; /home/<MY_USERNAME>/.runsynergy"
fi
(Note: I'm using synergy to control several machines with a single mouse/keyboard. Whenever your desktop changes, you need to restart synergy or you'll get strange results. That's what the .runsynergy stuff in the script is for. If you don't use synergy simply delete that part...)
UDEV-rules for docking/undocking
(put this in /etc/udev/rules.d/80-dell-docking.rules)
Code:
KERNEL=="1-1.1" RUN+="/sbin/display-setup-wrapper"
Also, a nifty feature of autodisper is that you can run a script (~/.autorandr/<CONFIG_NAME>/postswitch) after a switch has occured.
I just send a notification to the desktop (running gnome) showing me which config was activated...
Code:
#!/bin/bash
notify-send -t 10 "Auto Display Configuration" "Config \"Work\" is activated"
Sorry I don't have more details at the moment, it's been a while since I did that and I don't remember the specifics from the top of my head (and I'm too busy atm to investigate further).
Hope it helps some of you guys.
Kind regards,
Salline
P.S.: Anyone solved the hibernate-issues yet? Standby works on my machine, hibernate doesn't...
Bookmarks