[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to cause a process started in .xsessionrc to terminate with x-session termination?



On Thu, Nov 18, 2021 at 02:34:52PM -0600, David Wright wrote:
> On Wed 17 Nov 2021 at 22:39:21 (+0100), Arkadiusz Dabrowski wrote:
> 
> > I have a problem with unison sync termination when it is started from
> > .xsessionrc.
> > It works flawlessly but when I log out it is orphaned and not terminated.
> > I start it like this:
> > nice -n18 ionice -c2 -n7 unison unison_profile &>/dev/null &
> > Once started the parent is x-session-manager and they the same process
> > group.
> 
> I think this is because you're starting it in the wrong file.
> Everything in .xsessionrc should complete immediately. Use it
> to set parameters and things like that.

I think of .xsessionrc a little differently.  It's the "novice mode" file,
which you can use regardless of which x-session-manager or x-window-manager
ultimately gets used, and without needing to take control of your whole
session yourself.

That makes it great for quickie "I just want to start xclock too" type
things, where maintaining a whole .xsession file would be overkill.

In the OP's case, though, they want something that "novice mode" can't
handle, so there's a decent reason to move to "advanced mode".

(I still wonder whether systemd offers anything relevant here.  And if
not, what the hell *is* the point of systemctl --user?  I've never used
it, nor found any reason to use it.  Yet.)


Reply to: