Using multiple monitors with Ubuntu, part 2: auto-disper
In part one of this post series, I explained how to use disper to simplify switching between display configurations on Ubuntu. In this post I will explore the next level of convenience: reusing display configurations.
Chances are, you have a couple of settings that together make up most of the situations in which you use your notebook. For instance, I use mine at home, at work and of course, on the go. These three scenarios cover more than 90% of my notebook use.
Now, I am lazy and I do not want to rethink time and time again which arguments to pass on to disper after turning on my notebook. So I use auto-disper, a little script by Stefan Tomanek, to save the respective display configurations. Let me show you.
Install auto-disper
cd
git clone git://github.com/wertarbyte/auto-disper.git
Now we need to put the script someplace that is on your path. I find ~/bin a convenient location. Ubuntu adds it to your $PATH by default.
If ~/bin does not exist yet, create it, then log out and log back in.
mkdir ~/bin
Let’s put auto-disper there.
cp ~/auto-disper/auto-disper ~/bin
Save configurations
Now use disper to configure the displays the way you want them. For instance, at home, I want to use only my external monitor:
disper -S
Then I tell auto-disper to save this as the home configuration:
auto-disper --save home
auto-disper uses the names of the attached monitors to identify configurations. For instance, my ~/.auto-disper/home/setup reads as follows.
display DFP-0: CMO
display DFP-1: LG L227W
Obviously, I have a 22” LG at home.
Reuse configurations
From now on, whenever you want to reuse a saved display configuration, just type
auto-disper --change
and auto-disper will detect and apply the appropriate configuration.
Again, you can go one step further and assign this command to a global hotkey, so you only have to hit, say, Super+F4 in most situations in order to configure the monitors the way you want them. Now that’s something I did not know how to do on Windows.
