Lightweight Debian: LXDE Desktop From Scratch Part 2

In part 1 of this article series I’ve described a minimal Debian installation using network install image. I started with a regular server, added the desktop environment, and installed some more common desktop applications. In this article I will continue with several enhancements to the previous setup. Most of the information in these articles applies to other desktop environments as well.

Desktop Icons

The default install of LXDE does not enable desktop icons. This is how I would set up the classic Home/Trash/Internet trio.

I add an empty file on the desktop (right-click on empty space on the screen), I open it in Leafpad and copy the following text in the file:

[Desktop Entry]

Similarly, I create a new Trash.desktop file with the following content:

[Desktop Entry]
Exec=pcmanfm trash:///

/usr/share/applications stores desktop files for all installed GUI applications. I copy iceweasel.desktop file in ~/Desktop folder.

$ cp /usr/share/applications/iceweasel.desktop ~/Desktop/.
Default nuoveXT icon theme in LXDE

Default nuoveXT icon theme in LXDE

You can change the icon theme by running LXAppearance utility from the menu Preferences/Customize Look and Feel. Several icon themes are provided by default, you can install more using apt-get, for example Oxygen icon theme (apt-get install oxygen-icon-theme):

Oxygen icon theme in Debian

Oxygen icon theme in Debian

Password removal

  • To configure automatic login open /etc/lightdm/lightdm.conf in a text editor and add the following line in [SeatDefaults] section:

  • To configure password-less partition mount open
    /usr/share/polkit-1/actions/org.freedesktop.udisks.policy and change allow_active XML tag value to yes for filesystem-mount-system-internal.

     <action id="org.freedesktop.udisks.filesystem-mount-system-internal">
        <description>Mount a system-internal device</description>
        <message>Authentication is required to mount the device</message>


Mutter is the current Gnome 3 window manager. It is OpenGL-enabled, the visual effects are subtle, understated, and perform flawlessly.

Mutter can replace Openbox in LXDE, and bring a modern, elegant look to your desktop. To experiment with it, install the software package and start it:

# sudo apt-get install mutter
# setsid mutter --replace &

To return to Openbox, you will need to logout and login again. To make the change permanent go into /etc/xdg/lxsession/LXDE/autostart and add the following line at the end of the file:

@mutter --replace

If the kernel supports the hardware-accelerated video card, the extra memory required to run Mutter is small. On my computer with a Nvidia card (nouveau driver) Mutter added 11MB to desktop RAM consumption. For a computer where the video card is not recognized by the kernel, the amount of memory increases. In my experiments on Debian “wheezy” the increase was 40MB of memory.

LXDE desktop running on top of Mutter window manager

LXDE desktop running on top of Mutter window manager

Desktop sharing

One of the easiest way of using a VNC server on Debian is by sharing you desktop with Vino VLC. You are alerted every time a user tries to connect, and you can specify if the user can control the desktop or not. This is how you install and configure Vino:

$ sudo apt-get install vino
$ vino-preferences

You can also create an icon on your desktop for vino-preferences:

$ cd ~/Desktop
$ cp /usr/share/applications/vino-preferences.desktop .
Vino VNC desktop sharing preferences

Vino VNC desktop sharing preferences

I usually start (/usr/lib/vino/vino-server &) and stop (pkill vino-server) Vino manually. This way I have additional access control over the server. To access such a server, use any vnc viewer available. In Debian you can install one using:

$ sudo apt-get install vncviewer

Autostarting programs

To start a program automatically when you login, all you have to do is to create a .desktop file in ~/.config/autostart/ directory. As an example, this is an autostart entry for vino VNC server described above:

$ cat ~/.config/autostart/vnc-start.desktop 
[Desktop Entry]
Name=VNC server
Comment=VNC server autostart


Debian “wheezy” is not a cutting-edge distribution. On the desktop side you can catch up to the latest and greatest software for some packages using Debian backports. To enable backports add the following lines to /etc/apt/sources.list:

deb wheezy-backports iceweasel-release
deb wheezy-backports main contrib non-free
deb-src wheezy-backports main contrib non-free

To install packages from backports add the arguments -t wheezey-backports to apt command, for example:

apt-get install -t wheezy-backports iceweasel
apt-get install -t wheezy-backports linux-image-amd64
apt-get install -t wheezy-backports vlc

With backports enabled I am able to run Linux kernel 3.12.9, VLC 2.1.2, Firefox 27.0.1 (latest Firefox version released by Mozilla at the time of writing). The official page with all the packages available on backports can be found here.

Latest Mozilla Firefox version available on "wheezy" backports.

Latest Mozilla Firefox version available on “wheezy” backports.


Some of the settings presented in this article will also work on other desktop environments. If you are looking for a lightweight desktop for your Debian box, this is a memory chart you can use. I did the measurements on my computer immediately after a fresh boot and login.

Debian 7 Memory (MB)

Debian 7 Memory (MB)

Related Posts

14 thoughts on “Lightweight Debian: LXDE Desktop From Scratch Part 2

  1. Pingback: Lightweight Debian: LXDE Desktop From Scratch Part 2 | Hallow Demon

  2. scrapbook challenges

    After I originally left a comment I seem to have clicked on the -Notify me
    when new comments are added- checkbox and frm now on every ttime a comment is
    added I recieve 4 emails with the same comment.Ther haas to be a means you are able to remove me
    from that service? Thank you!

  3. Pingback: News About Debian and Its Derivatives | Techrights

  4. Willy

    Wow! Great setup! I installed this just for kicks, and now I’m hooked. Great write up. We should release a distro that is exactly this with a few popular apps installed.

  5. Pingback: » Debian LXDE Auto Login default xSession

  6. Pingback: Lightweight Debian: LXDE Desktop From Scratch | João Antunes Guimarães-Blog

  7. woosting

    Very nice article; clear, to the point, and exactly what I needed.

    Especially the part about vino and how to manually start it. Maybe also add a screen-shot on where the setting – to make it start automatically – is located in the LXDE GUI (in contrast to unity on LXDE it is off by default, at least in Lubuntu I think).

    At any rate; thanks for sharing!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s