MarkDH102
Posts: 329
Joined: Fri Feb 13, 2015 3:18 pm

OK, what am I doing wrong with Stretch and X11vnc

Tue Sep 05, 2017 11:56 am

I have waited a few weeks since my first attempt at this and today a brand new Sandisk 16GB card arrived.
Got latest Stretch image. Burned to card on PC (Win32Disk imager).
Connected Pi 2B to HDMI on TV, keyboard and mouse.
Did a dist-upgrade, installed x11vnc and set up X11VNC to use 1920 * 1080
Unplugged from TV, KBD and MOUSE.
Connect in using TightVNC on my PC.
Set a Samba share to Win10.
Installed lxml, xdotool and pushbullet (phone notifications).
Copied my (working on this Pi with the previous Jessie SD card) python apps into my home/pi/MarkH folder. Ran no problem.
Oh - the time is wrong (seems to be a common issue with my Pi's) so opened Preferences menu to check/adjust.
My WIn10 tightvnc connection then "closed down gracefully" as it put it.
The Pi is still running and accessible from the Win10 share.
This is exactly the same issue I faced a few weeks ago. Random crashing? of the X11VNC server?
Can anyone help me out here please before I tear what remaining hair I have out.
Thanks.

These are the steps I have always used to install X11VNC...

sudo apt-get install x11vnc
x11vnc -storepasswd
Create/edit the VNC start-up configuration file, stored in your home directory:
nano ~/.xsessionrc
# Start X11VNC
x11vnc -bg -nevershared -forever -tightfilexfer -usepw -display :0
And save
Make the file executable:
chmod 775 ~/.xsessionrc

sudo nano /boot/config.txt
Set the following line to force HDMI to be the only detected connection, i.e. disable the analogue video default:
hdmi_force_hotplug=1
Set the HDMI “group” and “mode” number to select the default resolution. You can find these codes on Wikipedia or internet searches. To start with, a couple of useful modes:
Full HD 1920×1080@60Hz:
hdmi_group=2
hdmi_mode=82
And save

klricks
Posts: 6508
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: OK, what am I doing wrong with Stretch and X11vnc

Tue Sep 05, 2017 12:46 pm

Why not use the RealVNC? It is much much better then tightvnc and is pre-installed in Raspbian and just works.

Advantages:
- Encrypted connection
- The local session is displayed
- Copy & Paste works
- Can save user & password for one click access (RealVNC viewer)
- Auto reconnect on RPi reboot
- Optional cloud service lets you connect from anywhere.
- Easy file transfer tool.

Minor issue:
- If running 'headless' the resolution must be set in /boot/config.txt
- For encryption and some of the other features above you must use Realvnc viewer software: https://www.realvnc.com/en/connect/download/viewer/
- If using cloud service must create an account (free).
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

MarkDH102
Posts: 329
Joined: Fri Feb 13, 2015 3:18 pm

Re: OK, what am I doing wrong with Stretch and X11vnc

Tue Sep 05, 2017 1:55 pm

Cheers.
I tried to use RealVNC a while back (when it first came out) but ran into some problems.
I've just enabled it and it seems to be working the way I want now.
I will reserve final judgement until I have fully configured my Pi with the graphics packages I usually run.
Just a tiny bit frustrating that something that has always worked for me has been broken.
That's what I dislike so much about Linux...

Chips
Posts: 194
Joined: Sat Aug 18, 2012 8:21 pm

Re: OK, what am I doing wrong with Stretch and X11vnc

Sat Sep 09, 2017 7:09 pm

Looks like x11vnc is broken in stretch :(
It caught signal 6 just few seconds after a connection...

Where should we submit this problem ?

fruitoftheloom
Posts: 20196
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: OK, what am I doing wrong with Stretch and X11vnc

Sat Sep 09, 2017 8:33 pm

Chips wrote:
Sat Sep 09, 2017 7:09 pm
Looks like x11vnc is broken in stretch :(
It caught signal 6 just few seconds after a connection...

Where should we submit this problem ?

X11 and similar software conflict with RealVNC, try removing RealVNC !
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

User avatar
DougieLawson
Posts: 35594
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: OK, what am I doing wrong with Stretch and X11vnc

Sat Sep 09, 2017 9:06 pm

fruitoftheloom wrote:
Sat Sep 09, 2017 8:33 pm
X11 and similar software conflict with RealVNC, try removing RealVNC !
Isn't that the wrong way round since RealVNC is far superior to tightvnc, x11vnc and xrdp combined.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Chips
Posts: 194
Joined: Sat Aug 18, 2012 8:21 pm

Re: OK, what am I doing wrong with Stretch and X11vnc

Sun Sep 10, 2017 8:08 am

fruitoftheloom wrote:
Sat Sep 09, 2017 8:33 pm
X11 and similar software conflict with RealVNC, try removing RealVNC !
Wow... i just did the following:

Code: Select all

sudo apt-get remove realvnc-vnc-server realvnc-vnc-viewer
And now my x11vnc works flawlessly :)
Looks like even not started realvnc did something bad to x11vnc...

Thanks

fruitoftheloom
Posts: 20196
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: OK, what am I doing wrong with Stretch and X11vnc

Sun Sep 10, 2017 8:25 am

Chips wrote:
Sun Sep 10, 2017 8:08 am
fruitoftheloom wrote:
Sat Sep 09, 2017 8:33 pm
X11 and similar software conflict with RealVNC, try removing RealVNC !
Wow... i just did the following:

Code: Select all

sudo apt-get remove realvnc-vnc-server realvnc-vnc-viewer
And now my x11vnc works flawlessly :)
Looks like even not started realvnc did something bad to x11vnc...

Thanks
FYI RealVNC is the original VNC software and therefore software like x11vnc, xrdp and similar cause conflicts, it is NOT RealVNC which is BAD it is the other software which is not adhering to original design.

RealVNC was included with the Raspbian Operating System because it was tweaked by the RealVNC Developers to work with Raspbian, and also being a Cambridge UK business like the RPF/RPT it is nice to know we are supporting them:

https://en.wikipedia.org/wiki/Virtual_Network_Computing
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

dennisdunbar
Posts: 20
Joined: Sun Aug 26, 2012 9:56 am
Location: Washington, DC

Re: OK, what am I doing wrong with Stretch and X11vnc

Wed Apr 04, 2018 3:11 pm

While i appreciate the cheerleading for the RealVNC company in the U.K., and I agree RealVNC works pretty good ( although I never did get it to work outside my local network ).

I really do not like that it is apparently crippled and will not work with other viewers -- as far as I can tell.

And there is a large commercial component, "establish an account" etc.

For me, I will stay with the x11VNC.

Removing RealVNC as described above made my system work perfectly.
Many many many RPi, RPi B, RPi 3, RPi B+, RPi 3 B+ and one Zero running 20-30 websites, Word Press, FreePBX, PiAware, PrivateEyePi.

davethomaspilot
Posts: 104
Joined: Tue Apr 29, 2014 6:18 pm

Re: OK, what am I doing wrong with Stretch and X11vnc

Wed Feb 20, 2019 12:34 am

Ok, so you can fix x11vnc by just getting a more recent version that what's in the latest version of stretch.

You can't get it with apt-get install, probably because there seems to be a push to use realvnc instead.

Ok, fine, but they are not equivalent, especially if you want to use the more advanced features.

I do like that realvnc will support multiple, vitrual displays. So, I can run multiple, Qt applications in full screen mode. Users can vnc connect to associated displays using the :port suffix on the hostname. I want to use that!

But, I can't do things that are necessary for what I'm doing.

For example, I use rpis that do little more than drive a display and show the remote desktop of another networked pi. I don't want any dependency on whether the vncserver pi boots before or after the vnc client pi. The vnc client should show the desktop of the vnc server p when it boots, or if it comes up first, when the vnc server pi (and my application) start..

I've accomplished this with x11vnc by the use of a reverse connection.

The vncserver pi starts vncserver on boot. Later, an application checks to see if the vnc client(s) have already connected. If so, that's fine. If not, the server booted before the client(s) initiated a vncviewer connection. So, a reverse connection is done.

This all works fine with x11vnc, but when I'm having lots of trouble trying to do the same thing with realvnc.

When I try to do a reverse connection with realvnc server, a new server instance is created. That's not what I want. I want listening clients to initiate a connection to the server that's already running. Can I do that with realvnc server?

So, maybe I could just issue an ssh command from my application running on the vnc server instead of using the reverse connection feature. But, It seems you can't launch a realvnc viewer from a script? You have to get use the graphical widget?

So, I figured I'd try using xtightvncviewer with the realVnc server. This works, if I let it prompt for a password, but authentication fails if I try using a file generated by vncpasswd. No clue why--I'm using VncAuth Authentication on the server.

Any help with the following would be appreciated:

1) Do a reverse connection without starting a new server--just tell a listening viewer to connect to an existing server
2) How to launch a realvnc viewer from a script (with no user intervention)
3) how to get a 3rd party viewer (running on rpi stretch) like xtightvncviewer to connect withouth user intervention

At least if I end up sticking with x11vnc, others will know that it can be a bit of hassle to get realvnc working if you are launching servers and viewers from scripts or applicatiion software.

Return to “General discussion”