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:
Variable | Description |
---|---|
Description=Neptune3-UI | Service description displayed by system tools |
After=dbus.service dbus-session@root.service systemd-user-sessions.service ivi-services.target | Loading 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 (ivi-services.target). |
Wants=ivi-services.target dbus-session@root.service | Tells that ivi-services.target and dbus user session are in direct dependence. |
Conflicts=neptune-qsr.service Before=neptune-qsr.service OnFailure=neptune-qsr.service | These 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.
Variable | Description |
---|---|
User=root | Start as a root user (administrator in linux/unix). |
ExecStart=/opt/neptune3/neptune3-ui -r --dbus session -c am-config-neptune.yaml | Sevice startup command. |
WorkingDirectory=/opt/neptune3 | Catalog, to which systemd switches to before service is started. |
EnvironmentFile=/etc/default/qt | Environment variables are loaded from the file in format Variable=value |
Environment=AM_STARTUP_TIMER=1 | When 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=1 | This 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.
Variable | Description |
---|---|
WantedBy=multi-user.target | In 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.