And again about the second monitor from the tablet ...
Being the owner of such an average tablet with an inoperative sensor (the oldest sonny tried), he thought for a long time where to adapt it. Google, google and google ( one , two , Hacker No. 227), as well as many other recipes involving spacedesk , iDispla and some others. That's just bad luck - I have Linux. Googling yet, I found several recipes and through uncomplicated shamanism I got an acceptable result.
My way is under the cut.
You will need:
Linux with installed:
Tablet / smart with debugging enabled and installed:
so, let's start.
1. Get Modeline for xorg.conf
2. Editing
Restart Xs and check through arandr. We adjust the location and orientation. It should be something like this:
Save to a file - it will be useful to us.
3. Create a file for startup in WM / DE (I have planshet.sh)
Check:
Since there is no autostart directory in IceWM, but there is a ~ / .icewm / startup file (which must be executable), add the following to it:
4. Turn off the blanking monitors:
And now the fun part! How to get the coordinates of the “tapes” for the device without the “trial and error method” torturing the keyboard in the console ?!
For the sake of such a thing, I programmed it . If you run it from the console, then we get the desired - the output coordinates of tapes.
6. Let's add all this to planshet.sh
And we will do
That, in fact, is all. We reboot the X server and get a multiscreen.
I have conky spinning on the “small” one.
Screen dual screen attached.
And I also throw datasheet on it when I model something.
UPD:
There was an interesting feature (Checked only in gentoo ). If you start WITHOUT /etc/X11/xorg.conf, then xrandr works quite correctly. And if you create at least a little “wrong” xorg.conf (well, for example, my Intel “integrash” is naughty with the “AccelMethod” parameter “sna”), then we get a refusal to shift the dummy screen and an xrandr error. At the same time, the connected second monitor via DVI works “like a clock”.
So you can safely generate the necessary permissions using xrandr without worrying about the absence of the Xorg config.
My way is under the cut.
You will need:
Linux with installed:
- x11vnc (any tigervnc and other I frankly dislike)
- adb bundled android-tools
Tablet / smart with debugging enabled and installed:
- AndroidNVC (I have it, because there is no advertising)
- What kind of screen blanking blocker (without ads I did not find)
- Any autoloader (run VNC and blocker) is optional (more on that below).
so, let's start.
1. Get Modeline for xorg.conf
$ cvt 1024 768 25 # Можно и gtf, но он не всегда дает корректный modeline.
2. Editing
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
Restart Xs and check through arandr. We adjust the location and orientation. It should be something like this:
Save to a file - it will be useful to us.
3. Create a file for startup in WM / DE (I have planshet.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
Check:
$ xrandr |grep VIRTUAL1
VIRTUAL1 connected 1024x768+1600+0 (normal left inverted right x axis y axis) 0mm x 0mm
Since there is no autostart directory in IceWM, but there is a ~ / .icewm / startup file (which must be executable), add the following to it:
sh -c /path/to/planshet.sh
4. Turn off the blanking monitors:
xset s off
xset s noblank
xset -dpms
And now the fun part! How to get the coordinates of the “tapes” for the device without the “trial and error method” torturing the keyboard in the console ?!
For the sake of such a thing, I programmed it . If you run it from the console, then we get the desired - the output coordinates of tapes.
6. Let's add all this to planshet.sh
Full version
#!/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 предварительно прописав адрес и порт
And we will do
chmod +x /path/to/planshet.sh
That, in fact, is all. We reboot the X server and get a multiscreen.
I have conky spinning on the “small” one.
Screen dual screen attached.
And I also throw datasheet on it when I model something.
UPD:
There was an interesting feature (Checked only in gentoo ). If you start WITHOUT /etc/X11/xorg.conf, then xrandr works quite correctly. And if you create at least a little “wrong” xorg.conf (well, for example, my Intel “integrash” is naughty with the “AccelMethod” parameter “sna”), then we get a refusal to shift the dummy screen and an xrandr error. At the same time, the connected second monitor via DVI works “like a clock”.
So you can safely generate the necessary permissions using xrandr without worrying about the absence of the Xorg config.