If you're fed up with the recent "innovation" and bloat in desktop environments (Unity, GNOME 3, KDE, and even XFCE), then LXDE is for you.
One option is to use Lubuntu, but some of us prefer to work with the standard Ubuntu install, and possibly add LXDE as an alternate desktop, while still enjoying Ubuntu features like the global menu, indicators and notification. Unfortunately, the default LXDE configuration in Ubuntu is ... sad. This guide will help you create a nice LXDE desktop in standard Ubuntu that is as close to the standard Ubuntu experience as possible. It will only take a few minutes and do nothing irreversible.
This guide was tested with Ubuntu 11.10. Here's a screenshot of the result:
Step 1: Installation
First, let's install LXDE. These packages will give you only the essentials without any bloat:
Next, let's add the Ambiance and Radiance themes for LXDE by RAVEfinity:
sudo apt-get install lxde-core lxappearance obmenu qt4-qtconfig xcompmgr
Step 2: Configuring the appearance
sudo tar xzvf "146674-Ambiance&Radiance-XfceLXDE-11-10-2.tar.gz"
sudo mv Ambiance-Xfce-LXDE /usr/share/themes/
sudo mv Radiance-Xfce-LXDE /usr/share/themes/
Logout, and login with the LXDE session. Yay! Well, except for the fact that it's ugly.
Go to "Preferences" -> "Openbox Configuration Manager". (Openbox is your window manager. It draws the window decorations.)
1. In "Theme", select "Ambiance-Xfce-LXDE" (or the Radiance version). Note that the window decorations are not exactly like those in Compiz or even Metacity, due to the limitations of Openbox. But it's not bad!
2. In "Appearance", set the button order of "Window Titles" to "CIML".
3. Change all the fonts to the "Ubuntu" font, "Regular" style.
Now go to "Preferences" -> "Customize Look and Feel". (This affects all LXDE components. Note that LXDE uses GTK+2, and is comptable with any GTK+2 theme.)
1. In "Widget", choose "Ambiance" (or Radiance), and set the default font to "Ubuntu" font, "Regular" style.
2. In "Icon Theme", choose "Ubuntu-Mono-Dark" (or "Light" for Radiance).
3. In "Font", you really want to enable antialising, and likely hinting, too. (Note: I had to fool around with these settings a bit to get them to work properly. It seems a little buggy.)
Now go to "Preferences" -> "Qt 4 Settings" -> "Appearance" and change the "GUI Style" to GTK+. This will make sure Qt applications have the same theme you chose before.
Now we'll enable some pretty compositing (transparencies, fades and shadows) using Cairo:
Add this line to the top:
gksudo gedit /etc/xdg/lxsession/LXDE/autostart
Save, logout and login to see all your changes.
@xcompmgr -fF -I-.002 -O-.003 -D1 -cC -t-5 -l-6 -r5
Troubleshooting 1: Compositing
If you get weird graphical glitches, it's best to replace the line above with minimal compositing using this instead:
Troubleshooting 2: Font size issues
On some machines, fonts may appear to be far too big or far too small. This is because X11 is not configured for the right DPI (dots-per-inch). The following my help:
You should see a block called 'Section "Monitor"'. Make sure it has the following line:
gksudo gedit /etc/X11/xorg.conf
Logout and login for changes to take effect. If this doesn't solve things for you, you'll need to delve a bit deeper into your X11 configurtion. Good luck!
Option "DPI" "96 x 96"
Troubleshooting 3: Multiple monitor setups
The LXDE panel will appear on the primary monitor. However, if the primary monitor is not the leftmost monitor, the panel size will be incorrect. Luckily, this is easy to fix. Right-click on the panel and choose "Panel Settings". Under "Geometry" -> "Margin" put the sum width in pixels of all monitors to the left of your primary monitor. In my case, I had one monitor on the left that was 1680 pixels wide, so I just had to put "1680".
Troubleshooting 4: The default browser has been changed to Chrome instead of Firefox
Easy to change back:
Step 3: Configuring the keyboard
sudo update-alternatives --config x-www-browser
LXDE does not do any special handling of the keybord, leaving it to you your windows manager to X11.
To configure keyboard layouts, we'll use X11. In this exmple we'll enable ALT+CAPSLOCK for switching between English/USA and Hebrew/Israel layouts, as well as enable right-CTRL for the compose key:
Add these to the file (it may be empty):
Settings will take effect next time you login. You can also test the commands immediately by running them in the terminal (without the "@" prefix).
@setxkbmap -option grp:alt_caps_toggle "us,il"
@setxkbmap -option "compose:rctrl"
For variations, you'll need to explore setxkbmap.
Keyboard shortcuts are handled by Openbox, our window manager. You can edit them manually using this guide:
(There's a program called obkey that can help, but it's not packaged for Ubuntu.)
Some suggested changes to keyboard bindings:
1. Replace references to "lxterminal" with "x-terminal-emulator". This will make sure that you run your default terminal emulator.
2. Replace reference to "pcmanfm" with "nautilus" if you prefer it (see below).
3. If you want to assign a key to your web browser, use "x-www-browser", which will open whatever is configured as your default.
Enhancement 1: Replace PCManFM with Nautilus
You might like PCManFM managing your desktop, but it was too minimal for my tastes. (It also does a bad job with wallpapers on multiple monitor setups.) To use Nautilus instead:
Comment out the pcmanfm line by prefixing a "#" to it, and add a line for Nautilus. In my case it looked like this:
gksudo gedit /etc/xdg/lxsession/LXDE/autostart
You will need to logout and login for the changes to take effect.
#@pcmanfm --desktop --profile LXDE
You'll likely also want to change the keybinding for PCManFM to lacunh Nautilus instead (see above).
Enhancement 2: Add the Unity Panel
For some users, the Panel may already be working for you. If not, then run:
Click "Add" and call the new entry "Unity 2D Panel" with the command "unity-2d-panel". Make sure the entry is enabled.
Next time you login, you should see the Unity panel, providing you with the global menu as well as the rest of the Unity indicators. You might want to remove some applets from the LXDE panel (clock, etc.) because they already have equivalents in the Unity panel.
1. The Unity panel's "Logout" option in the power indicator will not work. But LXDE's shutdown app works fine.
2. The global menu) will only appear in the primary workspace.
Enhancement 3: Synapse
Synapse is a lean-and-mean keyboard launcher that fits perfectly with LXDE's lightweight profile:
sudo apt-get install synapse