raspipat
Posts: 9
Joined: Sun Jul 28, 2019 12:17 pm

RealVNC server in virtual mode - Enterprise license required?

Sat Aug 17, 2019 9:30 pm

I'm running my RPi 3b+ in headless mode (in other words, no physical monitor connected, and raspi-config'd to boot to CLI).

Thus, I have configured VNC server to start in virtual mode as follows;

Code: Select all

sudo systemctl enable vncserver-virtuald
sudo reboot
Upon rebooting the RPi, I can see that there is a 'vncserver-virtuald' process listening on port 5999.

When I try to connect a VNC viewer (running on my Mac) to the RPi at <hostname>:5999, I'm prompted to enter a userid & password.
Upon entering a valid system userid & password, I see a VNC Viewer error dialog saying: "Could not connect to VNC Server. Please ensure that you have the required license for this feature."
And I see the following error messages in the service logs for the "vncserver-virtuald" service;

Code: Select all

Aug 17 14:11:22 pi3bp-1 systemd[1]: Started VNC Server in Virtual Mode daemon.
Aug 17 14:11:22 pi3bp-1 vncserver-virtuald[1538]: main: started
Aug 17 15:03:46 pi3bp-1 vncserver-virtuald[1538]: Connections: connected: 2601:285:c000:def8:d426:4531:9594:91b7::59104 (TCP)
Aug 17 15:03:58 pi3bp-1 vncserver-virtuald[1538]: session started: user pi permissions f
Aug 17 15:03:58 pi3bp-1 vncserver-virtuald[1538]: Connections: authenticated: 2601:285:c000:def8:d426:4531:9594:91b7::59104 (TCP), as pi (se
curity RA4_128)
Aug 17 15:03:58 pi3bp-1 vncserver-virtuald[1538]: DaemonConnection: Launching new server instance for 2601:285:c000:def8:d426:4531:9594:91b7
::59104 (TCP), pi
Aug 17 15:03:58 pi3bp-1 vncserver-virtuald[2226]: pam_unix(vncserver:session): session opened for user pi by (uid=0)
Aug 17 15:03:59 pi3bp-1 vncserver-virtuald[1538]: Connections: disconnected: 2601:285:c000:def8:d426:4531:9594:91b7::59104 (TCP) ([ServerLau
nchFailed] Could not connect to VNC Server.  Please ensure that you have the required license for this feature.)
Aug 17 15:03:59 pi3bp-1 vncserver-virtuald[1538]: session ended: user pi
Do we need to acquire a special license to run VNC server in virtual mode now?

EDIT: I'm running VNC server V6.5.0.41824

Code: Select all

[email protected]:~ $ sudo apt show realvnc-vnc-server
Package: realvnc-vnc-server
Version: 6.5.0.41824
Priority: optional
Section: x11
Source: realvnc-vnc
Maintainer: RealVNC <[email protected]>
Installed-Size: 36.6 MB
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.4.0), libx11-6, libxext6, libxtst6
Recommends: cups
Suggests: avahi-daemon
Conflicts: tightvncserver, vnc-e, vnc4server
Replaces: vnc-e
Download-Size: 6,903 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.raspberrypi.org/debian buster/main armhf Packages
Description: VNC® Server
 VNC Server, from RealVNC, the original inventor of VNC technology, is remote access
 software that enables you to securely share one or more desktops on this
 computer with any number of other computers or devices.
 RealVNC recommends the realvnc-vnc-viewer package (VNC Viewer) for these other
 computers and devices, for seamless, secure and reliable connections.

raspipat
Posts: 9
Joined: Sun Jul 28, 2019 12:17 pm

Re: RealVNC server in virtual mode - Enterprise license required?

Sat Aug 17, 2019 10:25 pm

Maybe I just answered my own question....

According to the man page for vncserver-virtuald

Code: Select all

vncserver-virtuald(1)                                              VNC                                             vncserver-virtuald(1)

NAME
       vncserver-virtuald - VNC® Server in Virtual Mode daemon

SYNOPSIS
       vncserver-virtuald [OPTION...] [COMMAND]

DESCRIPTION
       vncserver-virtuald  is a daemon that starts VNC Server in Virtual Mode for each VNC Viewer that connects, to create virtual desk‐
       tops on demand. The daemon can be started manually, but is designed to be started automatically at system boot time; see Starting
       the daemon.  Note that an Enterprise subscription is required.
.....
An Enterprise license IS required.

