<html><head></head><body>Hi Chris,<br><br>If you are using systemd, you could make a daemon out of it, and start / stop it via systemctl start/stop. E.g:<br><br><a href="https://unix.stackexchange.com/questions/426862/proper-way-to-run-shell-script-as-a-daemon">https://unix.stackexchange.com/questions/426862/proper-way-to-run-shell-script-as-a-daemon</a><br><br>Though I did not check if that as well works without sudo magic / as a user.<br><br>Another posibility could be to start it with nohup and and kill it via "killall myscript" on logout<br><br>I suppose you saw the hooks to login/logout you can place in xfce4-session-settings / applicatiom-autostart ?<br><br>Cheers and good luck with it !<br><br>Alex<br><br><br><div class="gmail_quote">Am 31. Januar 2022 15:42:54 MEZ schrieb Chris Green <cl@isbd.net>:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre dir="auto" class="k9mail">I have a background process that I want to run only when an xfce4 GUI<br>session is running but I can't see a way to do this.<br><br>Putting the process in the 'Session & Startup' list in Settings starts<br>it OK but the background process never stops.  Thus if I log out and<br>then log back in I get multiple copies of my background process<br>running and that causes all sorts of issues.<br><br>There doesn't even seem to be a logout equivalent of .xprofile where I<br>could run something that kills my daemon.<br><br>This background process is just a shell script.<br><br><div class="k9mail-signature">-- <br>Chris Green<hr>Xfce mailing list<br>Xfce@xfce.org<br><a href="https://mail.xfce.org/mailman/listinfo/xfce">https://mail.xfce.org/mailman/listinfo/xfce</a><br><a href="http://www.xfce.org">http://www.xfce.org</a></div></pre></blockquote></div></body></html>