My first HOWTO, so don't shout at me, if there is anything wrong
Let me know, if it's working on ATIs card too
Some parts borrowed from Official Gentoo HOWTOs.
Becouse I want to use TV-out only sometimes, eg. to watch movie, listen to music, play in DOOM, or show my little sister kids movie, in this time doing something on my lappy, I had to set up separate screens. So, get up and go work :]
At first, you had to made this in term:
Code:
$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
It will make backup of your x.org config file.
Now, apt-get nvtv by this:
Code:
$ sudo apt-get install nvtv
Next thing which you need to do is edit your xconf file.
Code:
$ sudo gedit /etc/X11/xorg.conf
First thing, which we will change in conf file, will be adding TV as next monitor and changing name of default monitor. Seek for Monitor section, and change monitor identifier to:
Code:
Identifier "Monitor[0]" #CRT
Now, under this section, add following:
Code:
Section "Monitor"
Identifier "Monitor[1]" #TV
HorizSync 60
VertRefresh 30-150
EndSection
If you need, change HorizSync and VertRefresh, but this values should work fine on most new TVs.
Second thing, which we will change in config file, will be adding TV-output as next device and changing name of default device. Seek for Device section, and change monitor identifier to:
Code:
Identifier "Device[0]"
In the same section add:
.
Now, under this section, add following:
Code:
Section "Device"
Driver "nvidia"
Identifier "Device[1]"
Screen 1
Option "TVOutFormat" "Composite" #or S-VIDEO etc
Option "TVStandard" "PAL-G" #or NTSC etc
Option "ConnectedMonitor" "Monitor[1]"
BusID "PCI:1:0:0" #adjust using 'lspci' or cat /proc/pci
EndSection
If you are in country which don't use PAL, change it to your TV standard.
Now, seek for Screen section, and change Identifier, Monitor and Screen to following:
Code:
Identifier "Screen[0]"
Device "Device[0]"
Monitor "Monitor[0]"
Under this add:
Code:
Section "Screen"
Device "Device[1]"
Identifier "Screen[1]"
Monitor "Monitor[1]"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection
And change/add to your config file serverlayout:
Code:
Section "ServerLayout"
Identifier "Simple Layout"
Screen 0 "Screen[0]"
Screen 1 "Screen[1]" RightOf "Screen[0]"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Remember to check name of your mouse and keyboard, and change it names. You can find names of input devices in Input device section as following:
Code:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection
Identifier is name of device. If name of your input device is diffrent, change Mouse1 or Keyboard1 from above server layout code to your needs.
Now save xorg.conf.
At now, we will add small bash feature, which will let us to run players on second screen easly.
Do following in terminal:
Code:
$ sudo gedit /etc/bash.bashrc
Add following section on end:
Code:
tv()
{
if [ "$1" == "" ]; then
echo "usage: tv program name"
else
DISPLAY=:0.1 $1
fi
}
And you will be able to run e.g. Totem on second display by typing in terminal (or ALT+F2 and checked "Run in terminal"):
Code:
$ tv totem movie.avi
Nice feature for Kubuntu users, which will allow them to run movies from context menu. If somebody know trick like this for GNOME, let me know.
Add this entry to:
Code:
~/.kde/share/apps/konqueror/servicemenus/nameofyourchoice.desktop
Code:
[Desktop Entry]
Actions=PlayOnTV
Encoding=UTF-8
ServiceTypes=video/*
[Desktop Action PlayOnTV]
Exec=mplayer -display localhost:1 %F
Name=Play this movie on TV
Icon=yast_tv
Before you ask! Check twice:
- did you changed names of all devices, screens and monitors in xorg.conf?
- did you rebooted Xs (by CTRL+ALT+Backspace)
- did you ended script in bash.rc by } ?
- did you close all sections in xorg.conf?
- did you installed nvtv?
Have a nice day!
Bookmarks