Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-10-05 18:15:35

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Proper Place and Format To Add Delay In Program AutoStart

I have read various ways to add a delay for a program that has been added to the Settings>Session and Startup>Application Autostart list is going to be automatically starting.  These include going so far as to create a script file.  I thought I read somewhere to just add it to the command line element during the adding of the program to the autostart list.

My attempt was to use:
sh -c "sleep 15 && devilspie2 -d"
but that didn't do anything.  It didn't even start the program.

Any suggestions?

Thanks.

Offline

#2 2025-10-05 19:48:07

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,280
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

Is there anything in ~/.xsession-errors about it?

If you're going to run it automatically, you probably don't want the "-d" (debug) flag as you won't be able to see any debug info. I wonder if it dies anyways because there is no STDOUT to use. There is a "-D" option that prints debug info to a FIFO that you an later retrieve using:

cat "$(devilspie2 -P)"

...which would probably be the preferred method.

Could you first try without the "-d"?


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-10-05 19:56:06

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

This should run right from the CLI, shouldn't it?

I tried sh -c "sleep 15 && devilspie2 -d" and sh -c "sleep 15 && devilspie2"  and sh -c "sleep 15 && devilspie2" -d, but nothing happened.

Added later 03 min 23 s:
And what is /etc/xdg/autostart/ all about?

Offline

#4 2025-10-05 20:27:12

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,280
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

This should run right from the CLI, shouldn't it?

No, a subshell. To run in the CLI:

sleep 15 && xfce4-terminal -T devilspie2 -x devilspie2 -d

And what is /etc/xdg/autostart/ all about?

This is the "all users" location for apps - that will automatically start and run in every user profile unless overwritten.

Last edited by ToZ (2025-10-05 20:46:37)


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-10-05 20:51:55

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

From terminal, got error:
Filed to execute child process "devilspie2": Failed to execve: No such file or directory

Offline

#6 2025-10-05 22:02:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,280
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

Is it installed?

whereis devilspie2

If nothing, search your filesystem for it.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2025-10-05 22:41:31

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

I'm sorry; I should have made that clear.  If I type whereis devilspie2, I get:
devilspie2: /usr/bin/devilspie2 /usr/share/man/man1/devilspie2.1.gz

In any terminal I can always run:
devilspie2 -d
without any problem, and it stays resident until stopped with a Ctrl-C.

Offline

#8 2025-10-05 23:06:41

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,280
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

Thats strange. Use the full path to the executable (your session PATH probably isn't set):

sleep 15 && /usr/bin/xfce4-terminal -T devilspie2 -x /usr/bin/devilspie2 -d

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2025-10-05 23:36:07

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

Well, that was all interesting.  So let's start with this.  I am confused because I can always run it by itself, so the path must be good.

Also, the last time and this caused it to open another terminal window.  Don't know why that should be necessary.  What I see is a terminal opened with the results of the running script.  It should stay within the same window.

Next, I am going to set it to 10 seconds, which should be plenty.

I think the reason that there was a child start error was because it could not find the script file; /home/user/.config/devilspie2/debug.lua.  Is that right?

So, how do I convert this command to run in the command line in Edit application?

Offline

#10 2025-10-06 03:27:00

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,280
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

KitchM wrote:

So, how do I convert this command to run in the command line in Edit application?

sh -c "sleep 15 && /usr/bin/xfce4-terminal -T devilspie2 -x /usr/bin/devilspie2 -d"

I think the reason that there was a child start error was because it could not find the script file; /home/user/.config/devilspie2/debug.lua.  Is that right?

I think its because it couldn't find xfce4-terminal, for some reason. What did it say in your ~/.xsession-errors file?


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2025-10-08 16:12:57

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

I'm still pursuing this, so thanks for your patience.

Would you please tell me what this is for:
~/.config/autostart
and how it differs from:
/etc/xdg/autostart/

The reason I am asking is that I just ran across a program, Recoll, which is auto starting (but slowly well after everything else), but I do not have it in my Session and Startup>Application Autostart listing.  I am told that it does not have a build-in function to autostart, so that is not why it is starting.  What I have instead is an entry entitled "Snap user application autostart helper (Helper program for launching snap applications that are configured to start automatically)", bu there is no Snap version of it.  So now I'm just confused.

Thanks.

Offline

#12 2025-10-08 21:29:34

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,280
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

KitchM wrote:

Would you please tell me what this is for:
~/.config/autostart
and how it differs from:
/etc/xdg/autostart/

They serve the same purpose. The one in /etc/xdg/autostart applies to all user accounts. The one in ~/.config/autostart applies just to yours. If you disable one of the ones in /etc/xdg/autostart by unchecking the dialog box in Settings Manager > Session and Startup > Application autostart, the system will copy the .desktop file from /etc/xdg/autostart to ~/.config/autostart and append a "NoDisplay=True" to the file.

The reason I am asking is that I just ran across a program, Recoll, which is auto starting (but slowly well after everything else), but I do not have it in my Session and Startup>Application Autostart listing.  I am told that it does not have a build-in function to autostart, so that is not why it is starting.

It might be autostarting as a systemd service. To check, try one of the following:

systemctl status recoll
systemctl --user status recoll

There are many ways to autostart applications.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#13 Yesterday 14:27:39

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

I had it closed and quit before my last computer shutdown.  Today on startup, it was not there.  These needs more testing.

And just between you and I, this is a big deal to users when it comes to simplicity in usability and expectations.  We cannot depend upon what we see because what is going on behind the scenes is a confusion.  No one thing that we control really has control over everything in the system.  There just is no way to lock it all down.  It can be quite maddening at times, don't you think?

Last edited by KitchM (Yesterday 14:30:16)

Offline

#14 Yesterday 22:01:39

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,280
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

Agreed. Reminds me of this xkcd comic:

standards_2x.png

In some ways, we're just doomed.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#15 Yesterday 23:13:02

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Re: Proper Place and Format To Add Delay In Program AutoStart

Thanks for that.  big_smile

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 8 queries executed - Memory usage: 617.62 KiB (Peak: 650.9 KiB) ]