openSUSE is a great distribution with a great community. It is well known for its excellent Gnome and KDE support. As such, it is never described as a lightweight distribution.
In the latest versions, openSUSE installation media started to offer support for lighter desktop environments, such as LXDE and XFCE. These environments have almost the same application selection as the Gnome version, under a much lighter memory footprint.
If you are looking for a lightweight distro, this is not the time to give up on openSUSE, especially if this is your favorite OS. Try the LXDE/XFCE environments, as lightness goes they are definitely in the same league with Lubuntu/Xubuntu and Fedora LXDE/XFCE Spins. You can do even better, if you build your own desktop starting from a regular server install and adding only the necessary desktop components.
In this article I will describe how to build a light LXDE desktop on the latest openSUSE 12.3 release. I will start with a server install, and I will go trough the process of adding an X Window server and LXDE desktop environment. It is not difficult, and at the very least, it is an opportunity to learn more about a Linux system.
The same way can be done with any other window manager. The result will be different, as each WM/DE has its own memory footprint.
I installed openSUSE on an old dual-core 64bit computer using the newtork install image. The network was detected automatically, and the install image gave me the following desktop choices: Gnome, KDE, XFCE, LXDE, Minimal X Window, and Minimal Server. I’ve selected Minimal Server and about half an hour later I was happily booting my new system.
First things first, I logged in with the user name/password created during installation and run free command. This told me the system is running in only 41MB of memory. It is definitely a server setup. Once X Window system and LXDE are started, the memory count will go up.
By default, networking subsystem is configured for Dynamic Host Configuration Protocol (DHCP). openSUSE uses dhcpcd daemon to retrieve the configuration from a DHCP server. This setup is probably the most common network setup deployed today, used as default by any operating system out there. If something goes wrong during boot and the DHCP exchange fails, you can restart it manually using rcnetwork restart command.
openSUSE also starts by default a Network Time Protocol (NTP) client. The client daemon keeps the computer time synchronized with a number of reference servers available on Internet.
Also started by default is systemd. This is a system and service manager for Linux, a replacement for the more traditional SysV and Linux Standard Base (LSB) init scripts. It provides very aggressive parallelization capabilities, as a result the system startup is fast.
systemd is still under heavy development and it is not as mature as the other options available. This is one of the main reasons some people are moving away from systemd-based distros such as openSUSE and Fedora to more traditional systems such as Debian.
Another process started by default is D-Bus. It is a message bus system, and it allows desktop applications to talk to one another. It is not clear why openSUSE would chose to run it by default in a server setup.
Next step is to install the X Window environment. openSUSE uses zypper to manage packages. It is very similar to yum and apt-get, the minor differences can be solved using the man page or –help program argument. To install X11, the command is:
# zypper install xorg-x11 xorg-x11-server
X11 is started using startx command. First time you run it, it will autodetect your hardware and it will autoconfigure your display. The autodetection is usually very good, in my case it detected my display and set it up for 1280×1024 at 60Hz – on a full LXDE desktop you can change it form System/Preferences/Monitor Settings.
Started as root with startx, the X server will complain about a missing window manager. The window manager is a separate component, its job is to open, close, move, minimize, and maximize windows. As I don’t have any window manager installed in this moment, the X server will clear my screen and it will open an xterm. From this xterm it is possible to open more windows and start programs directly from the command line (xterm, firefox, gimp etc.). However, window operations are not implemented, you are always stuck in the last window opened.
Time for a new memory measurement: 61MB reported by free command running in xterm under startx. Press Ctrl-Alt-Backspace to shut it down and return to console mode.
Very little information can be found regarding installing LXDE on openSUSE. The best I can came up with is this blog article. I reproduce here the command without NetworkManager, as my network is already doing fine, thanks.
# zypper install lxappearance lxappearance-lang lxappearance-obconf \ lxcc lxde-common lxde-common-branding-openSUSE lxdm lxinput lxmenu-data \ lxmusic lxmusic-lang lxpanel lxpanel-lang lxrandr \ lxsession lxsession-edit lxshortcut lxtask lxterminal \ lxterminal-lang menu-cache mtpaint nuoveXT2-icon-theme \ obconf openal-soft openbox pcmanfm pcmanfm-lang
I create a file .xinitrc in root home directory as follows:
# echo "exec startlxde" > ~/.xinitrc
This file tells X Window server to start LXDE window manager once the xserver is running.
(more screenshots here)
Another way to start LXDE is to use a display manager such as xdm. It is started as root with xdm command. It will ask for a user name and password before starting LXDE environment.
In my LXDE terminal free command reports 103MB memory already in use. This is about half the RAM memory compared with major LXDE desktops such as Lubuntu and Fedora LXDE spin. It will also beat openSUSE default LXDE install by a wide margin.
openSUSE is not perceived as a lightweight distro, but you can still build a lightweight system using the regular server install and zypper package manager. And if anything goes wrong, you can revert to the default LXDE system provided in the installation phase. The magic command to install the default LXDE desktop is
# zypper install patterns-openSUSE-lxde
Just to put things into perspective, a full openSUSE 12.3 KDE install on the same computer starts in 344MB.