aki*_*ira 26
您可以使用“ fakexinerama ”来实现您想要的:
Fake Xinerama is a replacement libXinerama library that instead
of querying the XServer reads ~/.fakexinerama and provides fake
information about Xinerama screens based on this file. It can be
used to fake a Xinerama setup even on computers with just one monitor
or to fake Xinerama setup other than one specified in the XServer
configuration (e.g. making one screen smaller when using two same
screens). It's probably only useful for developers.
Run Code Online (Sandbox Code Playgroud)
Dav*_*vid 18
要扩展 akira 上面关于使用 Lubos Lunak 的“假 xinerama”的提示,这正是我让它为我工作的方式:
gcc -O2 -Wall Xinerama.c -fPIC -o libXinerama.so.1.0.0 -shared
gksu nautilus
2
0 0 720 900
720 0 720 900
Fake Xinerama 可以让你定义任何你想要的虚拟屏幕设置,但我只想要一个垂直分屏。为了在您的显示器上实现 X x Y 像素大小,请查看我的文件示例,只需将 720 替换为 X/2,并将 900 替换为 Y。
就是这样。我注销并重新登录,然后启动并运行。
再次感谢 Lubos Lunak 创建了这个 mod 并感谢 akira 指点我。
现在有一个名为FakeXRandR的新项目,它的工作非常直接。
这是一个欺骗 X11 服务器的工具,让其相信监视器比实际数目多。它与 libXRandR 和 libXinerama 挂钩,并用多个虚拟监视器替换某些可配置的监视器配置。此软件包附带的工具可用于配置监视器的拆分方式。
小智 6
这可以在 XRandR 1.5 中完成,无需额外的软件。虽然 fakexinerama 和 FakeXRandR 都没有在 Xubuntu 上为我工作,但这个解决方案最终将屏幕一分为二。
要拆分监视器,请执行以下操作:
进入xrandr
终端查看你要拆分的显示器的输出名称和当前分辨率。
在我的系统上,结果是:
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
1920x1080 60.00*+ 50.00 59.94
1920x1080i 60.00 50.00 59.94
1600x900 60.00
1280x1024 75.02 60.02
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.08 60.00
800x600 75.00 60.32
720x576 50.00
720x576i 50.00
720x480 60.00 59.94
720x480i 60.00 59.94
640x480 75.00 60.00 59.94
720x400 70.08
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Run Code Online (Sandbox Code Playgroud)
我们可以看到我的显示器连接到HDMI2,分辨率设置为1920x1080。
使用xrandr --setmonitor
命令添加 2 个虚拟显示器,确保它们与您的物理显示器重叠并彼此相邻放置。命令的语法是(不带引号):
xrandr --setmonitor "monitor_name" "width_px"/"width_mm"x"height_px"/"height_mm"+"x_offset_px"+"y_offset_px" "output_name"
Run Code Online (Sandbox Code Playgroud)
对于我的系统,它是:
xrandr --setmonitor HDMI2~1 960/254x1080/286+0+0 HDMI2
xrandr --setmonitor HDMI2~2 960/255x1080/286+960+0 none
Run Code Online (Sandbox Code Playgroud)虽然上面已经在我的系统上配置了虚拟监视器,但在我执行之前还没有应用更改(它似乎刷新了 xrandr):
xrandr --fb 1921x1080
xrandr --fb 1920x1080
Run Code Online (Sandbox Code Playgroud)要在重新启动后保留更改,您需要在登录时执行这些命令。您可以通过在~/.profile
文件末尾附加命令来实现。
归档时间: |
|
查看次数: |
50992 次 |
最近记录: |