How to have an /etc/xdg/autostart/app.desktop service wait for a (systemd) service?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
TLDR:
How to have an /etc/xdg/autostart/app.desktop
service wait for a systemd service?
Long:
I have an app started by /etc/xdg/autostart/app.desktop
that requires a systemd service to be started first.
I would like to avoid some sleep/wait/custom code if there is an existing tool for such purposes.
Is there some kind of wait_for_service_to_be_running <service-name>
(systemd) command line tool?
systemd init-script sysvinit autologin xdg
add a comment |
up vote
1
down vote
favorite
TLDR:
How to have an /etc/xdg/autostart/app.desktop
service wait for a systemd service?
Long:
I have an app started by /etc/xdg/autostart/app.desktop
that requires a systemd service to be started first.
I would like to avoid some sleep/wait/custom code if there is an existing tool for such purposes.
Is there some kind of wait_for_service_to_be_running <service-name>
(systemd) command line tool?
systemd init-script sysvinit autologin xdg
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
TLDR:
How to have an /etc/xdg/autostart/app.desktop
service wait for a systemd service?
Long:
I have an app started by /etc/xdg/autostart/app.desktop
that requires a systemd service to be started first.
I would like to avoid some sleep/wait/custom code if there is an existing tool for such purposes.
Is there some kind of wait_for_service_to_be_running <service-name>
(systemd) command line tool?
systemd init-script sysvinit autologin xdg
TLDR:
How to have an /etc/xdg/autostart/app.desktop
service wait for a systemd service?
Long:
I have an app started by /etc/xdg/autostart/app.desktop
that requires a systemd service to be started first.
I would like to avoid some sleep/wait/custom code if there is an existing tool for such purposes.
Is there some kind of wait_for_service_to_be_running <service-name>
(systemd) command line tool?
systemd init-script sysvinit autologin xdg
systemd init-script sysvinit autologin xdg
asked Nov 5 '15 at 16:58
adrelanos
31331337
31331337
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Create yourservice.service
file, place it into /etc/systemd/system/
and run systemctl start yourservice
by your .desktop file.
[Unit]
Requires=somesystemd.service
After=somesystemd.service
[Service]
ExecStart=/path/to/yourservice
Or you can replace app.desktop
with systemd configuration. Create replacement.service
as above with additional section:
[Install]
WantedBy=multi-user.target
Then run it with systemctl enable replacement.service
.
Systemd service - what is `multi-user.target` can give more details.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Create yourservice.service
file, place it into /etc/systemd/system/
and run systemctl start yourservice
by your .desktop file.
[Unit]
Requires=somesystemd.service
After=somesystemd.service
[Service]
ExecStart=/path/to/yourservice
Or you can replace app.desktop
with systemd configuration. Create replacement.service
as above with additional section:
[Install]
WantedBy=multi-user.target
Then run it with systemctl enable replacement.service
.
Systemd service - what is `multi-user.target` can give more details.
add a comment |
up vote
0
down vote
Create yourservice.service
file, place it into /etc/systemd/system/
and run systemctl start yourservice
by your .desktop file.
[Unit]
Requires=somesystemd.service
After=somesystemd.service
[Service]
ExecStart=/path/to/yourservice
Or you can replace app.desktop
with systemd configuration. Create replacement.service
as above with additional section:
[Install]
WantedBy=multi-user.target
Then run it with systemctl enable replacement.service
.
Systemd service - what is `multi-user.target` can give more details.
add a comment |
up vote
0
down vote
up vote
0
down vote
Create yourservice.service
file, place it into /etc/systemd/system/
and run systemctl start yourservice
by your .desktop file.
[Unit]
Requires=somesystemd.service
After=somesystemd.service
[Service]
ExecStart=/path/to/yourservice
Or you can replace app.desktop
with systemd configuration. Create replacement.service
as above with additional section:
[Install]
WantedBy=multi-user.target
Then run it with systemctl enable replacement.service
.
Systemd service - what is `multi-user.target` can give more details.
Create yourservice.service
file, place it into /etc/systemd/system/
and run systemctl start yourservice
by your .desktop file.
[Unit]
Requires=somesystemd.service
After=somesystemd.service
[Service]
ExecStart=/path/to/yourservice
Or you can replace app.desktop
with systemd configuration. Create replacement.service
as above with additional section:
[Install]
WantedBy=multi-user.target
Then run it with systemctl enable replacement.service
.
Systemd service - what is `multi-user.target` can give more details.
answered Nov 29 at 12:36
anatoly techtonik
867825
867825
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f241058%2fhow-to-have-an-etc-xdg-autostart-app-desktop-service-wait-for-a-systemd-servi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown