Xfce Forum

Sub domains
 

You are not logged in.

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

cookcoo
Member
Registered: 2024-10-19
Posts: 2
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: 11,485
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

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- 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: 2
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: 11,485
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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 9 queries executed - Memory usage: 535.53 KiB (Peak: 536.38 KiB) ]