È dinò nantu à u sicondu monitoru da a tableta ...

Dopu avè ritruvutu cum'è u pruprietariu di una tableta cusì media cù un sensoru chì ùn funziona micca (u mo figliolu maiò hà pruvatu u so megliu), aghju pensatu per un bellu pezzu induve l'adattà. Googled, Googled è Googled (i tempi, два, Hacker No. 227), è ancu parechje altre ricette chì presentanu spaziu spaziu, iDispla è certi altri. L'unicu prublema hè chì aghju Linux. Dopu un pocu di più in Google, aghju trovu parechje ricette è per mezu di qualchì sciamanisimu simplice aghju avutu un risultatu accettabile.

È dinò nantu à u sicondu monitoru da a tableta ...
U mo metudu hè sottu à u cut.

Avete bisognu:

Linux cù installatu:

  • x11vnc (Francamente ùn mi piace micca ogni tipu di tigervnc è altri)
  • Adb da u kit di strumenti Android

Tablet / intelligente cù u modu di debugging attivatu è stabilitu à:

  • AndroidNVC (Aghju questu, perchè ùn ci hè micca publicità)
  • Qualchese tipu di bloccu di screen blanking (ùn pudia truvà unu senza publicità)
  • Ogni autoloader (eseguite VNC è blocker) hè opzionale (più nantu à quì sottu).

ok, cuminciamu.

1. Get Modeline per xorg.conf

$ cvt 1024 768 25 # Можно и gtf, но он не всегда дает корректный modeline.

2. Edizione

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

Riavvia l'X-sys è verificate via arandr. Configurate u locu è l'orientazione. Duverebbe vede qualcosa cusì:

È dinò nantu à u sicondu monitoru da a tableta ...

Salvemu in un schedariu - serà utile per noi.

3. Crea un schedariu per l'autoloading in WM/DE (aghju 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

Cuntrollamu:

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

Siccomu ùn ci hè micca un annuariu autostart in IceWM, ma ci hè un schedariu ~/.icewm/startup (chì deve esse eseguibile), aghjunghje ciò chì segue:

sh -c /path/to/planshet.sh

4. Disable monitor blanking:

	xset s off
	xset s noblank
	xset -dpms

Avà vene a parte divertente! Cumu uttene e coordenate "tap" per un dispositivu senza u "metudu di prova è errore" torturendu u teclatu in a cunsola ?!

Per una tale cosa aghju sculpitu prugramma. Se l'avemu eseguitu da a cunsola, averemu ciò chì cercamu - output di coordenate di tap.

È dinò nantu à u sicondu monitoru da a tableta ...

6. Aghjunghjite tuttu questu à planshet.sh

Versione completa

#!/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 предварительно прописав адрес и порт

È a faremu

chmod +x /path/to/planshet.sh

Hè tuttu, in realtà. Reboot u servitore X è uttene un multiscreen.

Aghju cunky in esecuzione nantu à u mo "picculu".

Una screenshot di a doppia schermu hè attaccata.

È dinò nantu à u sicondu monitoru da a tableta ...

Aghju ancu aghjustatu datasheets nantu à questu quandu modellu qualcosa.

Source: www.habr.com

Add a comment