2

I want to use the VNC shipped with a Raspberry Pi. My goal is to offer the possibility to several users to connect to their own home at the same time. By default, I can connect to the "pi" user.

I have created 3 accounts "lary" "gary" and "hary". They have their own home : "/home/lary", "/home/gary" and "/home/hary". With a VNC client I would like to have "lary" being able to connect to the content of "/home/lary". Same for "gary" and "hary" at the same time.

Can I use ports for that ? Which files do I need to change ?

  • As far as I understand connecting to a specific users home isn't an issue of VNC. You have to ensure with mount options and user rights that the user is just connected to it's home directory. Then this is shown in VNC. – Ingo Jul 11 '19 at 09:41

1 Answers1

1

The default RealVNC installation shows the monitor screen, so it will show the display of whoever is using this.

You can start a virtual desktop and can run multiple instances.

The RealVNC documentation explains how to do this.

See https://www.raspberrypi.org/documentation/remote-access/vnc/README.md

To create and connect to a virtual desktop:

On your Raspberry Pi (using Terminal or via SSH), run vncserver. Make note of the IP address/display number that VNC Server will print to your Terminal (e.g. 192.167.5.149:1).

On the device you'll use to take control, enter this information into VNC Viewer.

It is also possible to create a systemd service to start vncserver instances.

https://raspberrypi.stackexchange.com/a/39374/8697 is a service I used with tightvncserver; this should also work with RealVNC (with minor changes for user)

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • Thanks. I checked, but I didn't find any information about how to setup several virtual desktops for several users. Do I have change change a config file ? – Peter Estiven Jul 11 '19 at 08:49
  • The usual way is for each user to first ssh in to the machine and run "vncserver", and connect to the address:display shown (since the displays are allocated dynamically). – Andrew Wedgbury Jul 11 '19 at 10:38