Saturday, July 28, 2007

Making Amarok start really fast in Gnome (Ubuntu)

One of the things that striked me most when I started using linux was Amarok. I like very much Rhythmbox as an application to play music, but Amarok is simply amazing. In Ubuntu 7.04 that I use (Gnome DE), amarok starts usually for about 10-15 seconds, which is VERY much for me. Luckily, this startup time may be shortened to 1-2 seconds. Here comes the good old "sleep script", that I used to launch conky with (a bit modified).
1.
#!/bin/bash
sleep 5 &&
kdeinit &
exit

[This loads the libraries of kde (which are needed to start amarok) in the memory at the time when the system starts; however, it does not increase the login-startup time, cause it sleeps the process (at least by me). If it DOES increase it, then a bigger setting should be applied for the sleeping part - "sleep 10" or 15 or whatever.]

2. Then, this script goes saved into a text file (for instance as ~/.kdelaunch), then a terminal is being opened and the following command is being issued:
chmod +x ~/.kdelaunch

which makes the file executable.

3. Afterwards, one has to go to System->Administration->Sessions (or whereever the startup of programs is; this part is not in English at my system) and add this as a new launcher (give it a name and in the place for a command type: ~/.kdelaunch).

And that's it all about; now Amarok would start for about 1 second on my system. Hooray! Btw, this could be used to increase the startup time of other kde applications in gnome as well (kopete, Kplayer, whatsoever).

2 comments:

Anonymous said...

Thanks for the info. Btw. you can drop the sudo in "sudo chmod ..."

Adrian said...

Thanks for your kind comment; fixed now.

Categories

code (15) fun (2) linux (31) miscellaneous (9) music (8)

About me

I'm Adrian and this is my blog. Here I usually write about technical stuff (mostly about Linux).
Copyright: BY-NC_SA, Author: aeter