Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am currently changing between my laptop and my external monitor with the NVidia X Server Settings program and I'm sure I'm doing it in a really dumb way:

I currently select the external monitor, set it from "Disabled" to "TwinView", then then select the laptop screen and change it to "Disabled". Then I press "Apply" and it's done. I do this in reverse when I need to disconnect.

It's the only way I've managed to switch monitors (both VGA and DisplayPort connections on my ThinkPad), and it's a really fiddly process which I have to perform multiple times per day.

enter image description here

However I really want to be able to switch with Fn-F8 or some other keyboard shortcut but this doesn't appear to work with any connection method. Is there anything better than I can do?

share|improve this question
    
I've wrestled with this issue too. I know that my Fn-F5 (or whatever it is) keyboard shortcut works in the rare occasion when I boot into windows. So, for at least some laptops, this keyboard shortcut works through software, not hardware. –  Firefeather Oct 12 '11 at 19:10
    
Fn-F5 turns wifi on and off, Fn-F8 enables and disables the touchpad it seems... –  Mr E Oct 12 '11 at 21:18
    
Can you please add your xorg.conf file? –  Bruno Pereira Oct 13 '11 at 0:55
    
@brunopereira81 : pastebin.com/QC4UnBve –  Mr E Oct 13 '11 at 23:09
    
Excellent, I just used the disper (disper --direction=left -e) and able to move the external display to left side. Good tool to have in place for developer and gaming enthusiasts. –  Nagendhiran Oct 12 '13 at 7:13
add comment

3 Answers

up vote 5 down vote accepted

The nvidia tool nvidia-settings can be used from command line, but is not capable to activate or deactivate screens. xrandr is not supported by the propietary NVIDIA-drvers.

To switch displays you can use the tool disper: disper on launchpad It's a command line tools, wich exactly fits your problem an is easy to use.

Some example scripts for automatic switching at startup can be found here: Ubuntuusers.de wiki

I use these scripts to switch my monitors. It works perfectly.

share|improve this answer
    
Thanks, I'm away from the office until next week but I'll give it a try then. –  Mr E Oct 13 '11 at 23:10
    
Disper is perfect, thanks! –  Mr E Oct 17 '11 at 11:17
add comment

You may be able to map a key to that function manually. IIRC there is an Icon in System settings called "Keyboard Shortcuts", if there is an option there to switch monitors or displays, then map that to the key combination you require.

share|improve this answer
add comment

You can use autorandr.

Auto-detect the connect display hardware and load the appropiate X11 setup using xrandr or disper

Automatically select a display configuration based on connected devices

See also:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.