Huhhh.... I could have sworn that I had used virtual mode in the past, without a special license.

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

Re: RealVNC server in virtual mode - Enterprise license required?

Sat Aug 17, 2019 11:47 pm

AFAIK a license is not required when making connections within your local network.
after entering vncserver command the address to use is shown on the screen.
For example:

Code: Select all

New desktop is raspberrypi:1 (192.168.1.147:1)
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

nigelbartlett1
Posts: 29
Joined: Mon May 06, 2019 9:39 am
Location: London UK

Re: RealVNC server in virtual mode - Enterprise license required?

Sun Aug 18, 2019 2:15 pm

Most software that we use is licensed. That does not mean that you have to pay to use it.

In the case of RealVNC on the Pi it is free for “non-commercial use” according to https://www.realvnc.com/en/raspberrypi/

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

Re: RealVNC server in virtual mode - Enterprise license required?

Sun Aug 18, 2019 2:22 pm

Strictly, it's only free if the VNC Server is running on a Raspberry Pi and the VNC client/viewer is running on Windows, Mac or Linux (including Raspbian).

If you want to run the VNC server on Windows, Mac, Linux (not Raspbian) and the VNC client/viewer on Raspbian you will need to pay for an Enterprise Licence.
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.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5053
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: RealVNC server in virtual mode - Enterprise license required?

Sun Aug 18, 2019 3:26 pm

raspipat wrote:
Sat Aug 17, 2019 9:30 pm
I'm running my RPi 3b+ in headless mode (in other words, no physical monitor connected, and raspi-config'd to boot to CLI).

Thus, I have configured VNC server to start in virtual mode as follows;

Code: Select all

