Page 1 of 1

Raspbian (latest) - tigerVNC not working?

Posted: Mon Jun 24, 2019 3:38 pm
by pi-anazazi
Hi!

I started installing latest Raspbian (Buster with GUI) on a raspi 2. Removed the VNC coming with the image, rebooted and installed TigerVNC from the "install and remove software" tool in the GUI.

I can start the VNCserver:

Code: Select all

vncserver -localhost no 
Cleaning stale pidfile '/home/pi/.vnc/raspberrypi:1.pid'!

New 'raspberrypi:1 (pi)' desktop at :1 on machine raspberrypi

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

Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/pi/.vnc/passwd raspberrypi:1 to connect to the VNC server.

but when I do on client:

Code: Select all

vncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/pi/.vnc/passwd IP_raspi:1
I get on the client "opening password file failed":

Code: Select all

TigerVNC Viewer 64-bit v1.9.80
Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.

Mon Jun 24 17:33:47 2019
 DecodeManager: Detected 6 CPU core(s)
 DecodeManager: Creating 4 decoder thread(s)
 CConn:       Connected to host 10.0.0.5 port 5901
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
 CConnection: Choosing security type VeNCrypt(19)
 CVeNCrypt:   Choosing security type VncAuth (2)
[b] CConn:       Opening password file failed[/b]
The server says in the log:

Code: Select all

...
Mon Jun 24 17:33:47 2019
 Connections: accepted: IP_client::36308
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VeNCrypt(19)
 SVeNCrypt:   Client requests security type VncAuth (2)
terminate called after throwing an instance of 'rdr::EndOfStream'
terminate called recursively
(EE) 
(EE) Backtrace:
(EE) 
(EE) 
Fatal server error:
(EE) Caught signal 6 (Aborted). Server aborting
(EE) 
syswrite() on closed filehandle WH at /usr/bin/vncserver line 912.
I only found this here:

https://github.com/TigerVNC/tigervnc/issues/800

...which gives me little hope.

