Lenny in virtualbox, RAM 26Mb, boot time 17s

Here is how I configured a Lenny Virtualbox for desktop and development usage on Windows laptop. I tried to make it as slim as possible because the host OS use a lot of RAM.

First install a minimal Lenny. It means uncheck all box at the end of the installation even the “Standard system” one. Then install xserver-xorg, xinit, xauth, x11-server-utils, openbox, lxterminal, fbpanel. We will not install any login manager nor session manager.

To start X11 and login automatically at boot time add this line to /etc/inittab:
x:2345:once:/bin/su PREFERED_USER -l -c "/bin/bash --login -c startx >/dev/null 2>&1"

Modify /etc/X11/Xwrapper.config as the user do not run startx from the console but from init:

Create a .xinitrc file in the home directory:
openbox &
lxterminal &
xsetroot -solid black

Reboot and 17 seconds later check your memory as said in this post.

A variant without auto-login is to do not modify inittab but add this to ~/.bash_profile:
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then