HOWTO: JWM Configuration


Active Member

Reaction score: 69
Messages: 149

HOWTO: JWM Basic Configuration

This is a very light, extremely fast window manager, one of my favorites. Uses 3 MB RAM.

First thing I do is copy the global config file /usr/local/etc/system.jwmrc to my /home. You are NOT allowed to edit the global file.

$ cp /usr/local/etc/system.jwmrc .jwmrc

So, from now on I can access this file as USER. $ nano .jwmrc

We're faced with a long config file but the good news is that there is only one file :)

Note that the window manager is very configurable and this is a subjective matter, what is good for me, is not necessarily good for you; there is a choice and it's all up to you.

In the first part I configure my apps to be launched full-sized, maximized, I like it that way, easy for me to work. No dragging, no resizing, just alt-tab to move from one to the other.


And so on, I do the same for xfe, firefox, sylpheed, xchat, etc. Make sure lines are aligned correctly IF you want your apps maximized. If you want no titlebar add 'notitle'.

Otherwise, if you like your apps floating, ignore this section.

For the regular look (taskbar at the bottom):

<Tray x="0" y="-1"  autohide="off">

  <Tray x="0" y="+1"  autohide="off">

    <!-- Visual Styles -->

Or add 'notitle' in the Options at the beginning of the file to your apps.

TASKBAR IN AUTOHIDE (à la ratpoison)

  <Tray x="0" y="+1"  autohide="top">
Depending wherever you have your taskbar. Put top or bottom.

By default it comes with several workspaces, one on top of each other, I only use 2, one next to the other:

     <!-- Virtual Desktops -->
   <!-- Desktop tags can be contained within Desktops for desktop names.
   <Desktops width="2" height="1">
Needless to say, if you want more workspaces, change the number of desktops in "width".


A = Alt
C = Control
4 = Windows key

   <!-- Key bindings -->
   <Key key="Up">up</Key>
   <Key key="Down">down</Key>
   <Key key="Right">right</Key>
   <Key key="Left">left</Key>
   <Key key="h">left</Key>
   <Key key="j">down</Key>
   <Key key="k">up</Key>
   <Key key="l">right</Key>
   <Key key="Return">select</Key>
   <Key key="Escape">escape</Key>

   <Key mask="A" key="Tab">next</Key>
   <Key mask="" key="F4">close</Key>
   <Key mask="" key="F12">maximize</Key>
   <Key mask="C" key="Right">rdesktop</Key>
   <Key mask="C" key="Left">ldesktop</Key>

   <Key mask="" key="F1">exec:roxterm</Key>
   <Key mask="" key="F2">exec:xfe</Key>
   <Key mask="" key="F3">exec:firefox</Key>
   <Key mask="" key="F7">exec:mirage</Key>
   <Key mask="" key="F8">exec:hexchat</Key>
   <Key mask="" key="F9">exec:libreoffice</Key>
   <Key mask="" key="F10">exec:jwm -restart</Key>
   <Key mask="" key="Print">exec:roxterm -e scrot -cd 10</Key>
   <Key mask="" key="Super_L">root:1</Key>
   <Key mask="C" key="space">exec:gmrun</Key>

   <Key mask="C" key="Down">>exec:amixer set Master 6%- </Key>
   <Key mask="C" key="Up">exec:amixer set Master 6%+ </Key>
   <Key mask="C" key="0">exec:amixer sset Master,0 toggle </Key>



Alt-tab for moving between screens
Ctrl+ arrow right/left for changing workspaces
F4 closes apps
F12 maximizes screen
F3 launches browser
Print key takes a picture with scrot
F1 launches terminal
F2 launches file manager
F4 closes app
F8 launches xchat
Ctrl+spacebar gives you gmrun to launch apps
F10 restarts jwm
Windows key gives you the main menu. And so forth...

I have no use for the Fn keys, but if you do, you can add Alt, Ctrl or the Windows key to the Fn keys or any letter you feel confortable with. A+Fn key or C+Fn key or 4+Fn key, C-f for firefox, C-m for mirage, you get the idea.

The thing is to increase your speed, by the time you point and click with the mouse, you could be already working, with your keybinds.

To start jwm automatically as you enter X, edit the file .xinitrc as root:
# nano /home/user_name/.xinitrc

Here's mine:

firefox &
setxkbmap -option terminate:ctrl_alt_bksp
xsetroot -solid black
unclutter -idle 2 &
numlockx &

exec jwm
Or just put 'exec jwm'

save/exit from the editor, RESTART from the menu, next time you can restart with F10.

jwm -p (to see if there any parsing errors)


Good luck,
macondo aka Lou, bobo, cerealkiller


P.S. The only application that can give you a menu is xdgmenumaker, otherwise, you have to do it manually. Unfortunately xdgmenumaker is not in the FreeBSD repositories.


Default look, and taskbar on top.


Active Member

Reaction score: 28
Messages: 168

Thanks Macondo - I have tried this WM a couple of times but could never figure out how to make the taskbar smaller: it is almost 1/2 inch tall and takes up too much space. Is this possible?


Active Member

Reaction score: 69
Messages: 149

