To detect the monitors I'm using disper, you can get it from the Wheezy and Sid repositories.
Let's open up our crontab.
crontab -eIf you're doing this for other users too, you may use
sudo crontab -eu <username>
Now add a new entry:
0-59 * * * * DISPLAY=:0.0 disper -ld auto > /dev/nullThis will automatically detect (-d auto) and list (-l) all monitors every minute.
Of course, you can also use xrandr:
Thanks to bammes for pointing me in the right direction regarding the display.
0-59 * * * * DISPLAY=:0.0 xrandr --auto > /dev/nullBoth of these commands will adjust your desktop automatically, which will do just fine for most users. The > /dev/null at the end discards all standard output instead of sending you emails. You will still receive error messages.
Thanks to bammes for pointing me in the right direction regarding the display.
No comments:
Post a Comment