Open main menu

DAVE Developer's Wiki β

Changes

XELK-AN-005: Qt5 application remoted using VNC server

3,940 bytes removed, 15:27, 5 November 2020
no edit summary
{{InfoBoxTop}}
{{AppliesToAxelLite}}
{{AppliesToAXEL Lite AN}}
{{AppliesToSMARX AN}}
{{InfoBoxBottom}}
== History ==
==VNC==
Starting from original Yocto based root file system provided [http://mirror.dave.eu/axel/xelk-3.0.1/xelk-3.0.1_dave-image-devel.tar.bz2 here], more packages need to be added for using the well known [https://www.realvnc.com/en/connect/download/viewer/ VNC] remote desktop (screen sharing) application.
We assume that network interface has been already configured for Internet access. In any case, simple configuration can be done directly on serial console with the following commands:
==Test bed==
* lcd panel is 800x480, so the command line is:
<pre class="board-terminal">root@axellite:~# x11vnc -noipv6 -rawfb /dev/fb0 -clip 800x480passwd qt5remote
<pre class="board-terminal">root@axellite:~# x11vnc -noipv6 -rawfb 14/dev02/fb0 -clip 800x480################################################################@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@ @##@ ** WARNING ** WARNING ** WARNING ** WARNING ** @##@ @##@ YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!! @##@ @##@ This means anyone with network access to this computer @##@ may be able to view and control your desktop. @##@ @##@ >>> If you did not mean to do this Press CTRL-C now!! <<< @##@ @##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@ @##@ You can create an x11vnc password file by running2018 09: @##@ @##@ x11vnc -storepasswd password /path/to/passfile @##@ or x11vnc -storepasswd /path/to/passfile @##@ or x11vnc -storepasswd @##@ @##@ (the last one will use ~/.vnc/passwd) @##@ @##@ and then starting x11vnc via50: @##@ @##@ x11vnc -rfbauth /path/43 passing arg to/passfile @##@ @##@ an existing ~/.vnc/passwd file from another VNC @##@ application will work fine too. @##@ @##@ You can also use the -passwdfile or -passwd options. @##@ (note -passwd is unsafe if local users are not trusted) @##@ @##@ Make sure any -rfbauth and -passwdfile password files @##@ cannot be read by untrusted users. @##@ @##@ Use x11vnc -usepw to automatically use your @##@ ~/.vnc/passwd or ~/.vnc/passwdfile password files. @##@ (and prompt you to create ~/.vnc/passwd if neither @##@ file exists.) Under -usepw, x11vnc will exit if it @##@ cannot find a password to use. @##@ @##@ @##@ Even with a password, the subsequent VNC traffic is @##@ sent in the clear. Consider tunnelling via ssh(1)libvncserver: @##@ @##@ http://www.karlrunge.com/x11vnc/#tunnelling @##@ @##@ Or using the x11vnc SSL options: -ssl and -stunnel @##@ @##@ Please Read the documention for more info about @##@ passwords, security, and encryption. @##@ @##@ http://www.karlrunge.com/x11vnc/faq.html#faq-passwd @##@ @##@ To disable this warning use the -nopw option, or put @##@ 'nopw' on a line in your ~/.x11vncrc file. @##@ @##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@################################################################14/02/2018 0609:4450:20 43 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 77536714/02/2018 0609:4450:20 43 Not opening DISPLAY in -rawfb mode (force via -rawfb +str)14/02/2018 0609:4450:20 43 Continuing without X display in -rawfb mode.14/02/2018 0609:4450:20 43 console_guess: file is /dev/fb014/02/2018 0609:4450:20 43 console_guess: file pipeinput CONSOLE014/02/2018 0609:4450:20 43 pipeinput: using linux console: /dev/tty014/02/2018 0609:4450:20 43 console_guess returned: map:/dev/fb0@800x480x16:f800/7e0/1f14/02/2018 0609:4450:20 43 raw fb is non-regular file: /dev/fb014/02/2018 0609:4450:20 43 rawfb: mmap file: /dev/fb014/02/2018 0609:4450:20 43 w: 800 h: 480 b: 16 addr: 0x7632f000 0x763df000 sz: 76800014/02/2018 06:44:20 *** ignoring invalid -clip WxH+X+Y: 800x48014/02/2018 0609:4450:20 43 pipeinput: using linux console: /dev/tty014/02/2018 0609:4450:20 43 initialize_screen: fb_depth/fb_bpp/fb_Bpl 16/16/160014/02/2018 0609:4450:204314/02/2018 0609:4450:20 43 Raw fb at addr 0x7632f000 0x763df000 is 16bpp depth=16 true color14/02/2018 0609:4450:204314/02/2018 0609:4450:20 43 Autoprobing TCP port14/02/2018 0609:4450:20 43 Autoprobing selected TCP port 590014/02/2018 0609:4450:20 43 Autoprobing TCP6 port14/02/2018 0609:4450:20 43 Autoprobing selected TCP6 port 590014/02/2018 0609:4450:20 43 Not listening on IPv6 interface.14/02/2018 0609:50:44:20 fb read rate: 99 79 MB/sec14/02/2018 06:4409:20 fast read: reset -wait ms to: 1014/02/2018 0650:44:20 fast read: reset -defer ms to: 1014/02/2018 06:44:20 screen setup finished.14/02/2018 06:44:2014/02/2018 06:44:20 WARNING: You are running x11vnc WITHOUT a password. See14/02/2018 0609:44:20 WARNING: the warning message printed above for more info.14/02/2018 0650:44:20
The VNC desktop is: imx6qxelkaxellite:0
PORT=5900
==Connection ==
On a Windows PC, it is possible to start a the VNC viewer, like [http://www.uvnc.com/downloads/ultravnc.html UltraVNC Viewer], and selecting the SBCX board's IP address:
[[File:Ultravnc-viewer.png|thumb|center|400px|UltraVNC Viewer running on Windows PC]]
On the target, the VNC server shows the remote connection is accepted:
<pre class="board-terminal">
14/02/2018 0609:4451:58 29 Got connection from client 192.168.0.2114/02/2018 0609:4451:58 29 other clients:14/02/2018 0609:4451:58 29 Normal socket connection14/02/2018 0609:4451:58 29 incr accepted_client=1 for 192.168.0.21:60116 62093 sock=914/02/2018 0609:4451:58 29 Client Protocol Version 3.814/02/2018 0609:4451:58 29 Protocol version sent 3.8, using 3.814/02/2018 0609:4451:58 29 rfbProcessClientSecurityType: executing handler for type 1214/02/2018 09:51:33 client useCopyRect: 192.168.0.21 014/02/2018 0609:4451:58 rfbProcessClientSecurityType33 client_set_net: returning securityResult for client rfb version >= 3192.168.0.21 0.8031014/02/2018 0609:4451:58 33 Pixel format for client 192.168.0.21:14/02/2018 0609:4451:58 33 16 bpp, depth 16, little endian14/02/2018 0609:4451:58 33 true colour: max r 31 g 63 b 31, shift r 11 g 5 b 014/02/2018 0609:4451:58 33 no translation needed14/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000000A)14/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type zlibhex14/02/2018 0609:4451:58 33 Using compression level 6 for client 192.168.0.2114/02/2018 0609:4451:58 33 Enabling full-color cursor updates for client 192.168.0.2114/02/2018 0609:4451:58 33 Enabling cursor position updates for client 192.168.0.2114/02/2018 0609:4451:58 33 Using image quality level 6 for client 192.168.0.2114/02/2018 0609:4451:58 33 Using JPEG subsampling 0, Q79 for client 192.168.0.2114/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type xorEnable14/02/2018 0609:4451:58 33 Enabling LastRect protocol extension for client 192.168.0.2114/02/2018 0609:4451:58 33 Enabling NewFBSize protocol extension for client 192.168.0.2114/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type cacheEnable14/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8000)14/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8001)14/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8002)14/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8003)14/02/2018 0609:4451:58 33 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xC0A1E5CE)14/02/2018 0609:4451:58 33 Using ZRLE encoding for client 192.168.0.2114/02/2018 0609:4451:58 34 Pixel format for client 192.168.0.21:14/02/2018 0609:4451:58 34 16 bpp, depth 16, little endian14/02/2018 0609:4451:58 34 true colour: max r 31 g 63 b 31, shift r 11 g 5 b 014/02/2018 0609:4451:58 34 no translation needed14/02/2018 0609:4451:58 34 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000000A)14/02/2018 0609:4451:58 34 rfbProcessClientNormalMessage: ignoring unsupported encoding type zlibhex14/02/2018 0609:4451:58 34 Using compression level 6 for client 192.168.0.2114/02/2018 0609:4451:58 34 Enabling full-color cursor updates for client 192.168.0.2114/02/2018 0609:4451:58 34 Enabling cursor position updates for client 192.168.0.2114/02/2018 0609:4451:58 34 Using image quality level 6 for client 192.168.0.2114/02/2018 0609:4451:58 34 Using JPEG subsampling 0, Q79 for client 192.168.0.2114/02/2018 0609:4451:58 34 rfbProcessClientNormalMessage: ignoring unsupported encoding type xorEnable14/02/2018 0609:4451:58 34 Enabling LastRect protocol extension for client 192.168.0.2114/02/2018 0609:4451:58 34 Enabling NewFBSize protocol extension for client 192.168.0.2114/02/2018 0609:4451:58 34 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8000)14/02/2018 0609:4451:58 34 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8001)14/02/2018 0609:4451:58 34 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8002)14/02/2018 0609:4451:58 34 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8003)14/02/2018 0609:4451:58 34 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xC0A1E5CE)14/02/2018 0609:4451:58 34 Switching from ZRLE to hextile Encoding for client 192.168.0.2114/02/2018 0609:51:34 client 1 network rate 196.5 KB/sec (6073.7 eff KB/sec)14/02/2018 09:4451:58 34 client useCopyRect1 latency: 1.5 ms14/02/2018 09:51:34 dt1: 1920.1680669, dt2: 0.0605 dt3: 0.21 0015 bytes: 2486614/02/2018 09:51:34 link_rate: LR_UNKNOWN -1ms, 196 KB/s</pre>
</pre>
==Demo on youtube==
{| class="wikitable" | width="100%"
| {{#ev:youtube|xxxxxxomZ7_xW2Ikc|500|center|Qt5 application with VNC server running on i.MX6 |frame}}
|}
8,226
edits