sudo systemctl enable vncserver-virtuald
sudo reboot
...
I don't "do things that way" (ie. enable the server to start "on boot" which, IIUC, you're doing). According to the RPF docs. (IIRC) the recommended way is to first log-in by a SSH connection (eg. PuTTY) and manually start the server, optionally defining the display size if needed - see my notes here:
http://www.cpmspectrepi.uk/raspberry_pi ... uster.html
(Since the server is running on the Pi, 'tis already licensed).
It could be that the "boot time" startup cannot find the license info. (perhaps not launching as user "pi" maybe?)
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

ejolson
Posts: 3438
Joined: Tue Mar 18, 2014 11:47 am

Re: RealVNC server in virtual mode - Enterprise license required?

Sun Aug 18, 2019 4:25 pm

raspipat wrote:
Sat Aug 17, 2019 10:25 pm
Huhhh.... I could have sworn that I had used virtual mode in the past, without a special license.
I'm pretty sure I've run the server in that mode. It seems unlikely for such major functionality to have been removed without anyone noticing, but maybe you're the first person to notice.

The usual way of running RealVNC server is attached to the video framebuffer so that programs which leverage the 3D rendering hardware continue to run with a reasonable speed. This is the most popular and recommended way of using RealVNC. If I remember correctly, starting with Stretch a setuid wrapper was put in place of the binary for the X server. This is an example of breaking things for a minor security gain. Though I don't remember the details, it's possible the wrapper has to be removed for RealVNC virtual mode to work.

Some information in this post may be relevant, though one may have to read the whole thread.

trejan
Posts: 526
Joined: Tue Jul 02, 2019 2:28 pm

Re: RealVNC server in virtual mode - Enterprise license required?

Sun Aug 18, 2019 4:54 pm

The old Jessie era guide for RealVNC on RPi mentions virtual mode but doesn't say anything about a license being required. Maybe you need to sign into a cloud account now? If not then its a bug.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5053
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: RealVNC server in virtual mode - Enterprise license required?

Sun Aug 18, 2019 5:09 pm

trejan wrote:
Sun Aug 18, 2019 4:54 pm
The old Jessie era guide for RealVNC on RPi mentions virtual mode but doesn't say anything about a license being required. Maybe you need to sign into a cloud account now? If not then its a bug.
IIRC, signing in to a cloud account is (maybe) only "necessary" for "external" (ie. not local LAN) network access. I don't need to "locally" using either server mode - just a RealVNC viewer (or webpage access, java-based?) see (older notes/examples than those previously linked to): http://www.cpmspectrepi.uk/raspberry_pi ... Pixel.html
http://www.cpmspectrepi.uk/raspberry_pi ... splay.html
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

raspipat
Posts: 9
Joined: Sun Jul 28, 2019 12:17 pm

Re: RealVNC server in virtual mode - Enterprise license required?

Sun Aug 18, 2019 7:24 pm

Well, since it seems the RealVNC-supplied vncserver-virtuald.service systemd service configuration seems to require an Enterprise license.... I created my own systemd service configuration to start a vncserver in virtual mode.

Here's what I did....
Create file /usr/lib/systemd/system/vncserver-pi.service containing;

Code: Select all

[Unit]
Description=VNC Server in Virtual Mode daemon
After=network.target

[Service]
User=pi
Type=forking
ExecStart=/usr/bin/vncserver -geometry 1600x900 :1
ExecStop=/usr/bin/vncserver -kill :1
Restart=on-failure
RestartSec=5
KillMode=process

[Install]
WantedBy=multi-user.target
Then run;
sudo systemctl daemon-reload
sudo systemctl enable vncserver-pi
sudo reboot

Upon rebooting, now my system has a vncserver running in virtual mode, and I'm able to connect a VNC viewer running on my Mac by configuring the VNC viewer to connect to <hostname>:1

ejolson
Posts: 3438
Joined: Tue Mar 18, 2014 11:47 am

Re: RealVNC server in virtual mode - Enterprise license required?

Sun Aug 18, 2019 7:43 pm

raspipat wrote:
Sun Aug 18, 2019 7:24 pm
Well, since it seems the RealVNC-supplied vncserver-virtuald.service systemd service configuration seems to require an Enterprise license.... I created my own systemd service configuration to start a vncserver in virtual mode.

Here's what I did....
Create file /usr/lib/systemd/system/vncserver-pi.service containing;

Code: Select all

[Unit]
Description=VNC Server in Virtual Mode daemon
After=network.target

[Service]
User=pi
Type=forking
ExecStart=/usr/bin/vncserver -geometry 1600x900 :1
ExecStop=/usr/bin/vncserver -kill :1
Restart=on-failure
RestartSec=5
KillMode=process

[Install]
WantedBy=multi-user.target
Then run;
sudo systemctl daemon-reload
sudo systemctl enable vncserver-pi
sudo reboot

Upon rebooting, now my system has a vncserver running in virtual mode, and I'm able to connect a VNC viewer running on my Mac by configuring the VNC viewer to connect to <hostname>:1
That's fantastic!

Hopefully companies like RealVNC will someday understand systemd well enough to provide a working script in the first place.

User avatar
sconemad
Posts: 228
Joined: Thu Apr 28, 2016 1:47 pm
Location: Cambridge, UK
Contact: Website

Re: RealVNC server in virtual mode - Enterprise license required?

Mon Aug 19, 2019 9:27 am

I think the confusion here is over what vncserver-virtuald does. It is a service which manages VNC virtual mode sessions - the idea being that you connect to the service (usually on port 5999), login using your system credentials, and it will connect you to your VNC virtual mode session. If you don't have one running then it will start one up by running the "vncserver" command. This is an Enterprise feature of VNC Connect, only usable with an Enterprise subscription. It's typically used where you have the need to manage lots of virtual mode sessions running on one machine.

For a Raspberry Pi with a single user where you typically only want to run a single virtual mode session, you can start the session simply with the "vncserver" command, or configure this to happen automatically on boot using systemd as described by others here.

EDIT: Just to clarify, it's only the vncserver-virtuald service that requires an Enterprise subscription (which has always been the case). Running virtual mode sessions via "vncserver" is possible with the free Raspberry Pi edition.

raspipat
Posts: 9
Joined: Sun Jul 28, 2019 12:17 pm

Re: RealVNC server in virtual mode - Enterprise license required?

Mon Aug 19, 2019 7:18 pm

sconemad wrote:
Mon Aug 19, 2019 9:27 am
I think the confusion here is over what vncserver-virtuald does. It is a service which manages VNC virtual mode sessions - the idea being that you connect to the service (usually on port 5999), login using your system credentials, and it will connect you to your VNC virtual mode session. If you don't have one running then it will start one up by running the "vncserver" command. This is an Enterprise feature of VNC Connect, only usable with an Enterprise subscription. It's typically used where you have the need to manage lots of virtual mode sessions running on one machine.
Thanks @sconemad. Yup, guilty as charged... I incorrectly assumed the vncserver-virtuald service was a direct implementation of the virtual mode vncserver itself.
But now, after reading the man pages more thoroughly, and reading your post... I understand that it's a manager of vncserver sessions. Makes sense.

Return to “General discussion”