CAPTCHA
Image CAPTCHA
Enter the characters shown in the image.
This question is for testing whether or not you are human.
  • Create new account
  • Reset your password

User account menu

Home
The Hyperlogos
Read Everything

Main navigation

  • Home
  • My Resumé
  • blog
  • Howtos
  • Pages
  • Contact
  • Search

Howto toggle dual monitors with nVidia on Linux

Breadcrumb

  • Home
  • Howto toggle dual monitors with nVidia on Linux

I have two LCDs and Ubuntu, and I want to use compositing so I can use Compiz. Xinerama still doesn't work with Composite outside of Xgl, which was deprecated some years ago. I want to play full screen games but they don't properly span monitors in many cases, even if that's what I wanted. What is needed then is a way to easily toggle the second monitor. I found it in the Ubuntu forums archive in the form of Disper.

After installing disper the following script works for me:

#!/bin/sh
#
# toggle dual monitors with disper
#
disper -lv 2>&1 | grep associating && disper -d auto -e || disper -d DFP-0 -e

Hope it works for you, too. You may need to change "DFP-0" to something else, like "CRT-0" depending on how the monitor is connected. Try disper -lv for more ideas. I bound it to XF86Explorer using Compiz (after unbinding it since XF86Home effectively does the same thing, and I have a home key too) so now the icon on my keyboard that most looks like a monitor will toggle between the two.

howto
nVidia
Ubuntu

drink

15 years ago

Permalink

Here are some additional, related, more complex solutions:

nvidia display control on the thinkpad *
Automatic screen configuration with auto-disper

  • Log in or register to post comments
  • Log in or register to post comments

Footer menu

  • Contact
Powered by Drupal

Copyright © 2025 Martin Espinoza - All rights reserved