[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 Mon, Nov 22, 2021 at 03:25:02PM +0000, Musbur wrote:
> Am 20.11.2021 22:19 schrieb Greg Wooledge:
> > On Sat, Nov 20, 2021 at 09:46:24PM +0100, Arkadiusz Dabrowski wrote:
> > > Started with "exec" according to Debian documentation:
> > > https://wiki.debian.org/Xsession
> > 
> > You're cargo-culting stuff with zero understanding.  That's not going
> > to help.
> > 
> > If you don't know how shell scripts work, if you don't know what the
> > "exec" command does... then this is going to be quite difficult for you.
> 
> I know the difference between using exec and not using exec, but I've never
> understood why Debian explicitly suggests using exec to start the wm in
> .xsession. Maybe to release resources held by the shell instance?

Basically, yeah.  There's no reason to keep the shell around waiting
on the window manager, if the shell isn't going to do anything after
the WM terminates.  So, for 95% of cases, that's what you want.

The OP in this thread is an exception.  They want the shell to hang
around so it can kill a process after the WM terminates.  A .xsession
file without "exec" on the WM seems to be the most obvious way to do it.

(Unless someone can figure out how to make systemd do this.)


Reply to: