How to add Awn main menu applet in AWN 0.3.2

As soon as I read about the release of Avant Window Navigator 0.3.2 on tuxmachines, I decided to install it on my Ubuntu 8.10 from the Awn Core PPA repos. The latest Awn 0.3.2 has seen a few applets been removed, one of them being the good old AWN main menu. This is a quick guide to add the AWN main menu applet in AWN 0.3.2.

1. Download awn-extras-applets-trunk_0.3.1~bzr1072-intrepid1-1_i386.deb. This is a debian package from the PPA awn-testing repos of a previous version which has the relevant AWN main menu files.

2. Open the debian file with any archive manager. It will have a file named data.tar.gz or something. Open that file and browse to "/./usr/lib/awn/applets/" directory where you will find "main-menu" directory. Extract the "main-menu" directory to "/usr/lib/awn/applets/".

3. Almost done! All you need to do now is create a .desktop file.
sudo gedit /usr/share/avant-window-navigator/applets/awnmenu.desktop

Paste the following in the file and save it.

[Desktop Entry]
Name=Awn Main Menu
Comment=Avant's System Menu

That's it !! You are done !!! Just restart AWN and add the applet from the list.

Reduce login time in Ubuntu/Linux

It has been well-documented that Ubuntu’s readahead system during boot significantly cuts down on boot time by reducing hard disk seeking via precaching commonly-used files during bootup. This feature, however, only lasts up to the GDM screen.

Recently I found out that this use of readahead can be further extended to improve the login time - the time it takes to reach the desktop after the GDM login screen.

!!! You probably shouldn’t try this unless you have more than 512MB RAM.!!!

Part 1 : Monitor login sequence

First, we need to ask readahead to monitor a login sequence and make note of all the files read during this period. The idea obviously is to begin reading these files as soon as you reach the GDM screen.

Let's store the readahead list somewhere.
mkdir ~/.readahead

Now, log out(CTRL+ALT+BACKSPACE), and press CTRL+ALT+F1 to log into a terminal.(Do not login from the GDM screen) Start the profiler now.

sudo readahead-watch -o ~/.readahead/gnome.root /

This will grind the disk for a while (up to a few minutes, so have patience and dont think you are screwed and try to abort it :) then it will return you to a command prompt. The profiler is now in the background watching all actions. Now, without logging out, go to your GDM prompt (CTRL+ALT+F7 ) and log in normally.

after you are fully logged in, press CTRL+ALT+F1 to go back to your terminal, then run:

sudo killall readahead-watch
sudo chown neo:neo ~/.readahead -R

Replace neo:neo with your user and group name. Now, we need to go prune this list a bit. Especially if you have large files on your desktop (like a 1GB AVI), the login sequence may touch it, causing readahead to think it should load the whole thing into memory! In a terminal, run:

cat ~/.readahead/gnome.root | xargs -i ls -lk {} | sort -rn -k +5 | less > readahead_list

This will output all the files readahead wants to cache, sorted by largest file first into the readahead_list file. Open the readahead_list file using your favorite editor. The 5th column (before date) is the size of the file in KB. Make sure there’s nothing glaringly large. If it’s bigger than 10,000KB or so, it’s probably not worth preloading. Remove such unwanted files from the preload list by opening ~/.readahead/gnome.root and deleting its line.

gedit ~/.readahead/gnome.root

Part 2 : Hooking this into the login sequence

Next, we need to tell Ubuntu to do this readahead on every login. There are many ways one can do this. Let's use /etc/X11/Xsession.d.

Create a file called /etc/X11/Xsession.d/00readahead.

sudo gedit /etc/X11/Xsession.d/00readahead

Put the following in the file :

