Hi Nadav,

Thanks for the interesting comments.

> Are you using runlevel 3 and manually running startx just because you want
> to run ctwm and not the Gnome or KDE window managers? If that is the reason,
> you don't have to. You can use a graphical login screen just like
> everyone else :-)

But I hate graphical logins!

I like having the 'login:' prompt after rebooting my machine. I can
then, if necessary, do some upgrading, change things that determine my
graphical environment (e.g. install a new ctwm), or whatever, then
launch X. After that I normally don't reboot for weeks or months: I use
hibernate and resume. So when the machine starts up I normally have my
previous context (with 10 virtual desktops keeping track of my various
activities), and I don't need to login again until I next reboot -- or
for some reason linux crashes, which is very rare.[*]

I've set up the laptop with a password required for booting.

> In the good old days, when you logged in using XDM (the graphical login
> screen), if you had a ~/.xsession or ~/.xinitrc file (it varied on different
> setups) it would get used instead of the system default and you could choose
> your own window manager and everything else.
>
> Unfortunately, since Fedora 9 was released in 2008, Fedora suddenly decided
> that changing your window manager is too geeky (or who knows what), and
> your ~/.xinitrc and ~/.xsession are ignored by default, and you can choose
> only between KDE, Gnome or XFCE. But luckily, there's a little known
> workaround: If you install the package:
>
>     yum install xorg-x11-xinit-session

Thanks for the tip. I've now installed that and will experiment.

> Then, in the graphical login screen, you get a third option besides KDE
> and Gnome, which is "user config" (or something like that) - and if you
> choose that, your ~/.xsession is used, and there you can use ctwm.
> If you only switch to this "user config" once in the login screen, it will
> be the default next time, so from there on you will just log in normally,
> and always get ctwm. Hallelujah.

Yes!

I think something like that is used on the linux machines in my
department. All I know is that they have given me the opportunity to
select Openbox or Ctwm, though I did not know how. (We currently use
Scientific Linux 6, a free variant of Redhat.)

> Another interesting question which window manager users have been asking
> themselves for many years is where/how to run the window manager in
> ~/.xsession.
>
> The traditional solution was to run it as the last command of
> ~/.xsession. But then, if ctwm dies, your whole session dies with it.
> Since ctwm unfortunately isn't 100% stable and for me tends to die about
> once or twice a month, I wrap ctwm with a small script I wrote which
> respawns it if it dies. But that was not enough for me. I always have this
> thought of maybe someday I'll want to kill ctwm and try a different
> window manager (though I've been loyal to ctwm for 16 years now...), and
> if the window manager is the last thing in ~/.xsession, I cannot kill
> it without killing the session. So instead, I do this:

I think my solution is simpler. In .xinitrc I invoke ctwm as

    ctwm -W &

then end with

    xterm -fn 8x13 -rv +sb -T EXIT -n EXIT -geom  30x1-0-0

So on Desktop 1 at bottom right I have a one line xterm window, labelled
'EXIT'.

If ctwm dies I can launch an xterm in that window to do some debugging
or whatever. Or just restart ctwm with the above command. I have not
needed to do that for many years, except when I make a mistake editing
 .ctwmrc so that re-reading kills ctwm. But even that is very rare.
Ctwm is amazingly robust.

If I want to end the whole X session I can use CTRL+Alt+Backspace, to
kill X, or else type CTRL-D in the 'exit' window. (In my department they
provide an 'exit' widget, but that's less flexible.)

Thanks for the other pointers.

[*]
[Digression:
Actually crashing is not so rare on my Dell E6410 laptop since since
about kernel 2.6.40 -- resume started failing, till I added a grub menu
option with 'acpi=off', in a boot option for resuming. I can't include
it in initial boot, so I duplicate the grub entry, to save having to
edit the grub command. I have no idea why the flag is needed or what it
does. I just found the suggestion via google and tried it. I don't
need it on my desktop PC. Could be a bug in the Dell firmware, I
suppose.]

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

Reply via email to