Monday, November 8, 2010

Hacking Jolicloud to run a different window manager


Jolicloud is an excellent OS for netbooks. It sits on top of an Ubuntu base system, and the devs over there have really done a great job making it very user and hardware friendly. The folks at Ubuntu have spent a lot of time on the netbook remix version of their quickly growing operating system. However, it has been my experience that Ubuntu runs very bloated and slow on my humble Acer netbook. Jolicloud is highly optimized and carefully tweaked to get the most out of your netbook hardware. It is very good on the battery, it supports almost all netbook wireless systems, includes a kernel that is highly optimized for portable devices, and pretty much everything installs easily, is configured, and just works out of the box. This makes it great, especially for those who want more out of their system than their current heavy Windows installation, and are rather new to Linux.

However....

As much as i like the performance i get from Jolicloud, and how well it works with my hardware, i don't really care much for the user interface. I would rather run a lightweight window manager like openbox or awesome. The Jolicloud login manager does not give any choices to select a desktop session that isn't the one packaged with Jolicloud. So what to do?
Hack that sucker !

First, head on over to Jolicloud.com The current stable version is 1.0, but i used the development or 'testing' version 1.1 due to be released later this month. I have had no problems with it, and it has run very stable. You can get the dev version here. Follow the instructions on the site to install Jolicloud on your computer. After a normal install, you are ready to tinker.

After booting into the Jolicloud desktop, hit Alt-F1 to launch a terminal. Update the package manager by typing
sudo apt-get update

It will ask for your super user password ( the one you created when you installed the OS).

Then, download the window manager you wish. I chose Awesome. It is very light, and takes up very little screen area, leaving most of the precious screen to the applications. So for me, it was
apt-get install awesome

Jolicloud uses the SLIM login manager. You have to modify it's configuration file so it will allow a different WM. Also, you will need to disable the jolicloud-daemon.

open /etc/slim.conf
you can use your favorite text editor here. I use vim, but gedit is popular and comes with Jolicloud

sudo gedit /etc/slim.conf

uncomment (remove the '#' at the beginning of ) the line that that reads
login_cmd exec /bin/sh - ~/.xinitrc %session

and comment the line below it that reads
login_cmd exec /bin/bash -login /etc/X11/xsession %session

there is another line that reads
sessions default
change this to reflect what window managers you want to run
for example, mine reads
sessions awesome, default

Now close the text editor, saving your changes, and create a file in your home directory called .xinitrc ( remember the dot)
you can do this by typing this in a terminal
gedit /home/your_user_name/.xinitrc

Now add a line to execute your window manager.
exec awesome

You can elect to add more to your .xinitrc file so that other programs can be started when the WM loads. For example, mine looks like this...
exec awesome &
nitrogen --restore &
# that line sets my desktop wallpaper to the last one I had selected with the image viewer, nitrogen.
setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_lit:scrroll us,ru -variant ",phonetic"
# that line allows me to switch between the US/English and Russian/Phonetic keyboard layouts.

remember the '&' line at the end of each line in .xinitrc except the final line.





Now we are going to disable jolicloud from taking over by removing execute permissions to the files.
sudo chmod a-x /usr/bin/jolicloud-launcher
sudo chmod a-x /usr/bin/X11/jolicloud-daemon

Next time you log in, you shoud be in the window manager that you chose.

The screenshot at the top of the page shows what my desktop looks like.
It runs in about 100-140 MB RAM, where Jolicloud runs in about 230-260, and Ubuntu netbook remix runs in almost 330 MB.

If you have problems, let me know. I am very satisfied with the system i have installed now.

3 comments:

  1. I can't get this to work with Joli OS 1.2. There is no /etc/slim.conf file. Did something change in 1.2?

    ReplyDelete
  2. Yeah, what LordZardeck said. Quite curious.

    ReplyDelete
  3. I've changed the slim.confbackup file and something changed indeed, but didn't work :( looking for working how to :)

    ReplyDelete