for list in ~/.readahead/*; do
readahead-list $list &


Save the file. Now you can reboot to test if this works.

Part 3 : Hook into boot sequence

Often times, we don’t log in immediately when the prompt comes up. It makes sense to cache a login as a part of bootup. Open up /etc/rc.local in your favorite text editor, and before the exit 0
statement, add:

Note : Replace neo in the first line by your username.

for list in /home/neo/.readahead/*; do
readahead-list $list

Now, reboot, and wait for all disk activity to stop before logging in. You should feel really nice :)

Undoing This :

Not much to do! Just delete ~./readahead directory, /etc/X11/Xsession.d/00readahead and remove the added lines from /etc/rc.local.

This improved my login time drastically. Hopefully it will improve your's as well.

Linux : Convert Real Media Files to mp3/ogg

The first thing you want to do when converting audio files is to convert them into .wav files. Mplayer can dump almost anything that it plays (and it can play almost anything) to raw .wav format.

mplayer -quiet -vo null -vc dummy -ao:pcmheader:file=".wav file" "inputfile"

To mp3 :

Lame is a command-line tool which can convert .wav to .mp3

lame input.wav output.mp3

To ogg :

oggnec input.wav

That's it!!! No need to search over net for free tools. No patch, registration key blah blah ... Yo LINUX !!!

Antix Mepis!!!

Once again its been a long time since my last post. I had almost forgotten that I had a blog of my own. I guess I had nothing much to share.

I think a lot of people who have recently bought new PCs or laptops have quite an old machine at their homes. Atleast I have, and it's a real mess. Running windows for so long has taken its toll too :) Every time I return home for holz, I have to deal with plenty of viruses and spywares.

I really got fed up with all this this time round and so decided to install the beautiful linux on my 800MHz P3 with 128MB RAM. Yeah, it's really old :) I grabbed my gutsy CD at once and tried to boot from the live CD, forgetting that it requires a minimum of 256 MB of RAM. Also, it came to me that my system wont be able to run Gutsy or for that matter any commonly used distro these days. So I searched for distros that could run on my PC, preferentially a debian based one coz i have got quite used to Ubuntu now. And thus I stumbled upon Antix Mepis.

Antix is a fast, lightweight and easy to install linux live CD distribution based on MEPIS. It almost succeeds in providing a fully functional and flexible operating system for both newbies as well as experienced users of linux. It runs even on 64 MB P2 systems. I downloaded the 300MB iso image and installed right away. And it was worth it. It's as if my old PC has come back to life!!! With all device drivers and codecs(!) preloaded, it has very less to complain about. And with linux comes the power of customization, which I found the most useful.

And now, having installed rhythmbox and a few more utilities, even my mom doesnt really face any problem operating it. Hail LINUX and dont throw away your old machines, use ANTIX instead :)

How to edit Grub boot order

     Phewwww!!! Finally, some relief from tests and tuts... It's been a long time since my last post. Life has been just too busy all this time ... painfully busy.
     A lot of people have recently asked me about changing the GRUB boot order, having installed linux quite enthusiastically. So here's a HOW-TO for the same :

sudo gedit /boot/grub/menu.lst

      Now you can customize and configure your GRUB boot loader from here. The first option you will find is 'default'. The default value for this option is 0.

default 0

      You just need to change this 0 to 3/4/5 according to the OS you want to boot by default. Generally, 0 will be for the linux kernel, 1 for recovery mode and 2 for the memory testing mode. Changing this default value is all you have to do. You can also enable colored GRUB menu by uncommenting the 'color' option. For newbies, uncommenting means deleting the '#' from the line

#color cyan/blue white/blue

      I hope that helps you BD !!! :)

Google hack

I am quite sure that almost all of us have been atleast once disappointed by Google while searching for music files. Of course, this I speak of those who don't use bittorrent clients. Most of the search results lure us to the sites which end up asking us for $$$ to download the song. So, here's a nice Google search hack, for all of you , which has till date not disappointed me.
Suppose you have to download a song, say 'Strangers in the night'. So, instead of googling this song, google this :
intitle:"index.of" (mp3)

Notice the '.' in between the words of the song. You can also use '_' in place of '.'.
The search results that Google shows are the directories of various sites which actually have this file in mp3 format. Replacing mp3 by mpg, avi, etc .. should give you results for videos.
Bitsians, you don't need to remember this little hack, because I have made a simple webpage wherein you just need to enter the song name normally, without the '.' or '_'. You can access the page at .

Axel : Download accelerator for linux

Hi guys, the title must have got you really excited if you have been accustomed to downloading in windows using IDM or DAP or any other accelerator. I myself had been searching for such a tool for quite some time now and I was relieved to find Axel. It's a command line downloading tool. And it works!!!
The steps involved are pretty simple. Just another run-of-the-mill installation using yum/apt-get.

Installation : For Fedora users

sudo yum install axel

For Ubuntu users
sudo apt-get install axel

That's it! The installation is done.

Configuring : 1. sudo gedit /etc/axelrc
2. In this file, look out for 'http_proxy='. To set the proxy first uncomment the line by deleting the '#' before http_proxy. Then set the proxy as
eg. http_proxy=

To download any file, use the command
axel 'fileURL' (without the '' :)
eg. axel
(I had been trying to download this file but everytime I could download only around 40 kb of the total size. Axel downloaded the whole 704 kb just about a couple of minutes using only one connection as the server does not support multiple connections I suppose.)

You can manually set the number of connections to open :
axel -n 16 'fileURL'
Randomly increasing the number of connections wont help. There's a limit upto which the speed can increase, depending on the internet connection you are using.

The file is downloaded in the directory from which you enter the command.

I hope you wont come across any problem while installing and using Axel.
There's another little ultility which integrates apt-get with axel. Keep checking the blog to know more about it.