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

Aaron Sloman <[email protected]> Tue, 14 Jul 2020 14:06:38 +0100
Newsgroups gmane.comp.window-managers.ctwm
Message-ID <[email protected]>
In response to this comment:

> > which means that the session-controlling process is the xterm,
> > not the window manager

Stefan wrote:

> Note that all "DE"s have a dedicated "session process", so you can kill
> the window manager and it won't terminate your session.
> E.g. I use XFCE and haven't bothered to arrange for ctwm to be started
> properly, so every time I log in I have to do the funny dance:
>
>     pkill xfwm4; ctwm&
>
> and sometimes I have to do it a few times because the DE tries to
> restart xfwm4 automatically, so it's a race between `xfwm4` and `ctwm`.

I tried that and regretted it, as explained below.

Although I have set up the ability to start ctwm at level 5 (desktop) login
time, I have also been doing 'init 3' then login and start NetworkManager
then X.

The linux

    startx

command reads my file ~/.xinitrc, that does various things needed either by
ctwm or things I invoke under ctwm, and then starts ctwm in the background,
ending with a small xterm that keeps X alive.

(Starting ctwm in the background allows killing and restarting Ctwm,
without having to restart X.)

Perhaps I should have done some serious analysis before trying Stefan's
pkill method, but I didn't, and as a result I got a stream of error
messages and since then I have not been able to invoke X and ctwm from
level 3!

I haven't had time since then to find out exactly what's broken and how to
fix it, so I am forced to start at level 5, running .xfce and select ctwm
as my window manager.

Fortunately that still works, and 'top' tells me that there's not much cost
in memory or cpu use getting started that way, compared with the costs of
things like firefox and other programs launched after starting X.

I may later investigate what I 'broke' on the laptop by using the pkill
method.

So, on the basis of my experience, I don't recommend that anyone tries the
pkill method without first anlysing the effects in detail, and doing a
backup of the file system (e.g. containing logs, initialisation scripts,
caches, ... etc.)

I did not think of doing a backup first, but I expect I'll eventually work
out what I have to restore or remove.

The only benefit of starting at level 3 that I've noticed so far, as
mentioned in a previous message, is that firefox provides a few extra
window control buttons if not running in a 'standard' (level 5)
environment.

Aaron
http://www.cs.bham.ac.uk/~axs