Getting older, not necessarily wiser!
In this post I will start discussing configuration of the JWM Window Manager (WM). You might want to review my previous posts concerning a base Debian Build and a light weight GUI. It is not strictly necessary, but may provide some context.
I should note for those who do review the previous posts, for this example I installed the full versions of the meta packages with additional suggested packages. This can be done from the base build with the following command, followed by a system restart.
apt install xorg jwm slim
On a Debian system the default system wide JWM configuration file is /etc/jwm/system.jwmrc. If individual users want to customize JWM, they can create a local configuration file that takes precedence over the system configuration file. This file is named .jwmrc. Because it starts with a period, it is a hidden file in the user home directory.
The configuration file is in XML format, and has a hierarchical structure. Out of the box, JWM has a rather bland appearance.
If you read the JWM Setup Guide, it will specify a location of /usr/local/etc/system.jwmrc. And JWM will be run from the /usr/local/bin/jwm directory.
On Debian based systems the source code has been setup to point to /usr/bin/jwm for the program binary and /etc/jwm/system.jwmrc for the configuration file.
You will also need to have root access to make changes to the system.jwmrc file.
My first task is to copy the system.jwmrc file to a backup, just in case. Assuming you are in the /etc/jwm directory, this can be done from a terminal with the following command.
cp system.jwmrc system.bak.jwmrc
The next step is to organize the XML so that it is easier to read. At the top level the first tag identifies the format of the file.
Everything else in the file will be between the top level JWM tags.
I also make sure to use lots of comments so I know what I did an why. In the XML format a comment looks like this.
<!-- This is a comment -->
The next thing I do is scan through the file and organize it by separating style elements from system elements and menu elements. This is a totally option step. For myself, it make things easier to follow.
What I consider system elements are things like icon paths, hot key definitions, program groups, and mouse parameters. Basically anything that affects how JWM functions.
What I consider style elements are labeled as such in the configuration file. For example traystyle, windowstyle, menustyle, etc.
And the final major group is for the menu elements. In a new JWM install this is the root menu only.
Finally, I go through the file and add white space (new lines, tabs). Again this is mainly to make the file easier to read. It does not affect functionality at all.
I am currently running a clean install of Debian with JWM in a virtual machine, which is giving me a really low screen resolution (800 x600), which can make things difficult. This issue may also show up on some monitors or with some video drivers. Or you may be happy with the visual resolution, in which case you can skip this.
I should have a program installed called xrandr. It is part of the x11-xserver-utils package, which was installed by xorg. I will use this to fix my screen resolution problem.
From the terminal type xrandr by itself. This should display available resolutions. Scroll through them until you find one you like. In my case it was 1600 x 900.
You will definitely want to test this before making it a permanent change. To test this I entered the following command in the terminal.
xrandr -s 1600×900
If it does not work out, you can restart to eliminate the change. However if it does work, then you can add it to the JWM configuration file. It does not matter where you add it. In my case I added the following three lines. In my system elements section. Then the next time you start JWM you should have the new resolution.
xrandr -s 1600×900
Now there are other ways to do this. But this is probably the easiest to explain, without talking about mucking around in the Xwindows startup files.
Don’t forget the StartupCommand tag. We will be coming back to it later.
This has been a short introduction into configuring your JWM workplace environment. While it may appear we have not done much, it has laid the ground work for further configuration. In the next post of this series I will talk about configuring the JWM menu.