Adding a GTK application to startup using systemd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-04 2:27 AM
Hello,
I'm trying to add a python GTK application I created to the startup using systemd.
In order to do so I created the following gatewayservice.service file:
[Unit]
Description=Gateway service
Requires=graphical.target
After=graphical.target
[Service]
Type=idle
ExecStart=/bin/bash /usr/bin/gateway_service.sh
[Install]
WantedBy=multi-user.target
I am able to manually start the service using
systemctl start gatewayservice
But when I try to add it to startup and reboot it doesn't launch automatically.
I think I'm getting the requirements wrong in the service file but I'm not sure what to put instead.
- Labels:
-
ST-Boards
-
STM32MP15 Lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-11 1:49 AM
Hi @NRosa.1​
Just a quick hint :
The "Demo launcher" application delivered in Starter Package is a GTK application launched by default by systemd.
Cross check how it's done.
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-11 1:51 AM
Other hint : change done in Linux FS may require "sync" command to be sure to be record on SDCard for following boot.
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-11 2:17 AM
systemctl enable gatewayservice
could check with
systemctl status gatewayservice