Has anybody managed to get TigerVNC up and running on raspbian? :-)

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon Jun 24, 2019 5:46 pm
by pi-anazazi
PS: I tried the built-in tightVNC server, but that requires tightVNC viewer and is not compatible to tigerVNC I have installed on all my machines. :-(

So: Any way to get tigerVNC server to work on raspbian?

Re: Raspbian (latest) - tigerVNC not working?

Posted: Fri Jun 28, 2019 2:03 pm
by pi-anazazi
Really? Nobody running TigerVNC?

Re: Raspbian (latest) - tigerVNC not working?

Posted: Fri Jun 28, 2019 2:26 pm
by mattmiller
Nope -we all all use the standard RealVNC server that comes as standard

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon Aug 12, 2019 11:47 am
by acavalin
Hello I found that this is a problem related to libunwind8 and the function _Unwind_RaiseException that overrides the one supplied in libgcc_s.so.1.
See https://bugs.debian.org/cgi-bin/bugrepo ... =932499#47

It works if you run the server like this:

Code: Select all

LD_PRELOAD=/lib/.../libgcc_s.so.1 Xtigervnc ...
but this is only a hack... the bug is fixed in tigervnc/1.9.0+dfsg-1 but in raspbian we only have tigervnc/1.9.0+dfsg-3.

Does someone knows how to tell the raspbian devs about this problem and bugfix?

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon Aug 12, 2019 1:35 pm
by fruitoftheloom
acavalin wrote:
Mon Aug 12, 2019 11:47 am
Hello I found that this is a problem related to libunwind8 and the function _Unwind_RaiseException that overrides the one supplied in libgcc_s.so.1.
See https://bugs.debian.org/cgi-bin/bugrepo ... =932499#47

It works if you run the server like this:

Code: Select all

LD_PRELOAD=/lib/.../libgcc_s.so.1 Xtigervnc ...
but this is only a hack... the bug is fixed in tigervnc/1.9.0+dfsg-1 but in raspbian we only have tigervnc/1.9.0+dfsg-3.

Does someone knows how to tell the raspbian devs about this problem and bugfix?

The package is provided by Debian, you need to contact the package maintainers:

https://packages.debian.org/stable/source/tigervnc

Re: Raspbian (latest) - tigerVNC not working?

Posted: Thu Dec 05, 2019 4:44 pm
by raspphibian
mattmiller wrote:
Fri Jun 28, 2019 2:26 pm
Nope -we all all use the standard RealVNC server that comes as standard
I think the raspberry pi foundation makes deals with some non-free software vendors to include their software in the raspbian repo or NOOBS, and they get paid for including their limited trial versions. RealVNC is one of these. It is non-free software which doesn't allow you to use it commercially or with more than 5 computers or something. There might be some more restrictions on it, I didn't fully read their license. The point it is that it's not free and so it is better to learn the free and open source TigerVNC, which seems to be the best FOSS VNC software right now.

Here are my notes on how to set it up. This works fine for me on my LAN.

debian:
sudo apt install tigervnc-scraping-server tigervnc-common
for config:
tigervncpasswd
run local display mirror vnc server:
x0vncserver -rfbauth ~/.vnc/passwd

arch:
sudo pacman -S tigervnc
for initial config config:
$ vncserver
If at any stage one needs to change the previously defined password, the vncpasswd tool can be called:
$ vncpasswd
run local display mirror vnc server:
$ x0vncserver -rfbauth ~/.vnc/passwd
Running vncserver for virtual (headless) sessions:
https://wiki.archlinux.org/index.php/Ti ... )_sessions

connect with
$ vncviewer <ip address>

Re: Raspbian (latest) - tigerVNC not working?

Posted: Thu Dec 05, 2019 5:40 pm
by wildfire
raspphibian wrote:
Thu Dec 05, 2019 4:44 pm
I think the raspberry pi foundation makes deals with some non-free software vendors to include their software in the raspbian repo or NOOBS, and they get paid for including their limited trial versions.
Really, where did you get those thoughts from?

I have some thoughts of my own about your post, unfortunately I'm certain if I post them I'd be in trouble with the mods.

Re: Raspbian (latest) - tigerVNC not working?

Posted: Thu Dec 05, 2019 9:58 pm
by mattmiller
I think the raspberry pi foundation makes deals with some non-free software vendors to include their software in the raspbian repo or NOOBS, and they get paid for including their limited trial versions. RealVNC is one of these.
I'd be much more inclined to believe that RealVNC supply RPi with their "limited" (doesn't affect me at all controlling 10 Pi over my LAN) product as bit of free product placement advertising.

It works really well OOB

It doesn't bother me at all if its not "free" software as there are plenty of "free" alternatives is they ever decided to pull it from Pi

Until that day (ever) comes - I'll just continue to enjoy their largess :)

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon Jan 27, 2020 6:14 am
by intgir
mattmiller wrote:
Thu Dec 05, 2019 9:58 pm
I'd be much more inclined to believe that RealVNC supply RPi with their "limited" (doesn't affect me at all controlling 10 Pi over my LAN) product as bit of free product placement advertising.

It works really well OOB

It doesn't bother me at all if its not "free" software as there are plenty of "free" alternatives is they ever decided to pull it from Pi

Until that day (ever) comes - I'll just continue to enjoy their largess :)
I prefer to use free, open source software like the one OP mentions because it is more secure. Where can I review the source code for RealVNC? How do I know that it isn't compromising my system?

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon Jan 27, 2020 12:05 pm
by fruitoftheloom
intgir wrote:
Mon Jan 27, 2020 6:14 am
mattmiller wrote:
Thu Dec 05, 2019 9:58 pm
I'd be much more inclined to believe that RealVNC supply RPi with their "limited" (doesn't affect me at all controlling 10 Pi over my LAN) product as bit of free product placement advertising.

It works really well OOB

It doesn't bother me at all if its not "free" software as there are plenty of "free" alternatives is they ever decided to pull it from Pi

