TwinView - how to save 2 profiles for it?

I run a dell laptop and I am trying to get this to work so my 2nd primary desktop monitor will work with my laptop which will serve as the primary screen.

I can setup the twinview, and work all day, but when I go home I have to reconfigure it and so forth for the mornings when I hook up.

What can I do?

A quick and dirty solution would be to make two settings files, call them twinview.home and, then make a) if you’re clever, a single script that toggles them, or b) if that sounds complicated, two separate scripts that copy one of said settings files to the location twinview is looking at.

Then bind said scripts to keyboard shortcuts, or make desktop icons for them.

Not particularly elegant… but it’ll work. :slight_smile:

Or actually, it might not… I’ve never used twinview, so I don’t know whether changing the settings on the fly like that will work. You would presumably have to log back out and back in, or even reset, to get the settings to stick - not ideal. Unless you toggled them during boot…

Maybe you could have two separate users (‘diykev’ and ‘diykevoffice’, perhaps) with different settings, and a shared data partition? You’d have to set up the permissions so they could both access the data, and symlink to it. I’m sure that’s doable… and might work better than the above.

I suppose the first questions are: Where does twinview keep its settings? And does it have a nervous breakdown if you change them in the files while it’s running? What do you have to do to get it to notice such changes? Someone else would have to answer those…

There are numerous HOWTO’s describing this kind of dynamic display switching, but depends heavily on your graphics hardware and driver abilities. I assume you have nvidia graphics chipset from your reference to twinview. I have seen scripts similar to what Confuseling described (with most based on xrandr). Some examples of various approaches to give you some ideas on this:

Linux Tipps & More: Automatically switch to connected External Display on Boot with XRandR

XrandR « On The Road with Vicky Lamburn

Script for executing xrandr when Fn+F7 is pressed - openSUSE Forums