On 1/31/22 14:50, Chris Green wrote:
On Mon, Jan 31, 2022 at 02:22:15PM -0600, Knute Johnson wrote:


On 1/31/22 06:30, Chris Green wrote:
I have a background process that I want to start when I log into my
xfce session and I want it to exit when I log out of the session.

I thought that adding it to the list in the Session & Startup settings
would do this but the process doesn't exit when I log out from the
xfce session.  If I log out and then log back in to xfce I get
multiple copies of my process.

So, is there an easy/correct way to do this or do I need to add code
to my background process to manage things?


Use a .desktop file. See: 
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

This is the simple way to start/stop a program when your desktop runs. You
put the file in your ~/.config/autostart directory.  When you log in it runs
and when you log out it stops.

That's exactly how my background script is already run, and it doesn't
stop when I log out.


Pretty good explanation here:
https://wiki.archlinux.org/title/Desktop_entries

Doesn't tell me how to stop the process on exit! :-)


So exactly how are you starting your "process" now? What sort of program is it? Is it being run by you or ?

You are probably going to have to start it with systemd.


--

Knute Johnson

--
xubuntu-users mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/xubuntu-users

Reply via email to