Showing posts with label Openbox. Show all posts
Showing posts with label Openbox. Show all posts

Sunday, August 2, 2009

Some customization for LXDE

After using LXDE for a while, I've run into a couple of minor issues, so I've done some additional customization.

First, I had a problem with lxpanel. While it is easy to configure, it wouldn't always show the right icons for minimized windows. It was fine for some applications, but not for Java apps. Both jEdit and Eclipse would be displayed with some off-the-wall icons. I have no idea where those icons came from. I spent quite a bit of time scattering icons around per the Desktop Entry Specification and the Icon Theme Specification, but I never did figure out how to get the right icons to be displayed.

The second problem was the terminal. It was working fine, but for some reason, it started using some random directory as the starting working directory. It was always a directory I'd done something in recently, but I couldn't figure out how to change it or where it was keeping the setting for the working directory.

The fix for the first problem was to switch back to fbpanel instead of lxpanel. lxpanel is only slightly more difficult to configure over lxpanel. I created a .fbpanel directory in my home folder, then copied the default configuration from /etc/fbpanel to this new directory. As far as configuration goes, it's just a text file, so I opened it in jEdit and proceeded to edit:
  • I commented out the Emacs section since I don't use Emacs.
  • I changed the clock from 'dclock' to 'tclock' since it's easier to read. Actually, I commented out the section for dclock and added a new one for tclock like this:
    Plugin {
    type = tclock
    }
  • In the launchbar section, I replaced the Rox filemanager with pcmanfm.
  • Also in the launchbar section, I added "--working-directory=/home/danson" to the line about x-terminal-emulator. This didn't fix the second problem by itself.
The fix for the second problem was to run "sudo update-alternatives --config x-terminal-emulator" and choose "lxterminal". Now the terminal always opens in my home directory, which is what I want.

Wednesday, July 22, 2009

Switched to LXDE

I took Openbox one step further and installed LXDE:

sudo apt-get install lxde

LXDE is a Lightweight X11 Desktop Environment. It looks pretty slick, and uses Openbox as the window manager. It also adds a few other things, like:

  • a session manager
  • a lightweight terminal
  • openbox for the window manager
  • a theme switcher
  • a network manager
  • a desktop panel
  • xscreensaver
I needed to do a little bit of customization right off the bat. The default web browser is "Web Browser", which is a Gnome project based on gecko. I prefer Firefox. The docs on lxpanel are pretty weak, so it's not obvious how to add things to it. You need a .desktop file, of which there are plenty in /usr/share/app-install and /usr/share/applications. It should be a matter of just point and click to pick the right desktop file, but it turns out lxpanel will only read desktop files from /usr/share/applications or /usr/local/share/applications. So I copied the firefox.desktop file from /usr/share/app-install to /usr/local/share/applications (this is a good place since this folder is likely empty or close to empty, so it is easy to figure out which desktop files are yours), then used the gui installer to add Firefox to the application launcher. I did the same with Thunderbird, and removed a couple of the pre-installed launchers.

The default install only creates 2 desktops, and I like 4. There is a nice gui configuration for Openbox, it allows changing the number of desktops to 4, but doesn't let you set wrapping, as in switching from desktop 1 to 2 to 3 to 4 to back to 1. To fix this, you need to edit the configuration file ~/.config/openbox/lxde-rc.xml. Find the keyboard bindings for "DesktopLeft" and "DesktopRight" and change the wrap element from "no" to "yes". You'll need to log out and back in for this to take effect, but prior to doing that, I want one more change.

In the past, I've always uninstalled Gnome's screensaver or KDE's screensaver and used xscreensaver. I've always used Ctrl-Alt-Delete to have xscreensaver lock the screen. To do that, edit lxde-rc.xml once again. There is already a keybinding setup that uses Ctrl-Alt-Delete, so I just replaced the command with "xscreensaver-command -lock". Now I log out and back in, and desktops wrap and xscreensaver locks.

There is probably a little more to configure, but the main things I want for usability are there.

I'm thinking seriously about uninstalling gnome altogether. I don't think I need it at all anymore.

Monday, July 20, 2009

Switched to Openbox

So apt-get told me I had a broken package, and recommended that I run apt-get with some parameters to clean things up. It said it would remove a bunch of packages, and the list looked okay to remove to me, mostly stuff that I didn't use anyway or I didn't know what was. Apparently, something in that list was essential, since Gnome disappeared. Hmm. A reboot left me at a command prompt. So I did "startx" and prayed, and did indeed at least get X to start.

I'd been wanting to try out Openbox anyway, so this seemed like a good time to do it. It turns out Openbox is probably the window manager I'd been looking for when I dumped KDE for Gnome. It is easy to install:

sudo apt-get install openbox

Add a line to your ~/.xinitrc file:
openbox-session

Then "startx" will start Openbox. Openbox is perhaps the most configurable window manager I've ever used. The downside is all the configuration is done by editing xml files by hand. For example, to get Open box to rotate from desktop 1 to 2 to 3 to 4 and back to 1, it was a simple matter of editing my ~/.config/openbox/rc.xml file to change <wrap>no</wrap> to <wrap>yes</wrap>, which was way easier than the scripts necessary to get Gnome to do the same thing.

There are a few things I'm missing that I haven't set up yet, but for the most part, I'm liking Openbox a lot.