Xentara v2.1
User Manual
systemd Service (Linux)
See also
systemd System and Service Manager at systemd.io
Note
The user executing the commands in this section will need special privileges to be able to use sudo(8). This is usually accomplished by adding the user to the sudo user group. This can only be done by the root user, or by another user that already has sudo access.

Under Linux, the Xentara package contains two service unit files for the systemd service manager, one for Xentara itself, and one for the Xentara licence proxy. The files are template unit files that allows you to enable services that will automatically start Xentara and (if required) the Xentara licence proxy when the system is started.

The Xentara systemd unit is called xentara@.service. The @ symbol at the end of the name tells systemd that this is a template unit file. systemd expects the template parameter to be placed after the @ symbol when referring to the service. The template parameter for the Xentara service is the username of the Linux user under which Xentara should be run.

The Xentara licence proxy systemd unit is called xentara-licence-proxy@.service, and is also a template unit file. The template parameter is the username of the Linux user under which the Xentara licence proxy should be run.

man pages
systemd(1), systemctl(1), systemd.service(5), systemd.unit(5), journalctl(1)

The Xentara Service

Enabling the Service

Enter the following command in a shell to tell systemd to start a service that runs Xentara as the Linux user username:

sudo systemctl enable xentara@username

Xentara will be run without parameters, and will thus search for a model file in the default locations. You should normally place the model file in the user’s home directory under .config/xentara/model.json. For instance, for the user username used in the examples on this page, the model file should be placed under ~username/.config/xentara/model.json. The same goes for the other configuration files, if required.

Stopping and Starting the Service

You can stop and start the service using the following commands:

sudo systemctl stop xentara@username
sudo systemctl start xentara@username

To restart the service (e.g. to reload a changed model file), use the following command:

sudo systemctl restart xentara@username

Getting Status and Log Entries

Note
These commands do not require sudo(8) and can be executed by any user. Only the root user and the user under which Xentara is running will be able to see log entries, though.

You can print the status of the Xentara service, together with the last log entries, using the following command:

systemctl status xentara@username

You can show more log entries using the journalctl(1) command. To show the last 100 log entries, you can use the following command, for example:

journalctl --unit=xentara@username --lines=100

To show log entries as they are printed, you can use the following command:

journalctl --unit=xentara@username --follow

journalctl has many filtering and output options, which are described in the journalctl(1) man page.

Disabling the Service

To disable the service entirely, so that Xentara is no longer started automatically, use the following command:

sudo systemctl disable xentara@username

The Xentara Licence Proxy Service

The Xentara licence proxy service is only required if you are intrending to use floating licences. The Xentara licence proxy service can be enabled in the same way as the Xentara service.

Enabling the Service

Enter the following command in a shell to tell systemd to start a service that runs the Xentara licence proxy as the Linux user username:

sudo systemctl enable xentara-licence-proxy@username

Usually, Xentara and the Xentara licence proxy should be run under the same user, so that the configuration will be loaded from the same home directory. You can run the licence proxy under a different user, however, if this is necessary or convenient.

Stopping and Starting the Service

You can stop and start the service using the following commands:

sudo systemctl stop xentara-licence-proxy@username
sudo systemctl start xentara-licence-proxy@username

To restart the service (e.g. to reload a changed licence server configuration file), use the following command:

sudo systemctl restart xentara-licence-proxy@username

Getting Status and Log Entries

Note
These commands do not require sudo(8) and can be executed by any user. Only the root user and the user under which the Xentara licence proxy is running will be able to see log entries, though.

You can print the status of the Xentara licence proxy service, together with the last log entires, using the following command:

systemctl status xentara-licence-proxy@username

You can show more log entries using the journalctl(1) command. To show the last 100 log entries, you can use the following command, for example:

journalctl --unit=xentara-licence-proxy@username --lines=100

To show log entries as they are printed, you can use the following command:

journalctl --unit=xentara-licence-proxy@username --follow

journalctl has many filtering and output options, which are described in the journalctl(1) man page.

Disabling the Service

To disable the service entirely, so that the Xentara licence proxy is no longer started automatically, use the following command:

sudo systemctl disable xentara-licence-proxy@username