English Turkish
The stored password is not encrypted; anyone who has access to the password file can find the plain-text password.
Proceed to xref:TigerVNC.adoc#s4-starting-vncserver[Starting VNC Server].
Configuring VNC Server for Two Users
If you want to configure more than one user on the same machine, create different template-type service files, one for each user.
Create two service files, for example `vncserver-_USER_1_pass:attributes[{blank}]@.service` and `vncserver-_USER_2_pass:attributes[{blank}]@.service`. In both these files substitute _USER_ with the correct user name.
Set passwords for both users:
$ su - USER_1
$ vncpasswd
$ su - USER_2
$ vncpasswd
Starting VNC Server
To start or enable the service, specify the display number directly in the command. The file configured above in xref:TigerVNC.adoc#configuring-vncserver[Configuring the first VNC connection] works as a template, in which `%i` is substituted with the display number by `systemd`. With a valid display number, execute the following command:
# systemctl start vncserver@:display_number.service
You can also enable the service to start automatically at system start. Then, when you log in, `vncserver` is automatically started. As `root`, issue a command as follows:
# systemctl enable vncserver@:display_number.service
At this point, other users are able to use a VNC viewer program to connect to the VNC server using the display number and password defined. Provided a graphical desktop is installed, an instance of that desktop will be displayed. It will not be the same instance as that currently displayed on the target machine.
Configuring VNC Server for Two Users and Two Different Displays
For the two configured VNC servers, vncserver-USER_1@.service and vncserver-USER_2@.service, you can enable different display numbers. For example, the following commands will cause a VNC server for USER_1 to start on display 3, and a VNC server for USER_2 to start on display 5:
# systemctl start vncserver-USER_1@:3.service
# systemctl start vncserver-USER_2@:5.service
Terminating a VNC Session
Similarly to enabling the `vncserver` service, you can disable the automatic start of the service at system start:
# systemctl disable vncserver@:display_number.service
Or, when your system is running, you can stop the service by issuing the following command as `root`: