LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1141|回复: 7

我投降了,求教xrandr设置双屏显示的问题

[复制链接]
发表于 2008-12-3 09:57:55 | 显示全部楼层 |阅读模式
intel集成显卡,xorg升级以前用i810驱动,使用Xinerama即可。

但是升级xorg之后,驱动只能用intel了,而Xinerama不能用了。

听某位仁兄介绍说xrandr,找了一下资料,确实可以。不过却不能把程序从主显示器拖动到扩展显示器上。附xorg.conf
  1. Section "ServerLayout"
  2.         Identifier     "Xorg Configured"
  3.         Screen          0  "Screen0" 0 0
  4. # Serial Mouse not detected
  5. # USB Mouse not detected
  6. EndSection
  7. Section "ServerFlags"
  8.         Option "AllowMouseOpenFail"  "true"
  9.        
  10. EndSection
  11. Section "Files"
  12.         ModulePath   "/usr/lib/xorg/modules"
  13.         FontPath     "/usr/share/fonts/misc:unscaled"
  14.         FontPath     "/usr/share/fonts/misc"
  15.         FontPath     "/usr/share/fonts/75dpi:unscaled"
  16.         FontPath     "/usr/share/fonts/75dpi"
  17.         FontPath     "/usr/share/fonts/100dpi:unscaled"
  18.         FontPath     "/usr/share/fonts/100dpi"
  19.         FontPath     "/usr/share/fonts/PEX"
  20. # Additional fonts: Locale, Gimp, TTF...
  21.         FontPath     "/usr/share/fonts/cyrillic"
  22. #        FontPath     "/usr/share/lib/X11/fonts/latin2/75dpi"
  23. #        FontPath     "/usr/share/lib/X11/fonts/latin2/100dpi"
  24. # True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!
  25.         FontPath     "/usr/share/fonts/Type1"
  26.         FontPath     "/usr/share/fonts/ttf/western"
  27.         FontPath     "/usr/share/fonts/ttf/decoratives"
  28.         FontPath     "/usr/share/fonts/truetype"
  29.         FontPath     "/usr/share/fonts/truetype/openoffice"
  30.         FontPath     "/usr/share/fonts/truetype/ttf-bitstream-vera"
  31.         FontPath     "/usr/share/fonts/latex-ttf-fonts"
  32.         FontPath     "/usr/share/fonts/defoma/CID"
  33.         FontPath     "/usr/share/fonts/defoma/TrueType"
  34.         FontPath     "/usr/share/fonts/wqy-unibit"
  35. EndSection
  36. Section "Module"
  37.         Load  "ddc"  # ddc probing of monitor
  38.         Load  "dbe"
  39.         Load  "dri"
  40.         Load  "extmod"
  41.         Load  "glx"
  42.         Load  "bitmap" # bitmap-fonts
  43.         Load  "type1"
  44.         Load  "freetype"
  45.         Load  "record"
  46. #        Load  "synaptics"
  47. EndSection
  48. # Auto-generated by Archie mkxcfg
  49. Section "Monitor"
  50.         Identifier   "Monitor0"
  51. #        Option "Above" "Monitor1"
  52. EndSection
  53. # Auto-generated by Archie mkxcfg
  54. Section "Device"
  55.         Identifier  "Card0"
  56.         Driver      "intel"
  57. #        BusID                    "PCI:0:2:0"
  58. #        Option      "LVDS" "Monitor0"
  59. #        Option      "VGA" "Monitor1"
  60. #        Screen             0
  61. EndSection
  62. Section "Screen"
  63.         Identifier "Screen0"
  64.         Device     "Card0"
  65.         Monitor    "Monitor0"
  66.         DefaultDepth 24
  67.         SubSection "Display"
  68.                 Depth        24
  69.                 Modes         "1024x768" "1280x1024"
  70.                 Virtual 2048 768
  71.         EndSubSection
  72. EndSection
  73. Section "DRI"
  74.         Mode 0666
  75. EndSection
复制代码
发表于 2008-12-3 10:52:08 | 显示全部楼层
看看我的,或许对你有用  http://dpaste.com/95570/
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-3 12:50:17 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2008-12-4 00:12:09 | 显示全部楼层
我一直用 setdisplay.sh 这个脚本,本质上就是 xrandr.
  1. !/bin/sh
  2. case "$1" in
  3.     solo)
  4.         xrandr --output VGA --off --output LVDS --mode 1024x768
  5.         ;;
  6.     beamer)
  7.         xrandr --output VGA --mode 1680x1050 --same-as LVDS --output LVDS --mode 1024x768  
  8.         ;;
  9.     dual)
  10.         xrandr --output VGA --mode 1680x1050 --pos 0x0 --right-of LVDS --output LVDS --mode 1024x768 --left-of VGA
  11.         ;;
  12.     *)
  13.         echo "Usage ./setdisplay.sh solo|beamer|dual"
  14.         exit 1
  15.         ;;
  16. esac
  17. exit 0
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-4 08:44:58 | 显示全部楼层
我已经用xrandr将双屏设置出来了,但问题是应用程序都启动在左屏,无法用鼠标拖到右屏。
回复 支持 反对

使用道具 举报

发表于 2008-12-4 09:59:45 | 显示全部楼层
Post by channon;1918795
我已经用xrandr将双屏设置出来了,但问题是应用程序都启动在左屏,无法用鼠标拖到右屏。


那要你的 xrandr 是怎么写的了,和 xorg.conf 没太大关系。双屏启动之后把 xrandr 的输出贴出来看看。

如果双屏的位置是上下关系,拖动是要从上到下(抑或相反)的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-4 10:40:31 | 显示全部楼层
左边是笔记本屏幕,右边是外接的显示器。

鼠标可以穿越两个屏,但就像terminal那个窗口,只能向右拖到这个位置了。

在面板管理中也没有两个显示器的位置选择。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-4 10:55:59 | 显示全部楼层
改了一下xorg.conf,在面板管理中有两个显示可选了。

但程序还是无法拖到右边屏幕。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表