Gustaw
Posts: 21
Joined: Thu May 23, 2013 1:45 pm

Getting SSH tunnelled / secured VNC to work

Thu May 23, 2013 2:26 pm

I am new to RPi / Linux and only had limited time to play with it since I bough the kit a couple of weeks ago.
:oops:

For me the whole setup will make true sense if I can access RPi GUI desktop (LXDE) remotely and at least I know it can done.

I searched the web and found all sorts of confusing RPi VNC guides and tutorials.
All seem to lack depth and detail.
:|

Anyway I followed all the steps from http://www.penguintutor.com/ tutorial but got stuck at the very end.
I do not have the RPi here with me right now to test anything straight away so if you have any suggestions then I will test them later on.

I decided to go for the secure VNC setup using SSH tunnelling.
That was probably a mistake (I was too ambitious ?) so I plan to take a step back and test just unsecured VNC to eliminate potential causes of my troubles.

I managed to :
- connect RPi to the home network, both hard wired and wirelessly
- assign two IP addresses to RPi, one for each of two network adapters, both static as assigned via router's reservation table, WiFi MAC filtering is sorted too
- set up basic SSH so I can run RPi terminal on my old XP machine but I wanted to see GUI (I am too old for tortures of command line computing resembling DOS or ZX Spectrum :| )
- set up Tight VNC server with all sorts of more or less random options –localhost –geometry 1024x768 –dpi 96 (probably redundant) –depth 24 – pixelformat rgb565 (or whatever) :?
- force VNC server to start at bootup, it works, it starts at bootup
- set up some sort of SSH tunnel using limited instructions / knowledge available (there are loads of settings in PuTTy than I did not know how to configure e.g. re X11 sessions etc) :?
- set up TightVNC client on the XP machine with default settings
- amend Norton Internet Security settings to allow VNC communication from the localhost :P
- see a huge picture of the raspberry in the VNC client window ... :shock:

And this is all. No familiar LXDE desktop, just a huge raspberry.
A bit of an anti-climax I suppose ...

I do not know exactly what I was looking at on the screen except that I know that this was a picture of a huge fruit berry. :shock:

