Re: Start ctwm in linux run-level 3 or 5?

Tadziu Hoffmann <[email protected]> Mon, 13 Jul 2020 21:05:04 +0200
Newsgroups gmane.comp.window-managers.ctwm
Message-ID <[email protected]>


> -- invoke ctwm as window manager option in level 5, choosing
> at login time between the options specified in
> 
>     /usr/share/xsessions/*.desktop

Just to add to this, I find it preferable not to rely on any of
the pre-configured options, but to write my own .xsession file
to start the window manager.  (Most distros are configured to
detect whether you have an executable .xsession file in your
home directory and automatically use this for the X session,
or offer a "custom" option to explicitly do that.)

The advantage of doing this is that you can set up your
.xsession as follows: (adapt to your liking)

  #!/bin/sh
  ctwm &
  exec xterm -bg red -fg yellow -g +0+0 '#+1+1' -name login -ls

which means that the session-controlling process is the xterm,
not the window manager.  This way, you will not lose your
X session if the window manager crashes (xterm crashes are
exceedingly rare).  You can also experiment with the window
manager, terminating the running one and starting a new one,
without losing your X session.  The session only terminates
when you exit the shell in this xterm (or kill the xterm).
A big advantage of not having "close" buttons in the window
manager decoration is that you can't do this accidentally
(unless you map the "close" function to some easily-pressed
key).