Neptune 3 UI - Systemd Service Settings

There are three sections in Neptune 3 UI service file:

  • [Unit]
  • [Service]
  • [Install]

[Unit] Section

This section describes the service itself, including dependencies and/or conflicts, as well as loading order.

The section consists of a number of variables, as follows:

Description=Neptune3-UIService description displayed by system tools
After=dbus.service dbus-session@root.service systemd-user-sessions.service ivi-services.targetLoading order (After=dbus.service). It means that Neptune 3 UI systemd Service will be loaded after dbus.service. Then goes dbus user session (there are two sessions - user and system session), and a number of services providing data for Neptune 3 UI ( dbus-session@root.serviceTells that and dbus user session are in direct dependence.
Conflicts=neptune-qsr.service Before=neptune-qsr.service OnFailure=neptune-qsr.serviceThese variables describe the startup behavior: first, neptune3-ui starts, then it conflicts with QSR Content app. Also, those variables mean that QSR content app should start, if neptune3-ui crashes. It could be just {conflicts}, but in this case systemd does not wait for complete shut down of Neptune 3 UI and shuts down both of the services.

[Service] Section

This section describes, how the service starts up and what parameters are used for that.

User=rootStart as a root user (administrator in linux/unix).
ExecStart=/opt/neptune3/neptune3-ui -r --dbus session -c am-config-neptune.yamlSevice startup command.
WorkingDirectory=/opt/neptune3Catalog, to which systemd switches to before service is started.
EnvironmentFile=/etc/default/qtEnvironment variables are loaded from the file in format Variable=value
Environment=AM_STARTUP_TIMER=1When set to "1", this variable enables measuring of time needed to start up the Neptune 3 UI. In this case, the measured time value is displayed in the system menu. When set to "0", the measuring of time needed to start up the Neptune 3 UI is turned off, and is not displayed in the system menu.
Environment=QT_QPA_EGLFS_HIDECURSOR=1This variable manages visibility of mouse cursor: when set to "1" mouse cursor is hidden, when set to "0" it is visible.

[Install] Section

In this section it's determined, how the service file will be installed.

WantedBy=multi-user.targetIn this use case the service file is a part of multi-user system target. That's why it will be installed as one of dependencies.

Note: In any case of changes in .service file, it's necessary to run systemctl daemon-reload, otherwise systemd will not reload the file changes and will use the old file.

© 2019 Luxoft Sweden AB. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.