====== JWM ======
jwm is a very lightweight window manager. It does a few things very well and
leaves the rest to you. If you are tight on memory and CPU - this may work
better for you. No dbus, hald, cups, or pulseaudio required but you can add these
as needed for other packages.
The downside is some hand configuration is required. Knowing XML syntax helps.
===== Installation =====
:!: You must complete all the prerequisites in the [[unitrunker/easier#Prerequisites|Prerequisites]] page before proceeding.
These instructions will install [[https://svnweb.freebsd.org/ports/head/x11-wm/jwm/pkg-descr?revision=HEAD|jwm]].
Log in as ordinary and run the following commands which install jwm and modify the .xinitrc configuration file to automatically run jwm when X is started.
$ su -
(enter root password)
# pkg install xorg jwm xlockmore xfontsel
# pw groupmod video -m ordinary
# pw groupmod wheel -m ordinary
# pwd_mkdb -p /etc/master.passwd
(drop out of root)
# exit
$ echo 'exec jwm' >> ~/.xinitrc
===== Initial Menu =====
Make a copy of the default menu file. You can find it under /usr/local/etc.
$ cp /usr/local/etc/system.jwmrc ~/.jwmrc
The example menu shipped with jwm assumes you have firefox, audacity, pidgin,
and gimp installed. These menu selections won't do anything if the aforementioned apps
aren't installed. Treat them as examples to be edited to suit your own needs.
You may want to instead use the example menu attached to this page.
{{unitrunker/jwm/jwmrc?linkonly|.jwmrc}}
Be careful when editing. It is XML so all the usual "well formed" XML formatting rules
apply.
The menu provided here includes an option to edit the menu file in your
favorite editor. After saving your changes, the "Restart" option re-loads the
menu file to pick up your changes. Do keep a backup in case you make a mess.
$ startx
To see the menu, click the left mouse button.
< screenshot of menu >
As you customize your machine with more apps, you can hand edit the .jwmrc
menu file to add menu selections to quickly run those apps.
===== Menu Edit =====
The program entry lets you edit the .jwmrc menu file from your X session. This example uses 'vi'. You can instead use 'ee', 'micro', 'ape' or whatever editor you've installed from pkg or ports.
xterm -e vi .jwmrc
Use Restart below to tell JWM to reload the menu.
===== Restart =====
This menu entry lets you restart JWM from within your X session. You don't need to completely exit X and jump back into X.
%%<%%Restart label="Restart" icon="view-refresh.png"/>
===== Exit =====
This menu entry exits JWM and your X session.
===== Screen Lock =====
This ''%%Program%%'' entry takes advantage of [[https://www.freebsd.org/cgi/ports.cgi?query=xlockmore&stype=all|xlockmore]] to lock your X session while you're away.
xlock -mode blank
===== Background =====
The taskbar at the bottom of the screen has four buttons numbered 1, 2, 3 and 4. These are "desktops". If you have too many open windows in one desktop, you can move
some of those windows to other desktops. The default is four desktops but you can have more or less. The example below sets a solid (very dark) background for all four desktops.
#101010
You can also specify wallpaper for each desktop. Notice the singular spelling of ''%%Desktop%%'' inside the ''%%Desktops%%'' group. This example sets wallpaper for the first desktop.
/path/to/sunrise.jpg
===== Office Example =====
This menu group covers Apache Open Office. At this time of writing, 4.1.7 was the current version. After an Office upgrade, you will need to edit the paths below to point to the new location under the new version.
You can adapt this to instead use Libre Office.
===== Menu Icons =====
The ''%%IconPath%%'' element specifies a directory of icon files. Most software places icons somewhere under ''%%/usr/local/share/icons%%''. One approach is to gather all the relevant icon files into a local directory under your home directory. The other approach is to stack multiple ''%%IconPath%%'' entries to cover the directories.
''%%IconPath%%'' does not understand the "~" tilde so use a full path.
/home/ordinary/.icons
/usr/local/share/icons/gnome/16x16/apps/
/usr/local/share/icons/Adwaita/16x16/categories
/usr/local/share/icons/Adwaita/16x16/apps
/usr/local/share/icons/Adwaita/16x16/places
For the example above, replace 'ordinary' with your user name. Use ''%%find%%'' to discover any icons buried under ''%%/usr/local/share%%''.
$ find /usr/local/share/icons '*.png'
===== Summary =====
Probably the next thing you will want to do is install a browser. There are so
many. Pick the one you know best. You can install these from an xterm window in your
X windows session. You don't need to exit your X session.
$ su -
(enter the root password)
# pkg install firefox
# pkg install chromium
# pkg install iridium
# pkg install midori
You may want to look at installing and configuring 'doas' or 'sudo' in place of 'su' for
these types of chores.
Oh but wait! Technically you have a working X environment but there's no acceleration. Let's fix that now.
Exit your X-session (left mouse click anywhere on the desktop and select "Exit") and then skip ahead to [[unitrunker/Acceleration|Acceleration]].
----
{{tag>HowTo}}