How to delay startup of an application? [Solved]

Forum rules
Before you post please read how to get help
User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

How to delay startup of an application? [Solved]

Post by Crippled » Tue Jun 18, 2019 1:54 pm

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 Crippled on Thu Jun 20, 2019 8:08 am, edited 1 time in total.
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
MrEen
Level 12
Level 12
Posts: 4425
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to delay startup of an application?

Post by MrEen » Tue Jun 18, 2019 3:17 pm

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"

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Tue Jun 18, 2019 3:22 pm

:? How would I do this? "/usr/local/Astrill/astrill" /autostart
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
MrEen
Level 12
Level 12
Posts: 4425
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to delay startup of an application?

Post by MrEen » Tue Jun 18, 2019 3:27 pm

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.

User avatar
secureIT
Level 3
Level 3
Posts: 140
Joined: Wed Dec 05, 2018 1:26 pm

Re: How to delay startup of an application?

Post by secureIT » 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
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Wed Jun 19, 2019 2:20 pm

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
That didn't work.
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
secureIT
Level 3
Level 3
Posts: 140
Joined: Wed Dec 05, 2018 1:26 pm

Re: How to delay startup of an application?

Post by secureIT » Wed Jun 19, 2019 2:51 pm

Thank you for the response.
So now let us try further solutions.
I think that:
"/usr/local/Astrill/astrill" /autostart
is the command in 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) &
.............and tell us. if that works (but be patient for 20 secs) :)
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Wed Jun 19, 2019 2:58 pm

Yes, "/usr/local/Astrill/astrill" /autostart is the command out of Application Autostart. hook? :? What do you mean by "hook?"
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
secureIT
Level 3
Level 3
Posts: 140
Joined: Wed Dec 05, 2018 1:26 pm

Re: How to delay startup of an application?

Post by secureIT » Wed Jun 19, 2019 3:05 pm

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
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

User avatar
Gruppo Sportivo
Level 3
Level 3
Posts: 118
Joined: Sun May 28, 2017 4:14 am
Location: Rotterdam (NL)

Re: How to delay startup of an application?

Post by Gruppo Sportivo » 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
Image

Image

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Wed Jun 19, 2019 3:28 pm

secureIT wrote:
Wed Jun 19, 2019 3:05 pm
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
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
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Wed Jun 19, 2019 3:38 pm

secureIT wrote:
Wed Jun 19, 2019 3:05 pm
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
Your way didn't work.
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
MrEen
Level 12
Level 12
Posts: 4425
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to delay startup of an application?

Post by MrEen » Wed Jun 19, 2019 3:42 pm

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.

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Wed Jun 19, 2019 3:42 pm

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
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?
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
secureIT
Level 3
Level 3
Posts: 140
Joined: Wed Dec 05, 2018 1:26 pm

Re: How to delay startup of an application?

Post by secureIT » Wed Jun 19, 2019 3:44 pm

if the error occurs after restart ...... next try will be :

Code: Select all

#!/bin/bash
sleep 20s && /usr/local/Astrill/astrill
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 && python -u /usr/local/Astrill/astrill.py) &
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Wed Jun 19, 2019 3:49 pm

MrEen wrote:
Wed Jun 19, 2019 3:42 pm
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
I just tried that and it prevents Astrill from autostarting.
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Wed Jun 19, 2019 3:53 pm

secureIT wrote:
Wed Jun 19, 2019 3:44 pm
if the error occurs after restart ...... next try will be :

Code: Select all

#!/bin/bash
sleep 20s && /usr/local/Astrill/astrill
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 && python -u /usr/local/Astrill/astrill.py) &
No, the error occurs after 20 seconds of entering that command but Astrill starts. When I reboot Astrill doesn't autostart.
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.
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
MrEen
Level 12
Level 12
Posts: 4425
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to delay startup of an application?

Post by MrEen » Wed Jun 19, 2019 3:55 pm

May ask a silly question? Are you certain the tiny icon is due Astill starting too soon?

User avatar
Crippled
Level 4
Level 4
Posts: 200
Joined: Sat May 25, 2019 1:57 am
Location: U.S.A.

Re: How to delay startup of an application?

Post by Crippled » Wed Jun 19, 2019 3:59 pm

MrEen wrote:
Wed Jun 19, 2019 3:55 pm
May ask a silly question? Are you certain the tiny icon is due Astill starting too soon?
I think so because if I exit Astrill in the panel and re-open Astrill the icon shows up properly in the panel. It's also the first to start in autostart. What say you?
I am command line illiterate. I am using Linux mint 19.1 Xfce 64 bit. I concur with this gentleman. https://www.youtube.com/watch?v=mKY40fRXKZs

User avatar
MrEen
Level 12
Level 12
Posts: 4425
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to delay startup of an application?

Post by MrEen » Wed Jun 19, 2019 4:02 pm

Instead of restarting it, try 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.

Post Reply

Return to “Xfce”