In this post, we discuss how to remote access pcDuino’s desktop using a web browser.
To achieve that, a x11vnc server needs to be installed on pcDuino. As x11vnc is built with the factory provided image, we just need to configure it.
Step 1 Configure the password to remote access
$x11vnc -storepasswd
Step 2 Start VNC Server
$x11vnc -display :0 -xkb -rfbauth .vnc/passwd -auth .Xauthority -shared -http
Now it will dump out the following information:
23/05/2014 02:20:08 passing arg to libvncserver: -rfbauth 23/05/2014 02:20:08 passing arg to libvncserver: .vnc/passwd 23/05/2014 02:20:08 x11vnc version: 0.9.12 lastmod: 2010-09-09 pid: 1163 23/05/2014 02:20:08 Using X display :0 23/05/2014 02:20:08 rootwin: 0×101 reswin: 0x2a00001 dpy: 0x13ecfb0 23/05/2014 02:20:08 23/05/2014 02:20:08 —————— USEFUL INFORMATION —————— 23/05/2014 02:20:08 X DAMAGE available on display, using it for polling hints. 23/05/2014 02:20:08 To disable this behavior use: ‘-noxdamage’ 23/05/2014 02:20:08 23/05/2014 02:20:08 Most compositing window managers like ‘compiz’ or ‘beryl’ 23/05/2014 02:20:08 cause X DAMAGE to fail, and so you may not see any screen 23/05/2014 02:20:08 updates via VNC. Either disable ‘compiz’ (recommended) or 23/05/2014 02:20:08 supply the x11vnc ‘-noxdamage’ command line option. 23/05/2014 02:20:08 23/05/2014 02:20:08 Wireframing: -wireframe mode is in effect for window moves. 23/05/2014 02:20:08 If this yields undesired behavior (poor response, painting 23/05/2014 02:20:08 errors, etc) it may be disabled: 23/05/2014 02:20:08 – use ‘-nowf’ to disable wireframing completely. 23/05/2014 02:20:08 – use ‘-nowcr’ to disable the Copy Rectangle after the 23/05/2014 02:20:08 moved window is released in the new position. 23/05/2014 02:20:08 Also see the -help entry for tuning parameters. 23/05/2014 02:20:08 You can press 3 Alt_L’s (Left “Alt” key) in a row to 23/05/2014 02:20:08 repaint the screen, also see the -fixscreen option for 23/05/2014 02:20:08 periodic repaints. 23/05/2014 02:20:08 23/05/2014 02:20:08 XFIXES available on display, resetting cursor mode 23/05/2014 02:20:08 to: ‘-cursor most’. 23/05/2014 02:20:08 to disable this behavior use: ‘-cursor arrow’ 23/05/2014 02:20:08 or ‘-noxfixes’. 23/05/2014 02:20:08 using XFIXES for cursor drawing. 23/05/2014 02:20:08 GrabServer control via XTEST. 23/05/2014 02:20:08 23/05/2014 02:20:08 Scroll Detection: -scrollcopyrect mode is in effect to 23/05/2014 02:20:08 use RECORD extension to try to detect scrolling windows 23/05/2014 02:20:08 (induced by either user keystroke or mouse input). 23/05/2014 02:20:08 If this yields undesired behavior (poor response, painting 23/05/2014 02:20:08 errors, etc) it may be disabled via: ‘-noscr’ 23/05/2014 02:20:08 Also see the -help entry for tuning parameters. 23/05/2014 02:20:08 You can press 3 Alt_L’s (Left “Alt” key) in a row to 23/05/2014 02:20:08 repaint the screen, also see the -fixscreen option for 23/05/2014 02:20:08 periodic repaints. 23/05/2014 02:20:08 X FBPM extension not supported. 23/05/2014 02:20:08 X display is capable of DPMS. 23/05/2014 02:20:08 ——————————————————– 23/05/2014 02:20:08 23/05/2014 02:20:08 Default visual ID: 0×21 23/05/2014 02:20:08 Read initial data from X display into framebuffer. 23/05/2014 02:20:08 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120 23/05/2014 02:20:08 23/05/2014 02:20:08 X display :0 is 32bpp depth=24 true color 23/05/2014 02:20:08 23/05/2014 02:20:08 Autoprobing TCP port 23/05/2014 02:20:08 Autoprobing selected port 5901 23/05/2014 02:20:08 Listening also on IPv6 port 5901 (socket 10) 23/05/2014 02:20:08 check_httpdir: trying to guess httpdir… x11vnc 23/05/2014 02:20:08 check_httpdir: guessed directory: 23/05/2014 02:20:08 /usr/bin/../share/x11vnc/classes 23/05/2014 02:20:08 http_connections: turning on http service. 23/05/2014 02:20:08 Listening for HTTP connections on TCP port 5801 23/05/2014 02:20:08 URL http://ubuntu:5801 23/05/2014 02:20:08 http_connections: Listening also on IPv6 port 5801 (socket 12) 23/05/2014 02:20:08 23/05/2014 02:20:08 Xinerama is present and active (e.g. multi-head). 23/05/2014 02:20:08 Xinerama: number of sub-screens: 1 23/05/2014 02:20:08 Xinerama: no blackouts needed (only one sub-screen) 23/05/2014 02:20:08 23/05/2014 02:20:08 fb read rate: 19 MB/sec 23/05/2014 02:20:08 The X server says there are 10 mouse buttons. 23/05/2014 02:20:08 screen setup finished. 23/05/2014 02:20:08 23/05/2014 02:20:08 The URLs printed out below (‘Java … viewer URL’) can 23/05/2014 02:20:08 be used for Java enabled Web browser connections. 23/05/2014 02:20:08 The VNC desktop is: ubuntu:1 Java viewer URL: http://ubuntu:5801/ PORT=5901
Step 3 Open a web browser
As shown in the log, the port for web access is 5801. We just need to access http://ipaddress:5801. In our case, the ip address is 192.168.1.133.
Enter the IP address along with the port number in the address bar of a web brower and hit enter:
If the Java plug in is not installed like in our case, it will prompt us to install. Click ‘Install plug-in..’:
Click ‘Free Java Download’ to download the plug in:
Install the plug in:
After the installation is done, restart the browser and enter the IP address again:
For the permission, please select ‘Always run on this site’.
Oops. Huston. We got problem!
Don’t be panic. Find an utility named ‘Configure Java’:
Navigate to the security tab, and select the security level to be medium:
Now we restart the web browser, and it will ask for the password when we enter the IP and port address of the pcDuino server:
The password is ‘ubuntu’ as we configure in the first step. The desktop of the remote pcDuino will show up in your browser:
Leave a Reply
You must be logged in to post a comment.