SL0MO
January 8th, 2006, 04:15 PM
Yesterday I was looking for a one-click solution for cloning display on tv (as easy as possible)
so my girlfriend can use it to watch Sex and the City.
i.e. like this:
http://img302.imageshack.us/img302/9826/screenshot6ft.png (http://imageshack.us)
Clicking on the green tv : output to tv (and monitor, so she can start the episode with the mouse and then go to the tv)
Clicking on the red tv : only output to monitor + turn tv off.
No further commandline or GUI are involved. Just two buttons.
My tv is too far away from my pc so "twinview" or "switch screen" was not an option.
These steps work for me, but are in no way a general "how-to" for your system.
Maybe it works, maybe not. Maybe you'll find some usefull info and make it work on your system too.
PLEASE don't just copy/paste the commands, you need to change them according to your own system/needs.
my setup:
-os: Ubuntu 5.10
-video card :NVIDIA Corporation NV28 [GeForce4 Ti 4200 AGP 8x]
-drivers : nvidia-glx 1.0.7667-0ununtu25.1 (from synaptic)
-tv : old JVC (PAL)
-connection : S-VIDEO
steps:
1. remove nvtv if installed
2. install nvidia-glx (synaptic)
Maybe opensource drivers "nv" works, I just took the official nvidia one from the repos.
3. download nvtv source and untar (http://sourceforge.net/projects/nv-tv-out/)
4 open nvtv-[version]/src/nvtv.c and find the line
"static OptIntDecl opt_set_list []" and add
{"TV_Hoffset", min: -50, max: 50, SET_FIELD(tv_hoffset)},
{"TV_Voffset", min: -50, max: 50, SET_FIELD(tv_voffset)},
{"Monitor_Hoffset", min: -50, max: 50, SET_FIELD(mon_hoffset)},
{"Monitor_Voffset", min: -50, mash "/home/bert/documents/scripts/starttv"x: 50, SET_FIELD(mon_voffset)},
just before "{NULL}" to the array.
-> this way you can specify offset parameters via command line because
on my tv part of the image was not visible and I don't wanted to use the nvtv GUI.
5. save the file
6. compile and install nvtv
-> see nvtv-[version]/INSTALL for instructions
(configure,make,.. you will need to install some extra packages maybe)
6. make nvtvd to start at boot:
sudo echo "nvtvd" >> /etc/init.d/nvtvd
sudo chmod +x nvtvd
sudo update-rc.d nvtvd start 50 2 .
Don't know if this is the right way but works for me.
Maybe you have to check that position 50 is after position of nvidia-glx.
7. Create a file called "starttv" with contents
xrandr -s 800x600 -r 60
nvtv -t -r 800,600 -s Medium -S PAL -C SVIDEO --set Monitor_Hoffset:-4
->change resolution and refreshrate so (my) tv can handle it and
start nvtv with parameters needed for your tv, check "nvtv --help" for options.
I used Monitor_Hoffset and not TV_Hoffset for some reason that only works.
8. Create a file called "stoptv" with contents
nvtv -m
sleep 1
xrandr -s 1280x1024 -r 75
->turn off tvout and restore resolution + refreshrate of pc,
"sleep 1" otherwise my screen is not responding.
9. Download my two icons and save them somewhere.
http://img313.imageshack.us/img313/466/tvon2ny.png (http://imageshack.us)
http://img305.imageshack.us/img305/3199/tvoff1ch.png (http://imageshack.us)
10. Add two shortcuts to startv and stoptv together with the icons
on your gnome taskbar. (i.e. sh /home/username/scripts/starttv)
11. Done
PS : On my system I have to leave the s-video cable unplugged
until Gnome has booted, otherwise I have no tvout for some reason.
so my girlfriend can use it to watch Sex and the City.
i.e. like this:
http://img302.imageshack.us/img302/9826/screenshot6ft.png (http://imageshack.us)
Clicking on the green tv : output to tv (and monitor, so she can start the episode with the mouse and then go to the tv)
Clicking on the red tv : only output to monitor + turn tv off.
No further commandline or GUI are involved. Just two buttons.
My tv is too far away from my pc so "twinview" or "switch screen" was not an option.
These steps work for me, but are in no way a general "how-to" for your system.
Maybe it works, maybe not. Maybe you'll find some usefull info and make it work on your system too.
PLEASE don't just copy/paste the commands, you need to change them according to your own system/needs.
my setup:
-os: Ubuntu 5.10
-video card :NVIDIA Corporation NV28 [GeForce4 Ti 4200 AGP 8x]
-drivers : nvidia-glx 1.0.7667-0ununtu25.1 (from synaptic)
-tv : old JVC (PAL)
-connection : S-VIDEO
steps:
1. remove nvtv if installed
2. install nvidia-glx (synaptic)
Maybe opensource drivers "nv" works, I just took the official nvidia one from the repos.
3. download nvtv source and untar (http://sourceforge.net/projects/nv-tv-out/)
4 open nvtv-[version]/src/nvtv.c and find the line
"static OptIntDecl opt_set_list []" and add
{"TV_Hoffset", min: -50, max: 50, SET_FIELD(tv_hoffset)},
{"TV_Voffset", min: -50, max: 50, SET_FIELD(tv_voffset)},
{"Monitor_Hoffset", min: -50, max: 50, SET_FIELD(mon_hoffset)},
{"Monitor_Voffset", min: -50, mash "/home/bert/documents/scripts/starttv"x: 50, SET_FIELD(mon_voffset)},
just before "{NULL}" to the array.
-> this way you can specify offset parameters via command line because
on my tv part of the image was not visible and I don't wanted to use the nvtv GUI.
5. save the file
6. compile and install nvtv
-> see nvtv-[version]/INSTALL for instructions
(configure,make,.. you will need to install some extra packages maybe)
6. make nvtvd to start at boot:
sudo echo "nvtvd" >> /etc/init.d/nvtvd
sudo chmod +x nvtvd
sudo update-rc.d nvtvd start 50 2 .
Don't know if this is the right way but works for me.
Maybe you have to check that position 50 is after position of nvidia-glx.
7. Create a file called "starttv" with contents
xrandr -s 800x600 -r 60
nvtv -t -r 800,600 -s Medium -S PAL -C SVIDEO --set Monitor_Hoffset:-4
->change resolution and refreshrate so (my) tv can handle it and
start nvtv with parameters needed for your tv, check "nvtv --help" for options.
I used Monitor_Hoffset and not TV_Hoffset for some reason that only works.
8. Create a file called "stoptv" with contents
nvtv -m
sleep 1
xrandr -s 1280x1024 -r 75
->turn off tvout and restore resolution + refreshrate of pc,
"sleep 1" otherwise my screen is not responding.
9. Download my two icons and save them somewhere.
http://img313.imageshack.us/img313/466/tvon2ny.png (http://imageshack.us)
http://img305.imageshack.us/img305/3199/tvoff1ch.png (http://imageshack.us)
10. Add two shortcuts to startv and stoptv together with the icons
on your gnome taskbar. (i.e. sh /home/username/scripts/starttv)
11. Done
PS : On my system I have to leave the s-video cable unplugged
until Gnome has booted, otherwise I have no tvout for some reason.