Who is the lightest of the lightweight desktops? Is there enough difference to be worth the switch? What are the pros and cons of having multiple choices in desktops?
I installed Xubuntu on a Micro TransPort ZX with 256 megabytes of memory. As the name sort of implies, Xfce is the desktop for Xubuntu. For machine with 256 megabytes of memory, Xfce was my default desktop. For some reason, this version of Xubuntu seems to weigh in a bit heavier than when I installed Xfce under Linux Mint. Immediately after booting, I open a terminal window and execute the free command. The results are that I have 5,072K of free memory, with a maximum fo 94,792K available if necessary.
To understand the free command, you need to understand the way the Linux Kernel manages memory. In a nutshell, the Kernel believes in using available memory. The kernel pre-allocates buffers and caches for future use. Furthermore, the kernel doesn’t immediately reuse a cache. For example, if it reads a directory, it keeps the directory information in cache, even though there are no longer any references to the directory. If it does need the directory information, it doesn’t need to go back to disk to get, as it has it in memory. If the Kernel needs memory for applications, it can steal it from unused buffers and caches. The Kernel never allocates all of memory, as it wants to make sure that it survives. If things get real desparate, the Kernel still have enough memory left to kill the application that is hogging memory.
Enough of a sidetrack. I installed LXDE, switch to using it as a desktop, rebooted and ran the free command. The results are dramatically different. LXDE had 70,616K of free memory, and 167,436K of memory after adding in free buffers and caches. LXDE wins the lightweight contest hands down. Now, it is time for the Xfce community to get back in the game.
Installing LXDE
While the Xubuntu “Add/Remove…” option does not include LXDE, the Synaptic Package Manager does. Just search for LXDE, and instll the lxde package, which is the meta package. It does not include everything, but it includes the essentials. I added lxterminal, just to evaluate the LXDE terminal emulator. On my first round, I tried installing lxnm (Lightweight X11 Network Manager) but it was missing some components. The end result was that I was not able to conect to the network from either LXDE or Xfce. lxrandr is a nice tool for those who need to dynamically change screen size.
To switch to the LXDE desktop, you need to Logoff. Before logging back in, click “Session” and select LXDE. You can now log in. When it asks you about making LXDE the default desktop, go ahead and click OK. You are now running the LXDE desktop.
Pros and Cons
Without doubt their is an increase in free memory. The rest of the window looks just fine. The lack of a desktop network manager means that you have to manage the network from the command line. When I logged back in after switching desktops, the WiFi card was working just fine. After rebooting, it would not start the card, even though it recognized that there was an ath0 interface. The iwlist ath0 scan showed there was a WiFi network. After researching various forums, it appears that LXNM (the LXDE Network Manager) still fails to support WiFi. The recommended solution is to use wicd. Unfortunately, wicd is not in the Intrepid repository, or the repository of any prior release. The wicd download page does contian instructions for adding the wicd repository to the Synaptic Package Manager. After folloing the instructions, the search would not find wicd. Using apt-get from the command-line works: apt-get install wicd
After instill wicd, I did loose my Wifi network connection. I rebooted, the desktop applet was on the task bar, and I enabled a wifi connection without a problem. Just beware that wicd replaces the Xfce network packages.
With Xfce, the window manager is xfwm4. As a compositing window manager, it is not exactly lightweight. LXDE uses Openbox as the window manager. As a stacking window manager, Openbox is much lighter than xfwm4. The difference is that you will loose the 3D effects provided by compositing window managers. If you are running older hardware that lacks 3D hardware support, a composite window manager consumes resources for no return. If you want a compositing window manager, Xfce is a the lightest of the heavyweights.
For some reason, the Intrepid (Ubuntu 8.10) repository does not contain the lxtask package (the task manager / system monitor). The bottom of the Intrepid page at the ubuntu-lxde wiki provides instructions for installing lxtask from the Hardy repository. You activate lxtask by pressing Ctrl-Alt-Delete. This is like running the top command, but with a little flare.
This configuration still uses GDM as the GUI login manager. Without eliminating a graphical login, we can use “slim” as a lightweight login manager. The slim page at the ubuntu-lxde wiki describes how to switch from GDM to slim. There is an error in the instructions. When editing the /etc/slim.conf file, you need to replace startxfce4 with startlxde.
One of the problems with switching to LXDE is that you have some duplicate applications. You can use the Synaptic Package manager to remove any unwanted applications. For example, I removed Abiword and Thunbar. If you deside to remove the Xfce Terminal Emulator(xfce4-terminal package), you need to modify the task bar to use LXTerminal.
There is more you can do to enhance and modify the LXDE desktop. One good starting place is the ubuntu-lxde wiki. Although it was a bit of work, the change was worth it.
17 comments ↓
[...] vs XFCE March 12 2009 at 8:50 pm | In lxde | Tags: lightweight, lxde, xfce A memory footprint comparison: LXDE wins the lightweight contest hands down. Now, it is time for the Xfce community to get back [...]
I’m an LXDE lover too. I installed it on top of Mandriva with GNOME, and I found that the network manager and everything else from GNOME was still available. So with Ubuntu, you might be better starting with the standard Ubuntu rather than Xubuntu.
It broke the GNOME window manager, though – so at login, when I could click a button and choose which DE or WM to use, the working choices were: LXDE, Openbox, GNOME + Openbox, and IceWM. Openbox and LXDE are my favorite options. (As I get the hang of Openbox, it’s super lightness and elegance are great; but having LXDE there has been essential for times when I couldn’t figure things out in Openbox.)
The machine used for this install only has 256 megabytes of memory. Previously, I had installed Linux Mint, and then switched it to XFCE. This time I decided to start out with XFCE, but was disappointed in that it seemed to have gained some weight. So, I decided to test LXDE. The network manager in Xubuntu worked just fine. In LXDE, it refused to recognize the existence of the card. The easy solution was to install wicd. As it turns out, I really like this network manager. I forgot to mention that Mandriva 2009 Spring supposedly will use LXDE as the lightweight desktop manager. I run Mandriva on another machine.
WHAT?! I accidentally the whole LXDE, is this bad?!
What did you accidentally do? Your comment is not clear, as to what happened.
You might want to try u-lite.
It is like xubuntu, with lxde. Lxde has been configured to look like gnome, just like xfce/xubuntu has.
I took a quick look at the Web site. It has the potential of being an interesting project. When it is available, I will take a look at U-lite. The laptop on which I install it is also the machine that I use for amateur radio. As a result, it must be able to run ham radio applications.
I think your comparison is not fair as you compare two really different things.
The Xubuntu version installs and runs a lot of services at startup (printing, wireless, network manager, xfconf, bluetooth, other gnome services for compatibility, etc.) and the XFCE panel is sometimes really charged with applets that use a lot of memory too, while lxde does not run automatically all the services needed at startup (you need to put them yourself under ~/.config/autostart) and the panel doesn’t have so many plugins.
So to do a fair comparison, you need to start over of a minimal install (from the mini cd, command line install, and then everything manual) and make sure you have the same small amount of other things running to be comparing really only xfce to lxde.
You are correct in that each distro loads different software as part of the startup. This is not limited to just the desktop that you mention. Actually, an easier test is to check the RSS of each major component of the desktop. While this number varies, it is a reflection of the actual consumption. A better test is to take snap shots of RSS for the key components of a desktop over a period of time. I have also noticed that there is a large difference in amount of memory held in the cache for the different distros on the same machine.
simple question: what is the result of ‘free’ command after ‘tweaking’ stuff (put the wifi back to work, etc)?
It has been awhile since I ran those test. The machine used for those tests is now running Xubuntu 9.10. While I like LXDE, it still has a ways to go. In addition, I had to hand edit too many desktop files to get them to integrate in LXDE.
I’ve installed Debian+LXDE, and Debian+XFCE, both on separate identical virtual machines (VirtualBox) with 256 mb of RAM each.
Right out of the box and after booting them, the free command shows the following results (used -/+ buffers/cache), which show them to be pretty much equivalent, at least much more so than what the posts above suggest:
Debian+LXFE: 52.8
Debian+XFCE: 57.5
For the record, tried also Debian plain (no graphical desktop environment installed). Right after booting, free command shows used -/+ buffers/cache to be:
Debian (plain): 12.2
The memory usage depends on the applications started. Since LXDE is rather short on the application side, the default install often includes XFCE and Debian applications. Try the test with only LXDE applications.
[...] [...]
Ubuntu and it’s variants and complete piecea crap… the binaries made are rubbish, too many services are running in a fresh install (even ssh) and it ain’t even that easy compared to other comparable distros.
If you gotta compare, do it in arch or Gentoo (the latter is preferred)
Personally, I am not a fan of either Arch or Gentoo. As for services that exist on install, it is a matter of creating a distro that appeals to their primary audience. However, I do not see a reason to run sshd on any system that is not a server. By the same token, I do not see why many distros run the bluetooth daemon, when there is not a bluetooth interface.
As for a comparison between LXDE and XFCE, I try to insure that the same daemons are running to insure a reasonable measure. I am getting ready to write a comparison between PSLinuxOS XFCE and PCLinuxOS LXDE releases.
Leave a Comment