Sep 22
Nvidia switch screen to HDMI with an hotkey
For those who, like me, are stuck with the nvidia binary drivers on their laptops.
I use external HDMI quite often to connect to external monitors, both in office and at home. The gnome “Monitors” thing fails to detect monitors, so that I needed to clicki-clicki through nvidia-settings to enable/disable the external monitor.

Where is my laptop panel??
Using nvidia-setting works, but requires at least 10-15 mouse clicks to enable the HDMI-attached one and disable the laptop panel. boring.
Disper
Disper is ??a switcher utility for nvidia cards. Works like a charm. I can switch to the laptop screen using disper -S and to the hdmi screen using disper -s. Cool. Keybinds Alt+F8 and CTRL+F8 is what I wanted.
Quick Howto
Download the code from launchpad or from tar
$ bzr branch lp:disper
then use cave to import in unpackaged
$ cd disper
$ make DESTDIR=/tmp/diper-root install
$ sudo chwon -R root:root /tmp/disper-root
$ sudo cave import -l /tmp/disper-root media-video/disper scm -x
At this point check if disper really works for you and how. Write down used commands
To enable keybindings, simply open gconf-editor, and then:
- go to apps -> metacity ->keybinding_commands
- Double click on command_1 and enter the command to enable the external monitor (in my case /usr/bin/disper -s)
- Do the same for command_2 with the command to enable the laptop panel.
- Go to ??apps -> metacity -> global_keybindings
- Double click on command_1 and enter <Alt>+F8 (note, the <> are needed for special keys)
- Double click on command_2 and enter <Ctrl>+F8
- Done
