How to Easily Create a Custom Lightweight Desktop Environment

Gnome and KDE are great – they give you a beautiful desktop with all the tools and utilities you need. On either system, you’ll find a solid window manager, desktop icons, a panel full of applets, the works. That’s all well and good for your average desktop PC, but what if you need something lighter, faster, or cleaner in appearance? You could try a smaller desktop environment like XFCE or go with something ultra-slim like Openbox or WindowMaker. On the other hand, you could get exactly what you want, no more no less, by combining individual pieces together into your own custom desktop environment.


When you run Gnome, you’re not running a single application. Gnome launches Metacity (optionally Compiz) to handle window management, gnome-panel to serve as the panel and menu system, and various applets and tools for things like power management and Bluetooth support. Each of these is independent of the others and can be replaced or launched on its own.

What we’ll be doing today is specifying our own list of applications (window manager, dock, etc) to run on login, completely bypassing the likes of Gnome and KDE in favor of our custom apps. There are a few methods of achieving this, and the one demonstrated here was chosen to be functional, simple, and not very distribution-specific.

Designing Your Desktop

To create a functional DE, you’ll need a few basic parts:

  • Window manager (Metacity, Compiz, etc)
  • Application launcher (Gnome-Do, Kupfer, etc)
  • Panel/Dock (Docky, Cairo Dock, PyPanel, etc)
  • Wallpaper manager (bsetroot, hsetroot, etc)
  • Optional panel applets, desktop widgets, etc

This guide will use Compiz, Gnome-Do, Cairo Dock (with applets), and hsetroot to achieve all the needed functionality. Using Compiz as the base window manager gives us the full set of Compiz plugins like Expo and Zoom. All those packages should be available in the standard repositories of most distributions. Ubuntu users can fetch them from the Ubuntu Software Center or with the terminal command:

sudo apt-get install compiz compiz-plugins gnome-do cairo-dock hsetroot

Most of these applications have been discussed in detail on MakeTechEasier. Use our search box to gather more information on which tool is the best for your needs.

Some other usable setups could include dropping the dock/panel entirely and using Gnome-Do for all app launching needs, or adding something like Conky or Google Desktop for system monitoring.

Creating the List

Now that you’ve got an application chosen for each of the roles above, we can begin creating a list so that they will be run on login. Begin by opening any text editor of your choice, and writing out the names of the programs to be run. End each of the lines (except the last) with a &. This symbol tells Linux to run the program in the background and move on to the next item. Without the &, it would run the first line and wait until that program was completed before running the next. That could, for example, prevent the dock from loading until after the window manager is closed – clearly not what we want.


When finished, save the file to any directory you choose (your home is fine) and take note of the file’s name and location. As my name is Josh, I have the file saved in /home/josh/

Adding to GDM list

In what I’m sure must be amazing coincidence, we recently wrote a detailed guide on precisely how to edit the GDM Sessions list to let you launch your own desktop environment.

In short, you’ll want to (as root) create a new file in the /usr/share/xsessions directory. The file should end with the .desktop extension, and follow a template similar to the following:


The only really important lines for this scenario are Name and Exec. Name must uniquely identify your DE so that you can recognize it in the GDM Sessions list. Exec must be the name of the file we created in the previous step, such as

Save the file as /usr/share/xsessions/custom.desktop. Next time you logout, you’ll see your entry in the Sessions list in GDM.


If you’ve followed each of these steps, you created a list of applications you wanted in your DE, saved that list (with appropriate ampersands) into a script, then created a launcher in /usr/share/xsessions to start that script from GDM. Hopefully, your choices have left you with a feature-complete and beautiful desktop. Not only should it meet your specific needs, but there’s a good chance it’ll be far more responsive than a monolithic desktop system like Gnome.


If you’ve got desktop customization stories or suggestions for how to create your own, let us know in the comments!

Joshua Price

Josh Price is a senior MakeTechEasier writer and owner of Rain Dog Software

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox