LinuxSir.cn,穿越时空的Linuxsir!

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

谁知道openbox的双显示器设置

[复制链接]
发表于 2010-7-5 19:32:23 | 显示全部楼层 |阅读模式
我现在知道fluxbox的设置,但是不知道openbox如何设置。因为现在主要用openbox+pypanel,所以想弄个这个的双显示器。

我的显卡是ati的,用的闭源驱动。
知道的告诉我一下。

谢谢。
发表于 2010-7-6 01:12:37 | 显示全部楼层
`xrandr`

或者使用 gnome, kde, xfce, lxde 的图形工具。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-7-7 06:05:15 | 显示全部楼层
xrandr 设置的是xorg中的东西吧,我想要的是openbox中的设置,我都说了fluxbox我已经可以在双显示器上用了。所以显示的设置应该是没有问题。只是不知道openbox要如何作才能在双显示上都可以。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-7-9 22:48:24 | 显示全部楼层
Post by alvin_rxg;2101581
`xrandr`

或者使用 gnome, kde, xfce, lxde 的图形工具。


你说的对,我搜索了一下用xrandr来进行双显示设置。不错,可以实现。

下面是我从网上找的。我测试是可以的,我是A卡,用闭源驱动。



How To Setup Dual Monitors With XRandR
Posted by: Tavis J. Hampton on June 1st, 2009
3 Comments

xrandr-screens-scaled

Dual monitor setup in Linux has never been easier. While methods such as the xinerama extension sometimes drive people insane, using RandR (Resize and Rotate) is quick and painless. This will allow you to use both monitors as one big screen instead of two identical ones (cloning). Follow these simple steps to get started.

Note: This HOWTO assumes that you are using the opensource drivers for your video card (ATI or Intel). Nvidia and AMD proprietary drivers come with their dual screen components.

1. Setup your xorg.conf configuration file:

Edit it as root:

gksudo gedit /etc/X11/xorg.conf

(in GNOME) or

kdesudo kate /etc/X11/xorg.conf

(in KDE)

2. Create a subsection under the “Screen” section with the following.

SubSection "Display"
Depth 24
Modes "1440x900" "1440x900" #the resolutions of your monitors
Virtual 2880 800
EndSubSection

Xrandr will function without these xorg.conf lines, but it will limit the size of your desktop.

For my computer, I am using two monitors with 1440×900 resolution. If you have a different resolution, put those resolutions under “modes” and then combine the width of both for “virtual”. In other words, if you have a 1280×800 monitor, it would be “Virtual 2560 800?.

3. Save your changes, exit and restart X.

4. Now, you can setup your dual screens however you like. First find out some information about the screens. Open a terminal emulator and type:

xrandr -q

It should tell you the name of each screen and its current resolution. On my computer, my screens are “DVI-0? and “DVI-1?.

5. To make one large desktop including both screens, run this command:

xrandr --auto --output DVI-0 --mode 1440x900 --right-of DVI-1

DVI-0 is on the right, and DVI-1 is on the left.

6. Create a script called “startxrandr” to run this command whenever you want.

#!/bin/sh
xrandr --auto --output DVI-0 --mode 1440x900 --right-of DVI-1

7. Make sure to make the script executable

chmod a+x startxrandr

That is all it takes. You can play around with it and see all of xrandr’s commands by running “xrandr -help”.

Notes:

There are also a few GUI applications that allow you to control xrandr.  Check with your Linux distribution.

You can set xrandr to run when your display manager or desktop environment starts. See the its documentation for startup applications.

KDE and GNOME will automatically configure two screens correctly so that maximizing a window will only fill one of the screens. Some desktop environments do not yet have support for this. You will have to test the one you use. You should have no problems with Compiz.

You can have two monitors with different resolutions, which is useful if you are using a laptop connected to a larger monitor.

In KDE, each screen will automatically be a different activity, and you can apply different widgets on each.

Some applications, especially those that rely on SDL (like many Linux games), may not honor your xrandr settings. If you are lucky, it will just clone the game on both screens. For applications like Boxee, you will need to set the environment variable before starting it:

export SDL_VIDEO_FULLSCREEN_HEAD=1
回复 支持 反对

使用道具 举报

发表于 2010-7-9 23:54:26 | 显示全部楼层
我这两天还在写脚本, 最后还是选了lxrandr...很方便的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-7-11 12:19:28 | 显示全部楼层
只要设置好了,xorg.conf,然后在登录后执行一下保存的自己的配置的脚本,就可以了,很方便。我没有用过lxrandr。
回复 支持 反对

使用道具 举报

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

本版积分规则

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