How to delay startup of an application? [Solved]
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How to delay startup of an application? [Solved]
I have asked this in other forums without any luck. The icon in the panel from Astrill VPN shows up very tiny at times right after boot up due to it starting too soon. How do I delay the auto-start of Astrill VPN?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to delay startup of an application?
Most likely something similar to how I start Conky with a delay. In Menu > Settings > Session and Startup > Application Autostart tab, click on the item then click on Edit. Here's the Command I have for Conky:
sh -c "sleep 20 && conky"
Re: How to delay startup of an application?
How would I do this? "/usr/local/Astrill/astrill" /autostart
Re: How to delay startup of an application?
I'm not sure. I'd rather not guess at the syntax in this case with the command already needing quotes. I'm sure someone else will be able solve it.
Re: How to delay startup of an application?
Hi Crippled,
first: please let us know :
did you try the last suggestion from your thread in MX-Forum ? ….. as you did not answerded it ?
http://mxlinux.org/forum/viewtopic.php? ... 55&p=48059
first: please let us know :
did you try the last suggestion from your thread in MX-Forum ? ….. as you did not answerded it ?
http://mxlinux.org/forum/viewtopic.php? ... 55&p=48059
.
Re: How to delay startup of an application?
That didn't work.secureIT wrote: ⤴Wed Jun 19, 2019 2:11 pm Hi Crippled,
first: please let us know :
did you try the last suggestion from your thread in MX-Forum ? ….. as you did not answerded it ?
http://mxlinux.org/forum/viewtopic.php? ... 55&p=48059
Re: How to delay startup of an application?
Thank you for the response.
So now let us try further solutions.
I think that:
Is that right ?
If, then lets try something :
1. Go to graphical settings menu >session and startup behavior > automatically launched applications ......
and take the hook out of astrill.
2. restart
3. Open up a terminal and copy this to it .... then press return key :
.............and tell us. if that works (but be patient for 20 secs)
So now let us try further solutions.
I think that:
is the command in autostart."/usr/local/Astrill/astrill" /autostart
Is that right ?
If, then lets try something :
1. Go to graphical settings menu >session and startup behavior > automatically launched applications ......
and take the hook out of astrill.
2. restart
3. Open up a terminal and copy this to it .... then press return key :
Code: Select all
#!/bin/bash
(sleep 20s && /usr/local/Astrill/astrill) &
.
Re: How to delay startup of an application?
Yes, "/usr/local/Astrill/astrill" /autostart is the command out of Application Autostart. hook? What do you mean by "hook?"
Re: How to delay startup of an application?
simply disable it ..........
edit:
hook is set : ..... enabled
click on the hook ..... it disappears and the autostart of this app is disabled .......
You find the "hooks" into the front menu of autostart applications
edit:
hook is set : ..... enabled
click on the hook ..... it disappears and the autostart of this app is disabled .......
You find the "hooks" into the front menu of autostart applications
.
- Gruppo Sportivo
- Level 4
- Posts: 276
- Joined: Sun May 28, 2017 4:14 am
- Location: 🇳🇱
Re: How to delay startup of an application?
Where is the file or package Astrill Client been installed,probably i guess in the directory
Go to graphical settings menu<->preferences <->startup applications,add a starter named AstrillVpn and edit the delay time.
Startup application command may look something like this
/opt
Go to graphical settings menu<->preferences <->startup applications,add a starter named AstrillVpn and edit the delay time.
Startup application command may look something like this
/opt/astrilvpn/bin/astrill-client --quiet
Re: How to delay startup of an application?
It started but I got this error. I am going to do a re-boot to see how it starts. $ /bin/sh: 1: nscd: not found
An unhandled exception occurred at $000000000042BF25:
EOSError: Failed to execute "/bin/sh", error code: 127
$000000000042BF25
Re: How to delay startup of an application?
Just to be sure, see if this does it: Menu > Settings > Session and Startup > Application Autostart tab, click on the item then click on Edit. Change the command to
sleep 20 && /usr/local/Astrill/astrill /autostart
Last edited by MrEen on Wed Jun 19, 2019 3:43 pm, edited 1 time in total.
Re: How to delay startup of an application?
It's not in opt. In Application Autostart I have for Astrill this command. "/usr/local/Astrill/astrill" /autostart How do I add 20 seconds to it?Gruppo Sportivo wrote: ⤴Wed Jun 19, 2019 3:18 pm Where is the file or package Astrill Client been installed,probably i guess in the directory/opt
Go to graphical settings menu<->preferences <->startup applications,add a starter named AstrillVpn and edit the delay time.
Startup application command may look something like this/opt/astrilvpn/bin/astrill-client --quiet
Re: How to delay startup of an application?
if the error occurs after restart ...... next try will be :
This is only to find out the correct syntax for this app .........
(I start several apps with delay, but syntax will be not the same for all......... may be its a python script at startup-app - then the syntax will be different to "normal" apps)
then it might be :
Code: Select all
#!/bin/bash
sleep 20s && /usr/local/Astrill/astrill
(I start several apps with delay, but syntax will be not the same for all......... may be its a python script at startup-app - then the syntax will be different to "normal" apps)
then it might be :
Code: Select all
#!/bin/bash
(sleep 20s && python -u /usr/local/Astrill/astrill.py) &
.
Re: How to delay startup of an application?
I just tried that and it prevents Astrill from autostarting.
Re: How to delay startup of an application?
No, the error occurs after 20 seconds of entering that command but Astrill starts. When I reboot Astrill doesn't autostart.secureIT wrote: ⤴Wed Jun 19, 2019 3:44 pm if the error occurs after restart ...... next try will be :This is only to find out the correct syntax for this app .........Code: Select all
#!/bin/bash sleep 20s && /usr/local/Astrill/astrill
(I start several apps with delay, but syntax will be not the same for all......... may be its a python script at startup-app - then the syntax will be different to "normal" apps)
then it might be :Code: Select all
#!/bin/bash (sleep 20s && python -u /usr/local/Astrill/astrill.py) &
If I re-enable autostart and reboot Astrill starts automatically but too soon because the icon shows tiny in the panel. This is what I get on the second command. python: can't open file '/usr/local/Astrill/astrill.py': [Errno 2] No such file or directory
Last edited by Crippled on Wed Jun 19, 2019 3:56 pm, edited 1 time in total.
Re: How to delay startup of an application?
May ask a silly question? Are you certain the tiny icon is due Astill starting too soon?
Re: How to delay startup of an application?
Instead of restarting it, try
EDIT: It's just first because it starts with "A" and the list is mostly alphabetical.
xfce4-panel -r
in the terminal to restart the panel and see if that fixes the issue.EDIT: It's just first because it starts with "A" and the list is mostly alphabetical.
Last edited by MrEen on Wed Jun 19, 2019 4:04 pm, edited 1 time in total.