An dèidh dhomh mi fhìn a lorg mar neach-seilbh clàr cho cuibheasach le sensor neo-obrachail (dh'fheuch mo mhac as sine a dhìcheall), smaoinich mi airson ùine mhòr mu dheidhinn càite an atharraicheadh e e. Googled, Googled agus Googled (
Tha an dòigh-obrach agam nas ìsle na an gearradh.
Feumaidh tu:
Linux le stàladh:
- x11vnc (Gu fìrinneach cha toil leam a h-uile seòrsa tìgear agus feadhainn eile)
- adb bhon android-innealan kit
Tablet/smart le modh deasbaid air a chomasachadh agus air a shuidheachadh gu:
- AndroidNVC (Tha am fear seo agam, oir chan eil sanasan ann)
- Seòrsa de neach-bacadh sgrion (cha b’ urrainn dhomh fear a lorg às aonais sanasachd)
- Tha fèin-luchdachadh sam bith (ruith VNC agus neach-bacadh) roghainneil (barrachd air sin gu h-ìosal).
ceart gu leòr, tòisichidh sinn.
1. Faigh Modeline airson xorg.conf
$ cvt 1024 768 25 # Можно и gtf, но он не всегда дает корректный modeline.
2. Deasachadh
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
Bidh sinn ag ath-thòiseachadh an X-sys agus a’ sgrùdadh tro arandr. Suidhich an t-àite agus an stiùireadh. Bu chòir dha coimhead rudeigin mar seo:
Bidh sinn ga shàbhaladh gu faidhle - bidh e feumail dhuinn.
3. Cruthaich faidhle airson fèin-luchdachadh ann an WM/DE (tha planshet.sh agam)
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
Feuch an dèan sinn sgrùdadh:
$ xrandr |grep VIRTUAL1
VIRTUAL1 connected 1024x768+1600+0 (normal left inverted right x axis y axis) 0mm x 0mm
Leis nach eil eòlaire autostart ann an IceWM, ach tha faidhle ~/.icewm/startup (a bu chòir a chur an gnìomh), cuir na leanas ris:
sh -c /path/to/planshet.sh
4. Disable monitor blanking:
xset s off
xset s noblank
xset -dpms
A-nis thig am pàirt spòrsail! Ciamar a gheibh thu na co-chomharran “tap” airson inneal às aonais an “modh deuchainn is mearachd” le bhith a’ ciùrradh a’ mheur-chlàr sa chonsail?!
Air sgàth a leithid de rud dhealbh mi
6. Cuiridh sinn seo uile gu planshet.sh
Tionndadh slàn
#!/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 предварительно прописав адрес и порт
Agus nì sinn e
chmod +x /path/to/planshet.sh
Tha sin uile, gu dearbh. Ath-thòisich am frithealaiche X agus faigh multiscreen.
Tha conky agam a’ ruith air an fhear “bheag” agam.
Tha dealbh-sgrìn den sgrion dhùbailte ceangailte.
Bidh mi cuideachd a’ tilgeil dhuilleagan-dàta air nuair a bhios mi a’ modail rudeigin.
Source: www.habr.com