Something is not working as it should. :(
No icons, no desktop toolbar.
When I right click some dodgy mini drop down menu appears in fancy rainbow-like colours.
So I went on searching the web.
Somebody mentions Openbox. What the ... is Openbox ?
:?

As I wrote above I am going to try to use VNC without setting up SSH tunnel.
Let's see what happens.

I would love to find some well documented info re: other SSH / VNC settings that I should / should not be using, e.g. SSH data compression etc.
So far it is mainly guesswork.
I am doing something without knowing what it is, whether it is right or wrong and why.
A bit annoying and de-motivating.

Gustaw
Posts: 21
Joined: Thu May 23, 2013 1:45 pm

Re: Getting SSH tunnelled / secured VNC to work

Fri May 24, 2013 9:12 am

OK, here we are.

Yesterday I tried to post my first message in this topic (see above) but it got moderated (!) and then only released overnight. So my original posting is a bit outdated. Since yesterday afternoon I made a small progress in testing and troubleshooting.

I read just a bit about X11 and its "structure", about X11 servers and stuff like that.
So I decided to untick X11 forwarding option in SSH settings in PuTTy (because VNC is not dependant on X11 forwarding).
Retried establishing VNC session over SSH tunnel but the result was still the same.
A lovely huge picture of Raspberry.
or if you LEFT clik, you get a small drop down menu.
With every screen refresh (every 1s ?) I could see the system trying to display something like a familar menu bar bar at the bottom of the screen. It was trying but then the screen was turning blank again, except, of course, for the picture of the huge Raspberry.

OK, as promised I went back to ThightVNC config file and removed -localhost option.
Then connected from TightVNC client directly without SSH tunnel.
Again the result was the same.

I concluded that actually I DID manage to establish VNC session over SSH tunnel.
The trouble is that what I saw was not the expected desktop.
All facts point to this mysterious beast called OpenBox ... or whatever ...

To be honest I do not feel like becoming an OpenBox expert right now.
All I want to achieve is to be able to see the usual desktop for user pi over VNC.
That is all.
All I need is some basic understanding how this OpenBox windows manager operates on RPi and what I need to change and where so that after starting up VNC server for user pi I can then connect to it remotely and see a familiar desktop.
That would be absolutely great as I want to run RPi headless.

Gustaw
Posts: 21
Joined: Thu May 23, 2013 1:45 pm

Re: Getting SSH tunnelled / secured VNC to work

Fri May 24, 2013 9:56 am

Answering to myself ...

I guess I need to inspect :
~/.vnc/xstartup

What confused me is the statement from Penguin Tutor instructions :
http://www.penguintutor.com/linux/tightvnc
The instructions above are sufficient for the Raspberry Pi running Debian. You may however need to make a further configuration change to start your normal window manager / application launcher. If you get a blank screen when connecting edit the file ~/.vnc/xstartup and replace the line /etc/X11/Xsession with one of the following as appropriate.
exec ck-launch-session startlxde #for an lxde session
exec ck-launch-session gnome-session #for a gnome-session
exec ck-launch-session openbox-session #for an openbox desktop
exec ck-launch-session startxfce4 #for an xfce desktop
exec ck-launch-session icewm #for an icewm desktop
exec ck-launch-session startkde #for a kde desktop
For instance with Ubuntu you would use the entry for gnome, for xubuntu you would use xfce and for kubuntu use kde. The Raspberry Pi uses lxde, but this is started automatically on the Raspberry Pi there is no need to add it to the xstartup file.
No need ?
OK, so I did nothing.
But then I read on about :
twm &
to be replaced by
openbox &
This all sounds like alchemy ...
I will give it a try.

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Getting SSH tunnelled / secured VNC to work

Fri May 24, 2013 5:23 pm

I followed the Penguintutor instructions exactly several months ago, without any problems setting up tunneling and tightvnc. At the time it was the only set of instructions that just plain worked.

You say you are not seeing the taskbar. Did you scroll the window down, because the taskbar is not visible when the screen is displayed.

You say you are not seeing the icons. Don't expect to see the same desktop as you are seeing on the pi's monitor, or the icons, as that is not how tightvnc works.......it does not connect to the actual desktop, it creates a new virtual desktop. If that is not what you wanted, then Google or search this forum for other programs that have that capability.

Geez, mellow out with all the bold text, red lettering and emoticons.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

Gustaw
Posts: 21
Joined: Thu May 23, 2013 1:45 pm

Re: Getting SSH tunnelled / secured VNC to work

Fri May 24, 2013 8:36 pm

Quick answers first. Then I plan to drop here details of some config files that might be relevant.
pjc123 wrote:I followed the Penguintutor instructions exactly several months ago, without any problems setting up tunneling and tightvnc. At the time it was the only set of instructions that just plain worked.
I did follow them too. I have them in front of me. The only diffs :
- I have consistently VNCUSER rather than USER variable (?) in tightvncserver script but, I think, it makes no difference
- on su $VNCUSER -c ....... line I have added parameters like -geometry -pixelformat

In desperation I have started looking into files like /etc/X11/Xsession. As I said I will post details later.

I have dropped SSH tunnelling for the moment to eliminate one of the possible causes.
pjc123 wrote:You say you are not seeing the taskbar. Did you scroll the window down, because the taskbar is not visible when the screen is displayed.
I played with different -geometry settings and this seems to work. I played with zooming in and out. I think I am in control here and I see the entire desktop.
I think the outline of the taskbar does "blink" at the bottom of the desktop when VNC session is refreshed every 1s or so. Something is claerly "hiding" there but it does not display correctly.
pjc123 wrote:You say you are not seeing the icons. Don't expect to see the same desktop as you are seeing on the pi's monitor, or the icons, as that is not how tightvnc works.......it does not connect to the actual desktop, it creates a new virtual desktop. If that is not what you wanted, then Google or search this forum for other programs that have that capability.
By now I have read more about VNC so I am aware of the virtual desktop being created. But I need access to the toolbar in order to do anything useful with it. I also read about alternative protocols like NX but I want to make VNC work propery as it is a tested and proven method.
pjc123 wrote:Geez, mellow out with all the bold text, red lettering and emoticons.
:D
But at least I captured somebody's attention.

Gustaw
Posts: 21
Joined: Thu May 23, 2013 1:45 pm

Re: Getting SSH tunnelled / secured VNC to work

Fri May 24, 2013 10:22 pm

Gustaw wrote:Then I plan to drop here details of some config files that might be relevant.
I will not be able to do much more this evening.

I have tried to change xstartup file in /home/pi/.vnc but this did not fix the problem so far.

Original xstartup file as I found it :
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
Changed it a bit (rather blindly but based on info from elinux.org site) :
#!/bin/sh

#Gustaw:
!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
#/etc/X11/Xsession

#Gustaw:
/usr/bin/lxsession -s LXDE &
Penguintutor suggests to replace :
/etc/X11/Xsession
with
exec ck-launch-session startlxde
I will give it a try ...

When the vnc server starts with original xstartup script it outputs the following message :
[email protected]:~# /etc/init.d/tightvncserver start

New 'X' desktop is augustix:1

Starting applications specified in /home/pi/.vnc/xstartup
Log file is /home/pi/.vnc/augustix:1.log

Starting TightVNC server for pi
I renamed RPi to augustix and in this instance I was logged in as root ...
Let's check the log file /home/pi/.vnc/augustix:1.log :
24/05/13 22:44:17 Xvnc version TightVNC-1.3.9
24/05/13 22:44:17 Copyright (C) 2000-2007 TightVNC Group
24/05/13 22:44:17 Copyright (C) 1999 AT&T Laboratories Cambridge
24/05/13 22:44:17 All Rights Reserved.
24/05/13 22:44:17 See http://www.tightvnc.com/ for information on TightVNC
24/05/13 22:44:17 Desktop name 'X' (augustix:1)
24/05/13 22:44:17 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
24/05/13 22:44:17 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
xrdb: No such file or directory
xrdb: can't open file '/home/pi/.Xresources'
Also had a quick look at .xsession-errors file in /home/pi
It is huge but filled mainly (but not only) with only few types of error messages :
...
...
Xlib: extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
...
...
???
elinux.org sites suggests to inspect .config/openbox/lxde-rc.xml
It is a large file. Under <desktops> I found nothing unusual, I guess :
<desktops>
<!-- this stuff is only used at startup, pagers allow you to change them
during a session

these are default values to use when other ones are not already set
by other applications, or saved in your session

use obconf if you want to change these without having to log out
and back in -->
<number>2</number>
<firstdesk>1</firstdesk>
<names>
<!-- set names up here if you want to, like this:
<name>desktop 1</name>
<name>desktop 2</name>
-->
</names>
<popupTime>875</popupTime>
<!-- The number of milliseconds to show the popup for when switching
desktops. Set this to 0 to disable the popup. -->
</desktops>
I googled for info on lxde-rc.xml
It seems there is a lot of confusion around it.
Someone found 4 or 5 copies of the same file with slightly different names scattered all around the file system. Unless you know how LXDE / OpenBox is actually structured then you are searching in the dark.

Yet another file seems to be mentioned, .config/openbox/autostart.sh
There is no trace of it on my RPi.
The suggestion was to add this file and then add a line
exec openbox-session
to it.
Hmmm ... whatever ...

Gustaw
Posts: 21
Joined: Thu May 23, 2013 1:45 pm

Re: Getting SSH tunnelled / secured VNC to work

Fri May 24, 2013 10:41 pm

Gustaw wrote: Penguintutor suggests to replace :
/etc/X11/Xsession
with
exec ck-launch-session startlxde
I will give it a try ...
And I have just tried ...
Still does not work but I had another look into /home/pi/.vnc/augustix:1.log file ...
It records the last session that I attempted :

Code: Select all

24/05/13 23:26:21 Xvnc version TightVNC-1.3.9
24/05/13 23:26:21 Copyright (C) 2000-2007 TightVNC Group
24/05/13 23:26:21 Copyright (C) 1999 AT&T Laboratories Cambridge
24/05/13 23:26:21 All Rights Reserved.
24/05/13 23:26:21 See http://www.tightvnc.com/ for information on TightVNC
24/05/13 23:26:21 Desktop name 'X' (augustix:1)
24/05/13 23:26:21 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
24/05/13 23:26:21 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
xrdb: No such file or directory
xrdb: can't open file '/home/pi/.Xresources'
Obt-Message: XKB extension is not present on the server or too old
Obt-Message: Xinerama extension is not present on the server
Obt-Message: XRandR extension is not present on the server
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
Openbox-Message: Unable to find a valid menu file "/usr/share/lxde/openbox/menu.xml"
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".

[color=#FF0000]24/05/13 23:27:17 Got connection from client 192.168.1.103[/color]
24/05/13 23:27:17 Using protocol version 3.8
24/05/13 23:27:17 Enabling TightVNC protocol extensions
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
24/05/13 23:27:22 Full-control authentication passed by 192.168.1.103
24/05/13 23:27:22 Using tight encoding for client 192.168.1.103
24/05/13 23:27:22 rfbProcessClientNormalMessage: ignoring unknown encoding 16
24/05/13 23:27:22 Using image quality level 6 for client 192.168.1.103
24/05/13 23:27:22 rfbProcessClientNormalMessage: ignoring unknown encoding -223
24/05/13 23:27:22 Enabling LastRect protocol extension for client 192.168.1.103
24/05/13 23:27:22 Enabling cursor position updates for client 192.168.1.103
24/05/13 23:27:22 Enabling full-color cursor updates for client 192.168.1.103
24/05/13 23:27:22 Pixel format for client 192.168.1.103:
24/05/13 23:27:22   32 bpp, depth 24, little endian
24/05/13 23:27:22   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".

** (process:7077): WARNING **: removed previous socket file /tmp/.menu-cached-:1-pi
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
x-terminal-emulator: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".

(obconf:7115): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
obconf: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
lxpanel : X error: BadWindow (invalid Window parameter)
Xlib:  extension "RANDR" missing on display ":1".
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
[color=#FF0000]24/05/13 23:29:11 Client 192.168.1.103 gone[/color]
24/05/13 23:29:11 Statistics:
24/05/13 23:29:11   key events received 0, pointer events 3773
24/05/13 23:29:11   framebuffer updates 199, rectangles 6687, bytes 2619188
24/05/13 23:29:11     LastRect markers 180, bytes 2160
24/05/13 23:29:11     cursor shape updates 1, bytes 684
24/05/13 23:29:11     tight rectangles 6506, bytes 2616344
24/05/13 23:29:11   raw bytes equivalent 315590292, compression ratio 120.622629
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".
pcmanfm: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel : X error: BadWindow (invalid Window parameter)
lxpanel : X error: BadWindow (invalid Window parameter)
Xlib:  extension "RANDR" missing on display ":1".
lxpanel: /build/cairo-R_sIqg/cairo-1.12.2/src/cairo-xlib-surface.c:1061: _cairo_xlib_surface_draw_image: Assertion `ret' failed.
Xlib:  extension "RANDR" missing on display ":1".

gixy
Posts: 2
Joined: Sun Jul 14, 2013 11:10 pm

Re: Getting SSH tunnelled / secured VNC to work

Sun Jul 14, 2013 11:15 pm

Hi,
Same problem here. I found a solution by replacing depth 24 by depth 16... Got icons, desktop taskbar and normal right click behaviour. Hope this will help.
Denis

ah0b0
Posts: 20
Joined: Mon Jul 15, 2013 3:02 am
Location: USA

Re: Getting SSH tunnelled / secured VNC to work

Mon Jul 15, 2013 8:18 am

gixy wrote: I found a solution by replacing depth 24 by depth 16...
This worked perfectly. Thanks! :D

Ettore_M
Posts: 26
Joined: Sun Apr 08, 2012 10:48 am

Re: Getting SSH tunnelled / secured VNC to work

Mon Jul 15, 2013 9:32 am

gixy wrote:Hi,
Same problem here. I found a solution by replacing depth 24 by depth 16... Got icons, desktop taskbar and normal right click behaviour. Hope this will help.
Denis
Hi guys! I have kind of the same problem. The icons are displayed, but I can't get the taskbar to be shown. I'm getting frustrated. :? I tried to change both geometry and depth, but nothing happens. Please help if you can...
And, Gustaw, did the "exec ck-launch-session startlxde" work for you? Because I tried that too, but nothing changed. Maybe that's why Raspbian starts right with lxde..
Thank you.

Hector

Gustaw
Posts: 21
Joined: Thu May 23, 2013 1:45 pm

Re: Getting SSH tunnelled / secured VNC to work

Tue Oct 29, 2013 3:01 pm

I got secured VNC to work … somehow …

I had no patience or time to carry on back in May.
I was totally frustrated too so I had to steam off.

This is neither a place (wrong thread) nor time (I am busy – may be another time) to comment further on RPi "adventure" but ...
My two observations :
- RPi is not and it will never be like old ZX Spectrum (my first micro) or similar device; any parallels can be hugely misleading; this is not a piece of hardware (and OS) for a novice for various reasons unless in supervised environment where help is at hand; this is an excellent system for an enthusiast with plenty of spare time; that is my opinion
- "documentation" is letting RPi down; multitude of distros and various hardware setups make writing documentation challenging, I can understand that; I do not think online help via forums is the answer; for some yes for some not; inherent variability of OS setups, displays, SD cards etc etc etc is making troubleshooting very hard; this thread is an example; I had to digest various sources of info several times to get a reasonable understanding how this headless setup is supposed to work and how to achieve it; I learnt hard way; again not something for a complete computer newbie

OK, back to the subject.
After few months of "steaming off" I gave RPi another chance.
Gustaw wrote:For me the whole setup will make true sense if I can access RPi GUI desktop (LXDE) remotely and at least I know it can done.
Some comment here. I have neither space nor abundance of VDUs around at home to experiment with RPi with connected all peripherals. That is good for a couple of sessions with the old Sony CRT TV. I connected RPi to plasma TV too but only as a test. I could not leave it on the coffee table for ever – that would drive my dear wife crazy. So when I learnt I could run it headless I was very happy ... Until I tried it ... All described above ... I still believe the only really practical way of using RPi for experimenting is via SSH / VNC.

How I overcome the problems ?
Mixture of luck and knowledge.

I started from the beginning with fresh SD card, fresh image of Raspbian and fresh mind.

I was right back in May when I wrote :
Gustaw wrote:I decided to go for the secure VNC setup using SSH tunnelling.
That was probably a mistake (I was too ambitious ?) so I plan to take a step back and test just unsecured VNC to eliminate potential causes of my troubles.
This time I tested and "mastered" every step and tool in turn.

Basic SSH / PuTTY first. With pi user, with root user, with new created user.
Many instructions assume you are logged in as pi, some other as root. This can be a catch for some. Be clear whether you need to log in as pi or another user. This may make the difference.

Moved on to WinSCP. For me it is an essential tool, especially if logged in as root as you can easily and remotely add and edit files from your main rig in familiar environment saving time on playing with line editors.
This way I followed all steps to set up VNC script for starting the VNC server on booting.
Different sources use different names for the same file. Different sources give a bit different instruction on how to make the file to work. With necessary caution I was able to go through that.
Then I ... tested and mastered unsecured basic VNC. And it worked.
Instantly I answered my own question from my experiments in May.
Every user profile may have different desktop view in LXDE.
Back in May I was experimenting with customised user a/c which explains why I could not see the desktop icons. With user pi icons can be seen where they "should be". Now I know.
The misbehaving bottom tool bar ? I have not cracked that, i.e. I am not certain why it was happening. Probably something about geometry / display / overscan settings. This time round I have NOT set up the RPi to work with CRT so I did not play with display / overscan settings in raspi config. And this time the issue has not resurfaced. Possibly (???) display settings do impact VNC behaviour but I do not know that for certain. My advice would be : if you intend to use RPi in headless mode then just set up SD card with single Raspbian image, get it booted headlessly and set it up headlessly via SSH / PuTTY. Do not bother to use it with VDU and do not try to make it work with VDU as this may (possibly) have a knock off effect on your VNC setup.

Only then I moved on to securing VNC and ... surprisingly ... it went fairly painlessly. I had several things already setup from my experiments back in May, e.g. static IP, filtering on Norton, port forwarding on router etc etc etc. Even session settings in TightVNC client were already in place. So this time moving from unsecured basic VNC to secured SSH tunnelled VNC worked nearly instantly. It was a matter of adding –localhost to the VNC booting script. Voila ...

In summary :
- do not rush the process, do it in steps and test every step
- start with new fresh copy of the Raspbian OS, make only necessary changes to make VNC to work, do not try to build the setup that will support both VNC, HDMI and Composite etc (whatever you think you may ever need) unless you are a pro, as a newbie you are likely to get into trouble
- master the tools at your disposal, SDFormatter, Win32DiskImager, Windows (if you are using Windows) DiskPart (for clearing SD card partitions before reformatting), PuTTy, WinSCP and TightVNC client at the end

OK, so it is a success story but I paid a relatively high price for it in terms of lost time and the initial high level of frustration (nearly dumped RPi completely and for good).

The subject of my next thread is likely to be :
How to make Raspbian to boot from ****** Noobs tool ?
So far I have no idea.
My conclusion so far is that a basic Raspbian image written to SD card is the simplest and the easiest way to make RPi work, especially headlessly.
I made BerryBoot to work.
Initial test with VNC was, as usual, a total failure.
Also basic BerryBoot requires access to internet to download OS image – a big disadvantage compared to Noobs.
In my setup that was tricky : I could try to run in either headlessly via VNC with network access or with VDU and keyboard / mouse but without network access (I would not bother to try to configure for it for WLAN). Somehow at the end I was able to make VNC to work. I think the trick is to start VNC session early enough so that timeout setting (10s as default ?) in cmdline scrip (or whatever) is not triggered.
Via VNC I was able to complete Raspbian installation with BerryBoot. Voila ...
But Noobs ?
Oh, what's a pain in ...
OK, it has OS images on SD card so no network / internet access is necessary.
VNC does not seem to be an option – a real limitation.
You are forced to run it with VDU attached.
Trick with single distro did not seem to work for me – or at least what I assumed early on when I could not see Raspbian booting up.
OK, then pressing keys to switch display setting – what a discovery !
OK, that worked and I was able to seer Noobs main screen on my old Sony CRT.
I even forced it to run Raspbian installation. I was even able to get to Recovery screen with Shift key.
Wow !
But it is still useless effort.
Raspbian does not boot even if I was able to check that some Linux partitions have been created on the card.
I try to boot and only red Power On LED stays on.
No trace of card communication activity.
Some posts on forums suggest the SD card (32GB in my case) might be not right.
The same type of card I used for simple Raspbian installation from image and BerryBoot.
And they work.
So why on earth Noobs is so picky ?

atiquealahi
Posts: 1
Joined: Tue Oct 29, 2013 11:08 am

Re: Getting SSH tunnelled / secured VNC to work

Tue Oct 29, 2013 3:08 pm

NoMachine is a Terminal Server and Remote Access solution optimized for speed and security. All connections are piped through SSH. NoMachine is far faster than just piping VNC through SSH thanks to their compression algorithms. Plus, they offer RDP and Remote X sessions and clients for Windows, Mac & Linux.

For more info check out http://www.rubbish-spam-stuff-redacted-by-mod.com they helped me through this quite well.

Gustaw
Posts: 21
Joined: Thu May 23, 2013 1:45 pm

Re: Getting SSH tunnelled / secured VNC to work

Tue Oct 29, 2013 4:10 pm

atiquealahi wrote:NoMachine is a Terminal Server and Remote Access solution optimized for speed and security.
Thanks for the info.

Back in May I came across NX and it caught my interest but found no trace of how to get it run with RPi.
Now I found some info here :
http://www.tiaowiki.com/w/Install_NX_Se ... spberry_Pi
At the moment I play pretty safe with RPi as not to distabilise what I already have. I even made a back up of the Wheezy image. Just in case.
So I will leave NX for later - when I have nothing better to do. As it stands VNC is good enough for me - as long as it is working.
atiquealahi wrote:For more info check out http://www.[atiquealahi's spam redacted by mod].com they helped me through this quite well.
Hmmm ... A Dream SEO ??? Hmmm ...

pocjoc
Posts: 1
Joined: Mon Jul 13, 2015 2:55 pm

Re: Getting SSH tunnelled / secured VNC to work

Mon Jul 13, 2015 2:59 pm

Hi,

if you cannot see the manu bar and the icons are moving up and down, normally it is because it has no enough privilegies.
You can solve it running it with 'sudo'

Code: Select all

sudo vncserver

Return to “Troubleshooting”