Thanks Macondo - I have tried this WM a couple of times but could never figure out how to make the taskbar smaller: it is almost 1/2 inch tall and takes up too much space. Is this possible?
You're welcome, np. you have to lower the number in the 'Tray at the bottom' , mine is at 20 by default. Different distros omit this figure as in FreeBSD, what distro are you using?

Unfortunately, FreeBSD does not have this figure so you can NOT change the width. Instead, it comes at 20 by default. I will check the JWM site see if there is a hack for it, but yours shouldn't be this thick, I think my other box with Debian had this problem (thick taskbar), but I just lower the number to 20, (it's the figure prior to Autohide). Also, make sure the virtual desktops are in one horizontal line, instead of 2 or 3 lines one on top of the other.

  <!-- Virtual Desktops -->
    <!-- Desktop tags can be contained within Desktops for desktop names. -->
    <Desktops width="2" height="1">
Where 2 is the number of desktops, and 1 is one horizontal line only.

  <!-- Tray at the bottom. -->
    <Tray x="0" y="-1" autohide="off"> The width is missing here.
This screenie is JWM in FreeBSD 10.3, notice how thin the taskbar is by DEFAULT:

How many desktops you got?



Active Member

Reaction score: 28
Messages: 168

Using FreeBSD exclusively, I don't use Linux. Interesting: I have seen other screenshots that show it as small as the screenie you posted. Mine is huge for some reason and it really shouldn't be - I am running on a 26inch monitor with 1980x1200 resolution. Thanks again.


Active Member

Reaction score: 28
Messages: 168

Macondo: this works:
<!-- Tray at the bottom. -->
   <Tray x="0" y="-1" height="20" autohide="off">
Now it looks like the screenshot you posted. Thanks for the tip!


Active Member

Reaction score: 75
Messages: 225

jwm and rox work very well together IMO. I use a rox panel at the top of the screen that's always visible, and a auto hide jwm tray at the bottom of screen, central - as a dock and tray, i.e. is defined using opening tray command of
<Tray autohide="bottom" insert="right" valign="bottom" halign="center" width="600" height="84">
... so its quite large (84 size when visible). Within that I have a clock, that is set to also act as a showdesk when clicked and that just shows the day of week/date/month, with a xclock next to that that shows the time, and then a dock and a xload chart and finally a tasklist

<Clock format=" %a %d %b">showdesktop</Clock>
<Spacer width="8"/>
<Swallow name="xclock" width="84" height="84">
xclock -padding 0 -hd cyan -hl cyan
<Spacer width="8"/>
<Dock spacing="10"/>
<Swallow name="xload" width="64" height="72">
xload -nolabel -bg "#333333" -fg red -hl white
<TaskList maxwidth="64"/>

Rox panels are good as you can drag/drop program files to them to add them to the tray, middle mouse drag/drop to move them around in the panel. You can also drag/drop files onto the icons in the panel to open that file using that icons program.

I include all my startup commands in the .jwmrc also, wrapping them inside the <StartupCommand>...</StartupCommand> tags. So to answer the previous posters question you might include something like

<StartupCommand>rox -p /home/user/.roxpinwork</StartupCommand>
<StartupCommand>rox -t /home/user/.roxpaneltop</StartupCommand>
<StartupCommand>setxkbmap -option terminate:ctrl_alt_bksp</StartupCommand>
<StartupCommand>xclock -hd cyan -hl cyan</StartupCommand>
<StartupCommand>mixerctl outputs.hp_boost=on</StartupCommand>

... which is a extract from part of my current .jwmrc, notice the rox -t ... and rox -p ... for the panel at top of screen and rox pinboard activation.

I only have a single monitor and so just use a single desktop, I do however have multiple rox pinboards with different icons/files/folders (and backgrounds (wallpapers) on each. I include a script for each panel in the rox panel ... for instance the one for my office 'desktop' (pinboard) contains

rox --pinboard=/home/user/.roxpinoffice

ditto in a similar manner for other pinboards (home, scratchpad, computer, music ...etc.). So a single click flips between whichever pinboard you desire. My computing one for instance contains links to configuration files along with html links to reference material; My music pinboard contains links to my current favourite videos/mp3's etc. I have it so pretty much everything is on pinboards or the panel so much so that I don't bother having a MENU at all. I even have my browser bookmarks on pinboards so that I just 'showdesktop' and navigate to the appropriate pinboard and click a html link to open a particular web page.

You can drag/drop files from within rox-filer onto the pinboard, but be mindful that just creates links to the files, not actual copies. You can also move pinboard icons around using drag/drop.

jwm aerosnap option in later versions of jwm is nice, enables you to drag a window to one of the sides and have that window sized to half screen ... handy for opening the likes of two rox filers windows side by side ready for dragging/dropping files between different folders.

Rox is all based on RISC (reduced instruction set) on X (hence ROX), very much for the mouse being primary (drag/drop movements). If you have most of your common programs in the rox panel then whenever you want to open a file you can just drag/drop it to the relevant program icons in the rox panel to open it. You can also set up OpenWith associations so that clicking a file opens it with a specific program.