This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
deb10:vnc [2020/10/31 13:05] – Bernard Condrau | deb10:vnc [2025/08/04 14:59] (current) – Bernard Condrau | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== VNC ====== | ====== VNC ====== | ||
+ | * [[https:// | ||
+ | |||
===== Installation ===== | ===== Installation ===== | ||
- | - Install [[https:// | + | - Install [[https:// |
- | - Open the ports in your [[deb9: | + | - Open the ports in your [[deb9: |
- | sudo ufw allow 5902/ | + | $ sudo ufw allow 5902/ |
- Establish a port forward for port 5902 for your client' | - Establish a port forward for port 5902 for your client' | ||
- Check connections to the VNC server with a [[https:// | - Check connections to the VNC server with a [[https:// | ||
Line 9: | Line 11: | ||
===== Setup as service ===== | ===== Setup as service ===== | ||
- Next, we’ll set up the VNC server as a systemd service so we can start, stop, and restart it as needed, like any other service. This will also ensure that VNC starts up when your server reboots. | - Next, we’ll set up the VNC server as a systemd service so we can start, stop, and restart it as needed, like any other service. This will also ensure that VNC starts up when your server reboots. | ||
- | - First, create a new unit file called / | + | - First, create a new unit file called / |
- The @ symbol at the end of the name will let us pass in an argument we can use in the service configuration. We’ll use this to specify the VNC display port we want to use when we manage the service:< | - The @ symbol at the end of the name will let us pass in an argument we can use in the service configuration. We’ll use this to specify the VNC display port we want to use when we manage the service:< | ||
Description=Start TightVNC server at startup | Description=Start TightVNC server at startup | ||
Line 20: | Line 22: | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | PIDFile=/ | + | PIDFile=/ |
ExecStartPre=-/ | ExecStartPre=-/ | ||
ExecStart=/ | ExecStart=/ | ||
Line 27: | Line 29: | ||
[Install] | [Install] | ||
WantedBy=multi-user.target</ | WantedBy=multi-user.target</ | ||
- | - Make the system aware of the new unit file< | + | - Make the system aware of the new unit file< |
- | - Enable the unit file:< | + | - Enable the unit file:< |
- | - Stop the current instance of the VNC server if it’s still running:< | + | - Stop the current instance of the VNC server if it’s still running:< |
- | - Then start it as you would start any other systemd service:< | + | - Check that the following files do not exist. If they do, delete them:< |
- | Your VNC server will now be available when you reboot the machine. | + | / |
+ | - Then start it as you would start any other systemd service:< | ||
+ | - Check the service is active with one of the following commands:< | ||
+ | $ sudo systemctl status vncserver@1</ | ||
+ | * Your VNC server will now be available when you reboot the machine. | ||
+ | |||
+ | ===== Delay starting the service ===== | ||
+ | In my setup I attach the hard disks only after the encryption has been confirmed by password. This makes running the service at boot time not possible. In this case, you need to start the vncserver after the hard disk has been attached and the user folders are available. | ||
+ | - Disable the unit file:< | ||
+ | - Add the starting of the service through a script which runs at boot time, for example rc. local< | ||
+ | |||
+ | ===== Snap ===== | ||
+ | - If you need to access applications installed with '' | ||
+ | - Run the following command before invoking such an application< | ||
+ | - The initial access control list for display number n may be set by the file ''/ | ||
===== Links ===== | ===== Links ===== | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ |