In a previous blog entry I had gone into gory detail about selecting a distro
to run on my ancient Toshiba laptop (which has just 256MB of memory). I have a
laptop of similar vintage which will soon be reaching its 20'th birthday which
I use for all of my internet access/browsing. It currently runs Ubuntu 16.04
and my attempts at "upgrading" it to newer versions of Ubuntu have all failed,
stymied by the fact that it has only 2GB of memory. I can't stay with the
existing version of 16.04 since it's way past its support date and also the CA
certificates on it seem to have expired causing git clone
failures when I try
to clone code from most of the non-github repos. In this blog I'll be talking
about my successful attempt running the latest Gentoo livecd + a homegrown
version of olvwm on this old laptop.
The Gentoo LiveGUI comes with a glitzy KDE/Plasma desktop with lots of bells
and whistles. But I prefer to run olvwm
which is my window manager of choice
so the first step is to boot the Gentoo livecd without a GUI using the nox/nogui
option at boot. See how to boot into Gentoo without the GUI for details on how to do this.
Gentoo will mount the disk partition (containing the ISO it booted from) at
/run/initramfs/isoscan
. So I use this partition to also keep copies of olvwm
and sundry other related start up files.
The following are the commands that are run at the CLI after booting into Gentoo (with the nox/nogui boot paramater). You can save this into a file to run it as a single command.
cat /run/initramfs/isoscan/home/ubuntu/custom/olvwm/.openwin-menu | perl -pe 's/xterm.*/konsole/' > ~/.openwin-menu cat /run/initramfs/isoscan/home/ubuntu/custom/olvwm/Xclients | perl -pe 's/xterm[^\&]*/konsole -e tmux /' > ~/Xclients cat > ~/.xinitrc <<'EOF export PATH=$PATH:/run/initramfs/isoscan/git/github.com/xview/xview/xview-3.2p1.4/clients/olvwm-4.1 konsole -e tmux & /run/initramfs/isoscan/home/ubuntu/custom/olvwm/start EOF
The shell commands in /run/initramfs/isoscan/home/ubuntu/custom/olvwm/start
is
inherited from my earlier Ubuntu configuration and this contains the following entries:
xrdb -merge ~/.Xresources setxkbmap -option caps:swapescape olvwm -f
The contents of ~/.Xresources
is shown below - it is used to customize the
look and feel of the window manager and can be modified as required.
olvwm.VirtualDesktop: 1x16 olvwm.VirtualBackgroundColor: grey50 olvwm.VirtualRaiseVDM: True olwm.SetInput: followmouse olwm.WorkspaceColor: grey35 olwm.NoDecor: olvwm olwm.AutoRaise: True olwm.IconLocation: right-bt olwm.Background: grey42
The entries in /run/initramfs/isoscan/home/ubuntu/custom/olvwm/.openwin-menu (which controls the menu you get when clicking on the right mouse button) can be customized to your own preferences. The set of applications to run when X starts up can be configured via ~/Xclients (although Gentoo does not seem to honor that anymore).
With all these preliminaries in place, you can just run startx
as usual which
will bring up the X server and run the commands that were listed in .xinitrc
which will eventually run olvwm
in the desktop.
This screenshot shows
olvwm
running
konsole
running tmux
with 16 virtual screens on the left.
The terminal shows the output from running free
to show the available and used
memory to check how much memory is used and this shows that it uses about only
a third of the usual memory usage running KDE/Plasma (which is the default GUI
you get when booting into Gentoo LiveGUI). I don't usually run tmux - it is
used here just to display the time.
All in all, this transition went surprisingly smoothly - the only thing I'm
missing is xterm
which for some unknown reason is not part of the latest
Gentoo so that's why I'm running konsole
instead. I have run emerge
and
successfully built and installed xterm
using this setup so it's a fairly
easily solvable thing.
The following are a list of other issues that I needed to workaround or need to resolve longer term:
The uid for the default user has changed from 999 (on Ubuntu 16.04) to 1000 on Gentoo so I run into ownership issues if I try to mount partitions (in either direction). I could bite the bullet and do a one time ownership change from Ubuntu to Gentoo but I'm still kind of waffling about the final distro choice I want to make so I don't want to jump the gun on that decision, yet.
The olvwm
that is running here was built (as a static binary) on Ubuntu 16.04.
Trying to build it from scratch on Gentoo ran into issues with imake
so that
is work for later.
The ebuild for olvwm which used to exist on Gentoo has been removed (software rots too, I guess) so I'll have to roll my own if I want to build it on Gentoo.