关于平板电脑的第二台显示器...

作为这样一种普通的平板电脑的所有者,他的传感器无法正常工作(最古老的儿子尝试过),他很长一段时间都在考虑该如何调整它。 Google,google和google( 其中一个两个 ,骇客编号227),以及许多其他涉及spacedeskiDispla的食谱。 真是运气不好-我有Linux。 谷歌搜索了一下,我发现了一些食谱,通过简单的萨满教,我得到了可接受的结果。


我的方法被削减了。

您将需要:

已安装Linux:

  • x11vnc (各种各样的Tigervnc和我坦率不喜欢的其他)
  • adb捆绑的android-tools

启用并安装了调试功能的平板电脑/智能手机:

  • AndroidNVC (我有它,因为没有广告)
  • 哪种屏幕空白阻止器(没有我没有找到的广告)
  • 任何自动装带器(运行VNC和阻止程序)都是可选的(下面有更多介绍)。

所以,让我们开始吧。

1.为xorg.conf获取Modeline

$ cvt 1024 768 25 #   gtf,       modeline. 

2.编辑

xorg.conf
 Section "ServerLayout" Identifier "Xorg Configured" Screen 0 "Monitor" 0 0 Screen 2 "Screen2" rightof "Screen0" # "  VNC" Option "Xinerama" "1" EndSection #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #    ,    #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #Dummy  Section "Device" Identifier "Device2" Driver "dummy" VideoRam 8000 EndSection #Dummy  Section "Monitor" Identifier "Monitor2" Modeline "1024x768@25" 23.77 1024 1056 1144 1176 768 785 789 807 # . . 1 EndSection #Dummy  Section "Screen" Identifier "Screen2" Device "Device2" Monitor "Monitor2" DefaultDepth 24 SubSection "Display" #  Modes "1024x768" Virtual 1024 748 EndSubSection EndSection 


重新启动Xs并检查arandr。 配置位置和方向,应该是这样的:



我们保存到文件-对我们有用。

3.在WM / DE中创建一个用于启动的文件(我有planhet.sh)

 x11vnc -rfbport 5900 -display :0 -dontdisconnect -noxfixes -xdamage -shared -forever -clip 1024x768+1600+0 -scale 1024x768 -bg -cursor X -o /home/$USER/x11vnc.log -repeat xrandr --addmode VIRTUAL1 1024x768 #  xrandr --output VIRTUAL1 --mode 1024x768 #  xrandr --output VIRTUAL2 --off --output HDMI1 --off --output VIRTUAL1 --mode 1024x768 --pos 1602x0 --rotate normal --output DP1 --off --output VGA1 --mode 1600x900 --pos 0x0 --rotate normal #       arandr 

检查:

 $ xrandr |grep VIRTUAL1 VIRTUAL1 connected 1024x768+1600+0 (normal left inverted right x axis y axis) 0mm x 0mm 

由于IceWM中没有自动启动目录,但是有〜/ .icewm /启动文件(必须是可执行文件),因此请向其中添加以下内容:

 sh -c /path/to/planshet.sh 

4.关闭消隐监视器:

  xset s off xset s noblank xset -dpms 

现在有趣的部分! 如何在不使用“反复试验法”折曲控制台键盘的情况下获取设备的“胶带”的坐标?

为了这种事情,我对它进行了编程 。 如果您从控制台运行它,那么我们将获得所需的-磁带的输出坐标。



6.让我们将所有这些添加到planshet.sh

完整版
 #!/bin/bash x11vnc -rfbport 5900 -display :0 -dontdisconnect -noxfixes -xdamage -shared -forever -clip 1024x768+1600+0 -scale 1024x768 -bg -cursor X -o /home/$USER/x11vnc.log -repeat xrandr --addmode VIRTUAL1 1024x768 #  xrandr --output VIRTUAL1 --mode 1024x768 #  xrandr --output VIRTUAL2 --off --output HDMI1 --off --output VIRTUAL1 --mode 1024x768 --pos 1602x0 --rotate normal --output DP1 --off --output VGA1 --mode 1600x900 --pos 0x0 --rotate normal #       arandr xset s off xset s noblank xset -dpms adb tcpip 5555 adb connect 192.168.0.14:5555 sudo adb devices adb shell input tap 1000 20 #   ""     ( ,  ) -  3 adb shell input tap 392 138 #   AndroidVNC adb shell input tap 20 65 #  VNC      


我们会做

 chmod +x /path/to/planshet.sh 

实际上,仅此而已。 我们重新启动X服务器并获得多屏显示。

我对“小”一盘轻描淡写。

屏幕附双屏。



当我建模时,我也会在上面放数据表。

UPD:
原来是一个有趣的功能(仅在gentoo中选中)。 如果不使用/etc/X11/xorg.conf开始,则xrandr可以正常工作。 并且,如果您至少创建了一个“错误的” xorg.conf(例如,我的英特尔“ integrash”很顽皮,带有“ AccelMethod”参数“ sna”),那么我们将拒绝移动虚拟屏幕并出现xrandr错误。 同时,通过DVI连接的第二台显示器“像时钟一样工作”。
因此,您可以使用xrandr安全地生成必要的权限,而不必担心缺少Xorg配置。

Source: https://habr.com/ru/post/zh-CN445294/


All Articles