使opensuse12.1实现一拖二(拖机)的双人使用系统(下)

使opensuse12.1实现一拖二(拖机)的双人使用系统(下)

继续上篇的介绍。本章贴配置代码。

对于KDE环境来说主要配置以下两个文件:

/etc/x11/xorg.conf
/usr/share/kde4/config/kdm/kdmrc

先说xorg.conf,这个文件在新安装好系统后并不存在,我是在安装好nvidia驱动后,配置好显卡后保存的这个文件。这是一个最开始配置好的文件内容:
这个是已经配置好双头显示的文件。

 

# nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 295.49 (buildmeister@swio-display-x86-rhel47-03.nvidia.com) Tue May 1 00:35:28 PDT 2012 #这是一个由nvidia X window settings配置好的xorg.conf文件 Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" 0 0 Screen 1 "Screen1" RightOf "Screen0" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" Option "Xinerama" "0" EndSection Section "Files" EndSection Section "InputDevice" # generated from default Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" # generated from default Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" # HorizSync source: builtin, VertRefresh source: builtin Identifier "Monitor0" VendorName "Unknown" ModelName "CRT-0" HorizSync 30.0 - 75.0 VertRefresh 45.0 - 100.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor1" VendorName "Unknown" ModelName "AOC 2217" HorizSync 31.0 - 80.0 VertRefresh 56.0 - 75.0 EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 8200" BusID "PCI:2:0:0" EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 9500 GT" BusID "PCI:3:0:0" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "CRT: nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection

继续----→:

下面是一个完整的配置好的拖机的配置:
注意代码中有我添加的说明注释!

 

# nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 295.49 (buildmeister@swio-display-x86-rhel47-03.nvidia.com) Tue May 1 00:35:28 PDT 2012 #/etc/X11/xorg.conf file # PLEASE DO NOT EDIT THIS FILE! Section "Files" FontPath "/usr/share/fonts/misc:unscaled" FontPath "/usr/share/fonts/local" FontPath "/usr/share/fonts/75dpi:unscaled" FontPath "/usr/share/fonts/100dpi:unscaled" FontPath "/usr/share/fonts/Type1" FontPath "/usr/share/fonts/URW" FontPath "/usr/share/fonts/Speedo" FontPath "/usr/share/fonts/PEX" FontPath "/usr/share/fonts/cyrillic" FontPath "/usr/share/fonts/latin2/misc:unscaled" FontPath "/usr/share/fonts/latin2/75dpi:unscaled" FontPath "/usr/share/fonts/latin2/100dpi:unscaled" FontPath "/usr/share/fonts/latin2/Type1" FontPath "/usr/share/fonts/latin7/75dpi:unscaled" FontPath "/usr/share/fonts/baekmuk:unscaled" FontPath "/usr/share/fonts/japanese:unscaled" FontPath "/usr/share/fonts/kwintv" FontPath "/usr/share/fonts/truetype" FontPath "/usr/share/fonts/uni:unscaled" FontPath "/usr/share/fonts/CID" FontPath "/usr/share/fonts/ucs/misc:unscaled" FontPath "/usr/share/fonts/ucs/75dpi:unscaled" FontPath "/usr/share/fonts/ucs/100dpi:unscaled" FontPath "/usr/share/fonts/hellas/misc:unscaled" FontPath "/usr/share/fonts/hellas/75dpi:unscaled" FontPath "/usr/share/fonts/hellas/100dpi:unscaled" FontPath "/usr/share/fonts/hellas/Type1" FontPath "/usr/share/fonts/misc/sgi:unscaled" FontPath "/usr/share/fonts/xtest" FontPath "/opt/kde3/share/fonts" InputDevices "/dev/gpmdata" InputDevices "/dev/input/mice" EndSection Section "ServerFlags" Option "AllowMouseOpenFail" "on" Option "AutoAddDevices" "off" Option "ZapWarning" "on" Option "Xinerama" "0" EndSection Section "Module" Load "dbe" SubSection "extmod" Option "omit xfree86-dga" EndSubSection Load "type1" Load "speedo" Load "freetype" Load "glx" EndSection Section "Extensions" Option "Composite" "off" EndSection #以上部分代码并不存在于默认的xorg.conf文件中,原封不动添加即可 Section "InputDevice" # Driver "evdev" will be disabled unless 'Option "AutoAddDevices" "off"' # is set in "ServerFlags" section. Driver "evdev" Identifier "Keyboard0" Option "Device" "/dev/input/event0" Option "Protocol" "Standard" Option "XkbLayout" "us" Option "XkbModel" "microsoftpro" Option "XkbRules" "xfree86" EndSection Section "InputDevice" # Driver "evdev" will be disabled unless 'Option "AutoAddDevices" "off"' # is set in "ServerFlags" section. Driver "mouse" Identifier "Mouse0" Option "Buttons" "5" Option "Protocol" "auto" Option "Device" "/dev/input/mouse0" Option "Name" "USB Optical Mouse" Option "Vendor" "Sysp" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" # Driver "evdev" will be disabled unless 'Option "AutoAddDevices" "off"' # is set in "ServerFlags" section. Driver "evdev" Identifier "Keyboard1" Option "Device" "/dev/input/event3" Option "Protocol" "Standard" Option "XkbLayout" "us" Option "XkbModel" "microsoftpro" Option "XkbRules" "xfree86" EndSection Section "InputDevice" # Driver "evdev" will be disabled unless 'Option "AutoAddDevices" "off"' # is set in "ServerFlags" section. Driver "mouse" Identifier "Mouse1" #Option "Buttons" "5" Option "Device" "/dev/input/mouse1" Option "Name" "ImPS/2 Generic Wheel Mouse" Option "Protocol" "auto" #Option "Vendor" "Sysp" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection #以上代码配置鼠标和键盘 #Keyboard0和mouse0是一对配套使用的键盘和鼠标 #注意鼠标的driver有“mouse”和“evdev”两种,我的用“mouse”可以正常工作 #注意鼠标中Option "Protocol" "auto" #的“auto”改为 "ExplorerPS/2",鼠标滚轮才可正常工作 #可以用命令:ls /dev/input/mouse*列出所有鼠标 #命令:more /proc/bus/input/devices 列出所有键盘鼠标及 键盘的event 的ID号。 #****************************显示器*******************Section "Monitor" # HorizSync source: xconfig, VertRefresh source: xconfig Identifier "Monitor0" VendorName "Unknown" ModelName "CRT-0" HorizSync 30.0 - 75.0 VertRefresh 45.0 - 100.0 Option "DPMS" EndSection Section "Monitor" # HorizSync source: edid, VertRefresh source: edid Identifier "Monitor1" VendorName "Unknown" ModelName "AOC 2217" HorizSync 31.0 - 80.0 VertRefresh 56.0 - 75.0 Option "DPMS" EndSection #************ #上面是显示器的配置,对于crt显示器来说可以在上面的配置中更改刷新率。 #**下面是显卡的配置,默认即可 Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 8200" BusID "PCI:2:0:0" EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 9500 GT" BusID "PCI:3:0:0" EndSection #下面是屏幕的设置,有两个显示 Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "CRT: 1024x768_85 +0+0; CRT: nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "1680x1050_60 +0+0" SubSection "Display" Depth 24 EndSubSection EndSection #下面的配置是最终的终端与屏幕,键盘鼠标的搭配 Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" Option "Xinerama" "0" Option "Clone" "off" Option "AutoAddDevices" "off" EndSection Section "ServerLayout" Identifier "Layout1" Screen 1 "Screen1" 0 0 InputDevice "Keyboard1" "CoreKeyboard" InputDevice "Mouse1" "CorePointer" Option "Xinerama" "0" Option "Clone" "off" Option "AutoAddDevices" "off" EndSection

其次是kdmrc文件,配置如下:

#/usr/share/kde4/config/kdm/kdmrc [General] ConfigVersion=2.4 SUSEConfigVersion=2 StaticServers=:0,:1 ReserveServers=:2,:3 ServerVTs=-7 ConsoleTTYs=tty1,tty2,tty3,tty4,tty5,tty6 [Xdmcp] [Shutdown] [X-*-Core] ClientLogFile=.xsession-errors-%d [X-*-Greeter] LogoPixmap=/usr/share/kde4/apps/kdm/pics/kdelogo.png MinShowUID=500 MaxShowUID=65000 ForgingSeed=1268675635 UseTheme=true [X-:*-Core] [X-:*-Greeter] PreselectUser=Previous FocusPasswd=true LoginMode=DefaultLocal AllowClose=false #主要是下面两个设置,有仔细解说了 [X-:0-Core] TerminateServer=true ClientLogFile=.xsession-errors ServerArgsLocal=-nolisten tcp -layout Layout0 -sharevts -novtswitch [X-:1-Core] TerminateServer=true ClientLogFile=.xsession-errors ServerArgsLocal=-nolisten tcp -layout Layout1 -sharevts -novtswitch [X-:93-Core] TerminateServer=true [X-:0-Greeter]

