当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 在Hoary中设置TV-out(NVIDIA)
帖子发表于 : 2005-04-08 13:14 
头像

注册: 2005-03-26 9:38
帖子: 521
送出感谢: 0 次
接收感谢: 0 次
HOWTO: TV-out in Hoary (nVidia?) (From Ubuntu WebForums)
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:

Code:
screen 0.
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!


页首
 用户资料  
 
2 楼 
 文章标题 : HOWTO:在Hoary中设置TV-out(NVIDIA)
帖子发表于 : 2005-04-08 15:09 
头像

注册: 2005-04-06 21:15
帖子: 2200
地址: 安徽黄山
送出感谢: 0 次
接收感谢: 0 次
这是我的第一个HOWTO,所以如果不正确请不要骂我,如果有什么问题请你告诉我,如果你用的是ATI的显卡也请告诉我。

一些部分参考了Gentoo的HOWTOs。

由于有时我想使用TV-out功能,比如看电影、听音乐、玩DOOM,或是一边放些儿童片给我的小妹妹,一边在我的本本(lappy)上做点事情,我需要设置分屏显示。所以,让我们开始吧:

首先,你需要输入这条命令:

代码:
$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
这将会备份你的x.org设置文件
然后,这样apt-get下来 nvtv

代码:
$ sudo gedit /etc/X11/xorg.conf
首先我们需要给默认的显示器改名并且添加另一个显示器设备。查找显示器设备,改变它的设置:

代码:
Identifier "Monitor[0]" #CRT
好,完成这部分后,添加如下部分:

代码:
Section "Monitor"
Identifier "Monitor[1]" #TV
HorizSync 60
VertRefresh 30-150
EndSection
如果你需要,可以改变垂直同步和刷新频率,使得它在大部分的新电视上能工作的更好。
然后,我们将通过改变设置文件,改变默认设备的名称并将TV-output添加为第二个设备。找到设备部分,改变显示器设备的配置文件:

代码:
Identifier "Device[0]"
再同样的添加:

代码:
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
如果你的国家不使用PAL制式,请改变你的TV设置。
好,找到屏幕设置部分,改变设置,显示器和屏幕这么设置:

代码:
Identifier "Screen[0]"
Device "Device[0]"
Monitor "Monitor[0]"
下面再添加:

代码:
Section "Screen"
Device "Device[1]"
Identifier "Screen[1]"
Monitor "Monitor[1]"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection
记住检查并设置你的鼠标和键盘型号,你能找到输入设备和输出设备部分的设置就比如这样:

代码:
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是设备名,如果你的输入设备名不一样,请按需要设置Mouse1或Keyboard1 来覆盖掉系统设置代码。然后当然是保存 xorg.conf文件了。
现在,我们将要添加一个简短的bash特征,可以让我们更方便的在第二个视频设备上运行播放器软件。
在终端里这样输入:

代码:
$ sudo gedit /etc/bash.bashrc
在末尾添加如下内容:

代码:
tv()
{
if [ "$1" == "" ]; then
echo "usage: tv program name"
else
DISPLAY=:0.1 $1
fi
}
你可以通过终端试着运行Torem播放机在第二个显示设备(ALT+F2然后在终端里运行):

代码:
$ tv totem movie.avi

对于Kubuntu的用户很方便,可以通过下拉菜单来播放电影。如果你知道如何在GNOME里也实现类似的效果,请告诉我。添加如下内容:

代码:
~/.kde/share/apps/konqueror/servicemenus/nameofyourchoice.desktop

代码:
[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
问问题之间,请检查两遍:
你在xorg.conf里改变了所有的设备(device)、屏幕(screen)和显示器(monitor)没有?
你有没有重启X(CTRL+ALT+Backspace)?
你有没有在xorg.conf中关闭所有部分?
你有没有安装 nvtv?

祝你好运!


_________________
生命不息,灌水不止,我师父是白娘子.另热烈庆祝本人blog访问量突破2w大关.
被高手bs,向小白显摆.


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2006-08-01 4:41 
头像

注册: 2005-07-02 14:41
帖子: 4133
系统: Ubuntu 14.04 (Kylin)
送出感谢: 53
接收感谢: 11
不知道有没有过时,先放着


_________________
https://weakish.github.io


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2006-08-01 4:41 
头像

注册: 2005-07-02 14:41
帖子: 4133
系统: Ubuntu 14.04 (Kylin)
送出感谢: 53
接收感谢: 11
不知道有没有过时,先放着


_________________
https://weakish.github.io


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译