You are not logged in.

#1 2019-01-06 22:21:27

prosvetlyonniy
Banned
Registered: 2019-01-06
Posts: 25

How to run a script from the user running the sess when exiting xfce4?

I read instruction: https://wiki.xfce.org/tips#handle_acpi_ … ut_options
This is not exactly what I need. Is it possible to execute the sh script in another way and without using sudo and from the user terminating the session?

Offline

#2 2019-01-06 23:16:29

seth
Member
Registered: 2012-09-03
Posts: 51,052

Re: How to run a script from the user running the sess when exiting xfce4?

Systemd user service, ExecStop=/path/to/your/script?
https://wiki.archlinux.org/index.php/Sy … user_units

Otherwise please elaborate on the actual task at hand.

Online

#3 2019-01-06 23:40:12

prosvetlyonniy
Banned
Registered: 2019-01-06
Posts: 25

Re: How to run a script from the user running the sess when exiting xfce4?

seth wrote:

Systemd user service, ExecStop=/path/to/your/script?
https://wiki.archlinux.org/index.php/Sy … user_units

Otherwise please elaborate on the actual task at hand.

It works, thanks

Offline

#4 2019-01-06 23:51:46

seth
Member
Registered: 2012-09-03
Posts: 51,052

Re: How to run a script from the user running the sess when exiting xfce4?

Cool.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB