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 run ubuntu on my macbook pro, with nvidia proprietary driver.

I've made a little hack script http://www.coldcode.net/2010/05/nvidia-auto-display.html which detects the presence/absence of an external monitor and switches the resolution accordingly.

Does anybody know of a better way to do that?

My script also works around specific issues of the nvidia partial xrandr implementation; assuming a xrandr compliant xorg driver, is there a way to do the same thing in a less hackish way?

share|improve this question
    
Not that I know of. Your script might be the best way of going about that at the moment; searching around I don't really see anything. –  Jacob Peddicord Sep 14 '10 at 15:56

2 Answers 2

Have you heard of disper ( http://willem.engen.nl/projects/disper/ ) ?

Also has a PPA under http://launchpad.net/~disper-dev/+archive/ppa

share|improve this answer
    
thank you, never heard of it, I'll give it a try –  ithkuil Nov 9 '10 at 19:41
    
thank you, I have been years looking for this. Works from the ppa. A minor inconvenient is that the -C/--cycle action (i.e. cycle between, primary, secondary, clones, extend) does work. Also it doesn't seem to be "automatic" (change upon connection of the new monitor), but much better that the crappy nvidia-settings. –  alfC Nov 2 '11 at 10:21

I've found that running gnome-display-properties (on 10.04 at least) will automatically detect and configure my resolution based on the monitors I have connected at the moment. Then I can simply dismiss it (using the 'Close' button, 'Apply' works also but requires confirmation which takes another click and is unnecessary). So I've added an icon to my topbar and so far that's been so much better than resetting X like I used to do that I've been to lazy to look for a one click solution or even an automatic one such as your script.

I have a large monitor at work but usually just use my laptop alone at home so its 2 clicks when I get to work in the morning and 2 when I get home.

Update:

Should have checked first. I'm actually NOT using the proprietary driver right now and I vaguely recall that's because having compiz effects was less important to me than not restarting X twice a day to switch monitors. So my answer may be completely useless to you. I'll delete if anyone can confirm that.

share|improve this answer
    
anyway it's nice to know that for normal drivers which fully implement xrandr we can enjoy this feature. Don't delete the answer, might be useful for other people –  ithkuil Oct 12 '10 at 21:39

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.