Hey there,
This is basically a thread to monitor progress at creating a program to quickly switch between nvidia twinview devices. The original thread was located in the Desktop Environments category, but since this is becoming a little more code oriented I will move everything here.
CURRENT WORKFLOW:
Currently, when operating in a twinview scenario with two displays and one television there is no way to have all three enabled at once. As a result, swapping between configurations is necessary.
Two primary methods have been suggested to accomplish this task. One is to create xorg.conf files for each desired configuration, copy over the /etc/X11/xorg.conf file and restart X. This is not an acceptable solution as it interferes with open work etc. The other solution is to open nvidia-settings, disable one active device and enable the other. Pressing apply will submit the changes to X "on the fly". This is not an acceptable solution as... well, my girlfriend doesn't like it, and it truly isn't very user friendly.
OBJECTIVE
Create a script, program or applet to quickly swap between configurations without an X reboot.
CAVEATS
Only certain features will be able to be switched without an X reboot. This is acceptable so long as you can disable the 2nd monitor and enable the TV on the fly (and back).
PROGRESS
I found the nvidia-settings source code here. I am using the 1.0 version as it is what is currently installed on my Gutsy release by default.
I found the relevant control to be in the file src/gtk+-2.x/ctkdisplayconfig.c
It would seem that the relevant nvidia function would be NvCtrlSetDisplayAttributeWithReply, located in src/libXNVCtrlAttributes/NvCtrlAttributes.c.
MORE
I am currently going through the limited documentation provided by nvidia. I am posting this for people who have done this before, would like to contribute, want to monitor my (slow) progress, or know of another application that achieves the listed objective. Tnx all
PS Ignore the stupid subject for this thread, the wrapper is done for GTK so I was thinking GTK when I wrote it, the code is obviously in C.
Bookmarks