[email protected] wrote:
> > A quick glance at the code suggests that xfwm4 handles the ICCCM > > window manager selection stuff, so `ctwm --replace` seems like it > > could work. [email protected] replied: > Yes it does. But my fingers keep writing the pkill thingy. > In any case, my point was just that nowadays the window-manager is > usually not the "session process", so it can be killed/restarted without > fear and without the need to use an `xterm` in its place. On the basis of my (unfortunate) experience attempting that, I would instead recommend use of a short file entry here: /usr/share/xsessions/ctwm.desktop containing something like: [Desktop Entry] Name=Ctwm Comment=Log in using ctwm Exec=$HOME/.xinitrc Icon= Type=Application So the process initialising the graphical environment is based on ~/.xinitrc which can set up required facilities before or after starting ctwm. In ~/.xinitrc do required setting up (e.g. starting pulseaudio?) followed by ctwm & Then run a tiny xterm window to keep the process alive, e.g. in my case: xterm -fn 8x13 -rv +sb -T EXIT -n EXIT -geom 30x1-0-0 It's visible only in one of the CTWM desktops. Typing CTRL D into that (or using kill) causes the graphical session, to terminate, including ctwm, restarting the login process (in my case xfce on fedora). This also allows the ctwm process to be killed or restarted in an xterm window without terminating the graphical session, though killing it may produce a situation with no visible terminal window in which to give commands, because other windows (e.g. firefox) happen to come out on top in the absence of a running window manager. In that case using CTRL+Alt+F2 produces a login prompt allowing commands, including restarting ctwm, to be given in a non-graphical environment (after setting $DISPLAY if required by the commands). I apologise if that's already obvious to everyone. Aaron
