显示标签为“linux”的博文。显示所有博文
显示标签为“linux”的博文。显示所有博文

2007-11-15

Dell 640m的双显示器配置

参考了一下Ubuntu论坛里一个帖子,配置好了双显示器,也算是把多出来的一个显示器利用上了。这里是xorg.conf的后半部分:

Section "Device"
BoardName "945 GM"
BusID "0:2:0"
Driver "i810"
Identifier "Device[1]"
Option "MonitorLayout" "CRT,LFP"
Screen 1
VendorName "Intel"
EndSection

Section "Device"
BoardName "945 GM"
BusID "0:2:0"
Driver "i810"
Identifier "Device[0]"
Screen 0
VendorName "Intel"
EndSection

Section "Monitor"
DisplaySize 340 270
Identifier "Monitor[0]"
ModelName "DELL 1708FP"
VendorName "DELL"
Option "DPMS"
HorizSync 31-80
VertRefresh 56-75
EndSection

Section "Monitor"
DisplaySize 305 230
Identifier "Monitor[1]"
ModelName "DELL 1280X800 LAPTOP"
VendorName "DELL"
Option "DPMS"
HorizSync 30-67
VertRefresh 30-60
EndSection

Section "Screen"
Device "Device[0]"
Identifier "Screen[0]"
Monitor "Monitor[0]"
DefaultDepth 24
SubSection "Display"
Modes "1280x1024" "1152x864" "1024x768" "800x600" "720x400" "640x480"
EndSubSection
EndSection

Section "Screen"
Device "Device[1]"
Identifier "Screen[1]"
Monitor "Monitor[1]"
DefaultDepth 24
SubSection "Display"
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
Option "Clone" "off"
Option "Xinerama" "on"
Screen "Screen[1]" leftof "Screen[0]"
Screen "Screen[0]"
InputDevice "Synaptics Touchpad"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
EndSection

Section "DRI"
Mode 0666
EndSection

Xinerama模式非常好用,笔记本屏幕的和外接的DELL LCD显示器都可以打到最大分辨率;如果按ctrl_alt_"num +"或者ctrl_alt_"num 1",还可以即时切换鼠标指针所在屏幕的分辨率,在外接投影仪时很方便。让我很纳闷的是,配置里“Screen "Screen[0]"”这一句必须写在screen[1]的后面,不知道是什么原因。

2007-08-27

原来还有个脚本叫ssh-copy-id

才发现openssh-client里有个脚本叫做ssh-copy-id,看了看openssh官方CVSweb中的代码,也没有找到,它从那里冒出来的?根据Debian包里的ChangeLog记录,1999年这个脚本就被加进去了,奇怪一直都没注意到它。原来都用这个脚本来把自己的ssh公钥发布到服务器上:
#!/bin/sh
ssh "$target" 'test -d .ssh || mkdir -m 0700 .ssh ; cat >> .ssh/authorized_keys && chmod 0600 .ssh/*' < ~/.ssh/id_rsa.pub
现在可以舍弃了,据说ssh-copy-id兼容性更好。