Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-03-16 11:35:30

frmald
Member
Registered: 2021-01-02
Posts: 22

RunHook=0 in autostart .desktop?

I've noticed that something added RunHook=0 to my .config/autostart/xfce4-clipman-plugin-autostart.desktop

I can't find any documentation for RunHook=, is it an XFCE thing?

Offline

#2 2021-03-16 15:39:39

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: RunHook=0 in autostart .desktop?

Yes. It was introduced into the xfce4-session code to allow applications to run at login, logout, restart, shutdown, suspend, etc. Can be configured at Settings Manager > Session and Startup > Application Startup.


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 2021-03-17 09:48:50

frmald
Member
Registered: 2021-01-02
Posts: 22

Re: RunHook=0 in autostart .desktop?

ToZ wrote:

Yes. It was introduced into the xfce4-session code to allow applications to run at login, logout, restart, shutdown, suspend, etc. Can be configured at Settings Manager > Session and Startup > Application Startup.

OK. Presumably the Hidden=true/false generates the checkbox, and RunHook=(mysterious integer) generates the login/logout/etc level.

Can one specify multiple levels? If I want something running on logout, than I probably also want it on shutdown/restart -- or is that logic implicit?

Offline

#4 2021-03-17 10:34:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: RunHook=0 in autostart .desktop?

frmald wrote:

Can one specify multiple levels? If I want something running on logout, than I probably also want it on shutdown/restart -- or is that logic implicit?

Multiple runhooks per entry are not currently supported. Would be a nice enhancement though.


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

#5 2021-03-17 11:26:10

frmald
Member
Registered: 2021-01-02
Posts: 22

Re: RunHook=0 in autostart .desktop?

ToZ wrote:
frmald wrote:

Can one specify multiple levels? If I want something running on logout, than I probably also want it on shutdown/restart -- or is that logic implicit?

Multiple runhooks per entry are not currently supported. Would be a nice enhancement though.

So... I'd have to write three different .desktop entries and enable them separately for logout / shutdown / restart? Or is the shutdown an automatic logout?

You know I was just thinking about this about a week ago (https://forum.xfce.org/viewtopic.php?id=14775) as I'm caching some files (e.g. the firefox profile folder) to RAM on login, and I want them saved back to disk on session-end (not catastrophical if it doesn't happen, but could be unpleasant). For Debian I'm using a systemd user-service, but for MX Linux I'd rather rely on the X11 / session manager startup/shutdown configuration. I've hacked /etc/X11/Xsession.d/99x11-common_start, but XFCE's built-in system would be cleaner.

Offline

#6 2022-10-16 08:04:44

jt1122
Member
Registered: 2021-03-26
Posts: 245

Re: RunHook=0 in autostart .desktop?

Bumping. I have the exact same question - running a program  on login/logout/shutdown requires 3 different entries with different runHook settings?.

Thanks

Offline

#7 2022-10-16 10:03:01

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: RunHook=0 in autostart .desktop?

Yes, it currently does. It would be a nice enhancement to have it respond to just a "session exit" hook (regardless of intent).


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.013 seconds, 8 queries executed - Memory usage: 541.66 KiB (Peak: 542.94 KiB) ]