对于工作,我正在开发一个非常专业化的软件,它需要运行两个全屏应用程序,每个显示器上一个。为了简单起见,我目前使用的是具有AMD Radeon HD图形卡的LUbuntu 64位(目前无法回忆当前的确切版本,但它相当新颖)。Linux强制应用到特定显示器上的全屏
如果可能的话,我想坚持使用SDL2,但是如果我需要对它进行一些黑客行为或移动到不同的库,那么我对此很满意。
所以,我的问题是,是否有可能在Linux的不同显示器上运行两个全屏应用程序(如果需要,我需要采取什么样的设置步骤)?列举显示器以获取其左上角的x/y位置是我最好的选择,所以我可以告诉SDL将我的窗口移动到该显示器上进行全屏显示?
注意:我没有发布到askubuntu,因为我不确定这个问题严格围绕Ubuntu平台。
更新:
下面是xrandr -q
输出:
Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 3200 x 3200
DFP1 disconnected (normal left inverted right x axis y axis)
DFP2 disconnected (normal left inverted right x axis y axis)
DFP3 disconnected (normal left inverted right x axis y axis)
DFP4 disconnected (normal left inverted right x axis y axis)
DFP5 disconnected (normal left inverted right x axis y axis)
DFP6 disconnected (normal left inverted right x axis y axis)
DFP7 disconnected (normal left inverted right x axis y axis)
DFP8 disconnected (normal left inverted right x axis y axis)
DFP9 connected 1920x1080+1280+0 (normal left inverted right x axis y axis) 533mm x 312mm
1280x1024 50.0 + 75.0 60.0 30.0 24.0
1920x1080 60.0 + 50.0* 59.9 30.0 25.0 30.0 24.0 30.0 30.0 24.0
1776x1000 50.0 59.9 25.0 24.0 30.0 30.0
1680x1050 50.0 60.0 30.0 24.0
1400x1050 50.0 60.0 30.0 24.0
1600x900 50.0 60.0 30.0 24.0
1440x900 50.0 59.9 30.0 24.0
1280x960 50.0 60.0 30.0 24.0
1280x800 50.0 59.8 30.0 24.0
1152x864 50.0 59.9 75.0 30.0 24.0
1280x768 50.0 59.8 30.0 24.0
1280x720 60.0 50.0 59.9 30.0 24.0
1024x768 50.0 75.0 70.1 30.0 24.0 60.0
1152x648 50.0 59.9
800x600 50.0 30.0 24.0 72.2 75.0 60.3 56.2
720x576 59.9 30.0 24.0 50.0
720x480 50.0 30.0 24.0 60.0 59.9
640x480 50.0 30.0 24.0 75.0 72.8 67.0 60.0 59.9
DFP10 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
1280x1024 60.0*+ 76.0 75.0 72.0
1280x960 76.0 75.0 72.0 60.0
1152x864 75.0 60.0
1280x768 76.0 75.0 72.0 60.0
1280x720 76.0 75.0 72.0 60.0
1024x768 75.0 70.1 60.0
800x600 72.2 75.0 60.3
640x480 75.0 72.8 67.0 59.9
640x350 60.0 70.1
CRT1 disconnected (normal left inverted right x axis y axis)
我试图寻找一些论坛,如何处理这些信息做一个更好的解释,看来我应该做的事情像:
xrandr --output DFP9 --auto --output DFP10 --auto
当我做T帽子,我仍然只有一个显示(“:0”)。
我很遗憾对X11没有很好的理解,所以我不知道我可以给你比我的双显示器设置使用AMD Catalyst Control Center工具配置更多的细节。我在两个监视器的终端窗口中尝试了'echo $ DISPLAY',它在两个显示器上输出“:0”。 – OzBarry 2013-03-15 15:47:03
您已启用Xinerama的声音行;一个逻辑显示。这很容易。使用-geometry选项并尝试使用xterm(或gnome-terminal,konsole,不管),并查看使用'xterm -geometry + x + y'弹出窗口的位置。如果你使用的是图形API,它将允许你通过一些代码来移动窗口,比如'window-> move(x,y)'。 – 2013-03-16 01:24:02