Manjaro uses systemd as it’s init system.
With systemd, all system tasks handled at startup - from devices to network- is handled by means of various unit files. To name a few
- service units
- timer units
- mount units
- automount units
You write a service unit when you need a specific task done once.
If the task is repeated at certain intervals you complement the service with a timer unit
The task can be anything you need to automate - below is couple of examples
- [root tip] [HowTo] Check if your AUR build scripts have been updated
- [root tip] [How To] Use systemd to mount ANY device
You can list all unit files
systemctl list-unit-files
If an application is designed to run as a service - it provides the necessary unit files with the package.
pamac list --files tigervnc | grep '.service'
In the case with tigervnc - the package provides several binaries where a service file is provided for vncserver but none for x0vncserver.
In this case the service unit is a template because it requires a display argument. Not all service units requires arguments as can be seen from above automation examples.
Unix was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things.
— Doug Gwyn
The two examples linked at your initial post is illustrating two ways of achieving different results.
- The first is using vncserver and the predefined unit to create a secure connection to a dedicated display for one named user.
- A second method uses x0vncserver and a custom service unit to connect screen
:0
which allows anyone see what is going on. - A third [root tip] [How To] TigerVNC Quick Setup describes how to connect to a dedicated display for one named user but without a secure connection.
Never interrupt someone doing what you said couldn’t be done.
— Amelia Earhart