Despite rumors of X11 going away in Linux, I'm glad that the newest Debian 13 still has my favorite standby, the Motif Window Manager (mwm), and X11. I still use a lot of software that needs an X11 server, so why not leave it alone, please? To use mwm in the year 2026, you will need to issue the usual:
sudo apt install xorg mwm
Then to get things going,
startx
After some messages, the screen will go black and the mouse pointer will become an x. Right-click and hold anywhere to open the Root Menu and choose New Window. This will open xterm.
Now type this command to fill the "desktop" with something:
xsetroot -solid gray
Since mwm is just a window manager, this command actually colors the root window (the background). It is not a real desktop directory, as a file manager would provide.
Right now, the environment looks a tad basic, in particular, the window and menu font. The way to specify fonts in X11 is with an X Logical Font Description (XLFD). They are a little complex to specify, but you can create them with the xfontsel client. To copy-paste from xfontsel, be sure to start it in the background using
xfontsel &
I would prefer another basic font, regular Helvetica Bold 12-pt. To specify this, pull down each menu and choose the following:
fmly helvetica
wght bold
slant r
pxlsz 12
Once you have the correct settings, click the select button. This puts the string into the cut buffer. Note, leave the xfontsel window open, otherwise the cut buffer will be cleared.
Open a new text file in your home directory named .Xresources. For example:
nano .Xresources
To specify the resource for window and menu fonts in mwm enter
mwm*fontList:
then middle-click to paste your font string from the cut buffer.
mwm*fontList: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
I have also added a resource to turn off bold fonts in xterm, since they are somewhat illegible at the small font size:
xterm*allowBoldFonts: false
Save and close it.
For clients to recognize these resources when you start X, create another text file called .xinitrc. Add this line to .xinitrc:
xrdb -merge .Xresources
This is my current .xinitrc file:
xsetroot -solid gray
xrdb -merge /etc/X11/Xresources/x11-common
xrdb -merge .Xresources
xterm &
xrandr -s 1024x768
exec mwm
Again, be sure to save and close.
The first line, we already know from before. Since I would like the system Xresources to load first, then my own, I have two xrdb commands: one for the system, one for my user. I would also like an xterm to start when X starts. It is necessary to background xterm with &, otherwise the commands following it will not execute until the xterm client closes. Any changes to the display resolution (xrandr) should be done before mwm starts. Finally, the window manager, mwm, is executed last.
To run this script, right-click and hold on the root window (the "desktop"), quit, then issue startx again.





No comments:
Post a Comment