如果想要GNOME也能成功拖机还要修改下面这个文件:

 /etc/gdm/custom.conf
反正我是两下环境下拖机都成功了。稍微注意看下就懂了。

# GDM configuration storage # # Note: settings from /etc/sysconfig/displaymanager have a higher priority # [servers] 0=Standard0 1=Standard1 [server-Standard0] name=Standard server command=/usr/X11R6/bin/X -nolisten tcp -novtswitch -sharevts -layout Layout0 flexible=true [server-Standard1] name=Standard server command=/usr/X11R6/bin/X -nolisten tcp -novtswitch -sharevts -layout Layout1 flexible=true [xdmcp] [greeter] [chooser] [debug]

好了,完 了,有想拖机的朋友可以做个参考。

转载于:https://my.oschina.net/u/592101/blog/68626

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/110362.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)
blank

相关推荐

  • 向量与矩阵范数_矩阵范数与谱半径的关系

    向量与矩阵范数_矩阵范数与谱半径的关系范数(norm),是具有“长度”概念的函数。在线性代数、泛函分析及相关的数学领域,范函是一个函数,其为矢量空间内的所有矢量赋予非零的正长度或大小。半范数反而可以为非零的矢量赋予零长度。举一个简单的例子,在二维的欧氏几何空间R就可定义欧氏范数。在这个矢量空间中的元素常常在笛卡儿坐标系统中被画成一个从原点出发的带有箭头的有向线段。每一个矢量的欧氏范数就是有向线段的长度。其中定义范数的矢量空间就是赋范矢

  • Fiddler 实现手机抓包详解

    Fiddler 实现手机抓包详解1、Fiddler简介Fiddler是一款强大的抓包工具,原理是以web代理服务器的形式进行工作的:2、Fiddler配置2.1允许监听httpsFiddler如果抓取https协议会话需要进一步配置,在Tools->Options菜单下,选择HTTPS标签并配置如下:2.2允许远程连接手机抓取需要配置远程连接,在Tools->Options菜单下,选择Connections标签并配置如下:监听端口8888并允许远程连接防火墙需要开放

  • Linux发邮件-ubuntu和centos

    Linux发邮件-ubuntu和centosLinux发邮件–ubuntu和centos当我用公司的服务器和虚拟机都尝试过发邮件之后,发现真是坑,Ubuntu和centos发邮件,安装配置都是有区别的;注意:这里是用第三方邮件发送邮件。直接上表格来对比吧,这个步骤亲测可用的,但是也要注意mailx的版本号。1、查看系统版本cat/etc/issue或uname-a2、查看邮件安装包版本(1)ub…

    2022年10月20日
  • java的线程安全、单例模式、JVM内存结构等知识学习和整理

    知其然,不知其所以然 !在技术的海洋里,前路漫漫,我一直在迷失着自我。欢迎访问我的csdn博客,我们一同成长!“不管做什么,只要坚持下去就会看到不一样!在路上,不卑不亢!” 博客首页:http://blog.csdn.net/u010648555在下面的题目来自于我要加的一个QQ群,然后要加这个QQ群,首先要通过进阶考核,也就是下面这些题,当我看到这些题目的时候。发现这些题目很常见,但是细细去研究

  • Eclipse SVN使用问题之 Attempted to beginRule

    Eclipse SVN使用问题之 Attempted to beginRule

  • 数据分析 — 五力模型 VS PEST(分析模型)VS SWOT分析法[通俗易懂]

    数据分析 — 五力模型 VS PEST(分析模型)VS SWOT分析法[通俗易懂]一、五力模型:1.供应商的讨价还价能力2.购买者的讨价还价能力3.新进入者的威胁4.替代品的威胁5.行业内现有竞争者的竞争二:PEST模型政治环境(PoliticalFactors)经济环境(EconomicFactors)社会环境(SocialandculturalFactors)技术环境(TechnologicalFactors)三、SWOT模型…

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号