Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-10-19 18:29:54

cookcoo
Member
Registered: 2024-10-19
Posts: 3
Windows 10Firefox 130.0

[Question] Set some delay to autostartup default applications

Hey, I want to set some delay for xfce4 notes in my Xfce 4.18 (Ubuntu 22.04).

As a rule, you can insert "sleep xxx" before the program's executable from Session and Startup/Application Autostart, but I can't do that with Xfce4-notes.

I try to directly edit the desktop file from ~/.config/autostart/xfce4-notes-autostart.desktop but it always resets the "Exec field" value if I exit/reopen xfce4-notes.

Because I synchronize notes between notes with Dropbox, and Dropbox starts later than Xfce4-notes when starting Xfce DE, I often lose some of the most recent notes, so I want to have a certain delay between them.

Hmm, one solution is to use the user service file, but I see it's overkill for this user case, so I want to ask if there is another way.

Offline

#2 2024-10-20 09:56:05

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,283
LinuxFirefox 131.0

Re: [Question] Set some delay to autostartup default applications

Hello and welcome.

Before you close/quit xfce4-notes, edit the .desktop file in .config/autostart to add your delay, save the file, then set the immutable flag:

sudo chattr +i xfce4-notes-autostart.desktop

This will prevent the application from resetting it - or anyone from editing it for that matter.

If you do need to make some changes, you will first need to unset the immutable flag:

sudo chattr -i xfce4-notes-autostart.desktop

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 2024-10-31 10:15:06

cookcoo
Member
Registered: 2024-10-19
Posts: 3
Windows 10Firefox 131.0

Re: [Question] Set some delay to autostartup default applications

ToZ wrote:

Hello and welcome.

Before you close/quit xfce4-notes, edit the .desktop file in .config/autostart to add your delay, save the file, then set the immutable flag:

sudo chattr +i xfce4-notes-autostart.desktop

This will prevent the application from resetting it - or anyone from editing it for that matter.

If you do need to make some changes, you will first need to unset the immutable flag:

sudo chattr -i xfce4-notes-autostart.desktop

Hey, I didn't think I could use that way 😄
At first, I also think use chmod to set the file read-only, but it is a new way I just learnt about.

Thanks for your suggest. I think I will try to delve more about the immutable flag later.
As I can see, It hasn't shown when I check with "ls -alh", maybe a kind of file system feature.

Offline

#4 2024-10-31 23:36:38

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,283
LinuxFirefox 132.0

Re: [Question] Set some delay to autostartup default applications

Use:

lsattr

...to see the extended file attributes. Its specific to certain file systems.


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-12 08:33:52

cookcoo
Member
Registered: 2024-10-19
Posts: 3
LinuxFirefox 143.0

Re: [Question] Set some delay to autostartup default applications

Actually, I think there is a workaround instead set immutable flag for dynamic desktop file.
Just clone it and edit that clone, disable the old one and the problem solved.  wink

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.006 seconds, 7 queries executed - Memory usage: 554.04 KiB (Peak: 554.88 KiB) ]