Until that day (ever) comes - I'll just continue to enjoy their largess :)
I prefer to use free, open source software like the one OP mentions because it is more secure. Where can I review the source code for RealVNC? How do I know that it isn't compromising my system?

https://www.realvnc.com/en/legal/#tandc

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon Jan 27, 2020 1:30 pm
by pi-anazazi
I simply use now headless buster, only access via ssh.

I still miss tigerVNC though...

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon Jan 27, 2020 1:38 pm
by FTrevorGowen
pi-anazazi wrote:
Mon Jan 27, 2020 1:30 pm
I simply use now headless buster, only access via ssh.
...
with X-forwarding enabled maybe? That's the "simplest" approach Pi (or other box with X-win support) to Pi.
Trev.

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon Jan 27, 2020 2:20 pm
by pi-anazazi
headless as in "buster light", i.e. without any GUI installed at all... ;-)

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon May 04, 2020 5:17 am
by tmbdev
You need to set both a regular and a view-only password for TigerVNC to work on Raspbian. Yes, that's a bug, but it's fortunately not a big problem once you know about it.

(The reason many people want to run TigerVNC is that RealVNC doesn't play particularly nicely with non-RealVNC clients, like those that are standard on Ubuntu. Also, ssh tunnels are often preferable to RealVNC's protocols.)

Re: Raspbian (latest) - tigerVNC not working?

Posted: Mon May 04, 2020 1:56 pm
by bls
Agree most people here use RealVNC, but TigerVNC and TightVNC are viable options.

If you'd prefer to use one of those two VNC servers with virtual displays (rather than controlling the RPi console), have a look at https://github.com/gitbls/RPiVNCHowTo. It shows you how to set up those two VNC servers as being systemd-started on demand without using vncserver at all. It does require a display manager, such as lightdm or xdm, but most systems with X have one of them installed.

Re: Raspbian (latest) - tigerVNC not working?

Posted: Wed Jul 15, 2020 12:47 pm
by strongcoffee
by tmbdev » Mon May 04, 2020 5:17 am

You need to set both a regular and a view-only password for TigerVNC to work on Raspbian. Yes, that's a bug, but it's fortunately not a big problem once you know about it.
Thanks for that tip, I finally got it to work.
I use TigerVNC Viewer 1.10.1 on my Mac to connect to TigerVNCserver running on my raspberry pi 4. I create an ssh tunnel first; replace 192.168.x.x with the IP address of your raspberry pi.

Code: Select all

ssh -NTf -L 5901:localhost:5901 192.168.x.x 
In the client I specify localhost::5901 and after providing the password a connection is established. Without the ssh tunnel (i.e. connecting directly to rpiIPaddress::5901) does not work for me, but connecting over ssh is more secure so preferable.

Re: Raspbian (latest) - tigerVNC not working?

Posted: Wed Jul 15, 2020 7:53 pm
by wsanders
Running Buster (yes it's old.)

TigerVNC doesn't work out of the box because it only opens a socket on localhost.

Code: Select all

netstat -nta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:5901          0.0.0.0:*               LISTEN     
The aforementioned ssh tunnel technique should work, but the tunnel it creates is on localhost as well:

Code: Select all

$ netstat -nta | grep 590
tcp        0      0 127.0.0.1:5901          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:5902          0.0.0.0:*               LISTEN     
tcp6       0      0 ::1:5901                :::*                    LISTEN     
tcp6       0      0 ::1:5902                :::*                    LISTEN    
I haven't yet figured out how to fix this. (Gpsd behaves the same way, with the -G flag, which is supposed to create a listening socket, but the socket created is on localhost only.) I don't have a firewall running on the host. "Ssh -Y" works though.

The RealVNC that ships is incompatible with TigerVNC, which is the default VNC server present in Fedora.

Re: Raspbian (latest) - tigerVNC not working?

Posted: Sat Aug 08, 2020 3:57 pm
by ilg
> TigerVNC doesn't work out of the box because it only opens a socket on localhost.

That's correct, but you can start it with lots of options, including:

Code: Select all

vncserver -localhost no