Sunday, September 23, 2007

Speed Up and Integrate Firefox

Don't get me wrong, Kubuntu comes with a very capable web browser in Konqueror -- except that Konqueror isn't compatible with everything. Although I love Konq's integration with the rest of KDE, it doesn't work well with Facebook or my University's website or Windows Live Mail (which I still use, since I've had that email since grade 7 and everyone knows it by now. Also it's a good email to toss at the various companies that want to know what mine is). So I've switched to Firefox.

Speed Up Firefox

Taken from this website, this section is all about getting firefox to load webpages faster. First, type "about: config" in the location bar.

  1. Search for network.http.pipelining, and change its' value to true

  2. Search for network.http.pipelining.maxrequests, and change its' value to 8

  3. Search for network.http.proxy.pipelining and change its' value to true

  4. Search for network.dns.disableIPv6 and change its' value to true

  5. Search for plugin.expose_full_path and change its' value to true

  6. Right click anywhere in the list, select new, then integer. Create a value called nglayout.initialpaint.delay and set its' value to 0

  7. Right click anywhere in the list, select new, then integer. Create a value called content.notify.backoffcount and set its' value to 5

  8. Right click anywhere in the list, select new, then integer. Create a value called ui.submenuDelay and set its' value to 0

  9. Right click anywhere in the list, select new, then integer. Create a value called browser.cache.memory.capacity and set its' value to the maximum memory you wish Firefox to use at a given time. 16MB is a good default, so enter 16384

  10. Search for layout.spellcheckDefault, and set its' value to 2. Now Firefox will check spelling on both input fields and text areas

Integrate Firefox with KDE

Now that we've got Firefox loading webpages faster, it would be nice if it started to use KDE programs and dialogs rather than the default Gnome ones or embedded players. So let's teach the old fox some new tricks.

  1. Go here and download the kgtk deb. Right-click the file, and install it. Now, open up the KDE menu editor (select "run command" from the menu and type in kmenuedit) and find the entry for Firefox. Change the command value to read "kgtk-wrapper firefox %u", save and exit. Now Firefox will open files in the usual KDE style.

  2. Open up any webpage in Firefox, go to File, and tell Firefox to print the page using "PostScript/default" -- it should be the default if you haven't installed any printers yet. Now type "about:config" into the location bar again, and search for print.printer_PostScript/default.print_command. Change its' value to read kprinter. Now, right click anywhere in the list, select new and boolean. Create a value called print.always_print_silent and set its' value to true. Finally, right click anywhere in the list, select new and boolean. Create a value called print.postscript.cups.enabled and set its' value to false. There! Now Firefox will use the normal KDE dialog to print files

  3. Open up about:config. Search for network.protocol-handler.external.mailto and make sure its' set to true. Now, right click anywhere in the list, select new and string. Create a value called and set its' value to kmail. Firefox will now open e-mail files in kmail.

  4. Open up adept, and install the kget program. Now, download the Flashgot extension. Restart Firefox, and configure Flashgot to use kget as a download manager. (Personally, I like Firefox's native download manager, so I don't use this tip. But if you wanted the complete KDE Firefox experience...)

  5. Open up about:config. Search for and set its' value to false. Now, go to the Edit menu, select preference, then content and then click the manage button next to file types. Change all the values dealing with audio files to use "/usr/bin/amarok" to open them. Now when you download an mp3 Firefox will automatically play it with KDEs' premier music player.

  6. Now that we've got Firefox all KDEified, we may as well make it our default browser. Open up System Settings and select default applications. Select Webbrowser and set it to open Firefox in the following browser: kgtk-wrapper firefox. Apply the settings and you're done!
There! Now your speeded up Firefox integrates into KDE almost as well as Konqueror, while allowing you to maintain compatibility with just about every site on the web.

Saturday, September 22, 2007

Speed Up Amarok Collection

Whereas my last two posts were compiled from several different sources, this one was ripped off wholesale from this fellows' blog. I reproduce it here largely for my own convenience.

First, install MySQL:
sudo aptitude install mysql-server mysql-client
. Next, give yourself a MySQL password (replacing the capitalized work PASSWORD with a password of your own invention):
mysqladmin -u root password PASSWORD
Finally, create the database for Amarok (once again substituting the password you chose instead of PASSWORD).
mysql -p -u root
USE mysql;
GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD';
Fire up Amarok, choose settings, configure Amarok, Collection. Use the following settings:

Database: amarok
Port: 3306
Username: amarok
Password: Your Password

Now Amarok's collection should be much speedier.

Get Screenlets working with Kubuntu

Right, well, you've managed to get yourself a nice composited environment to play with. One of the coolest features of this is the "widget layer", which basically functions like the Mac OSX Dashboard. Strictly speaking, any program could be a widget, provided you define it as such in the settings. However, only screenlets are designed to be displayed on the widget layer, and I ran into problems when I tried to use superkaramba widgets with it.

Install the Screenlets Engine

So, our first order of business is to install Screenlets. Open up your apt sources list as root:
kdesu kwrite /etc/apt/sources.list
Now add the following to it, save and close the file:
deb feisty screenlets
Next update your list and install the screenlets:
sudo aptitude update
sudo aptitude install screenlets python-gnome2-desktop
Now, open the compiz settings manager, and select the window rules plugin. Add "" to the widget line. Your screenlets should be working now. Test them out by opening the screenlets manager. Simply select one of the default screenlets to run and click the Launch button to start them. The screenlets can then be seen by pressing F9.

Install individual screenlet widgets

Widgets can be downloaded from here. To install them, simply extract them and add them to the /home/[username]/.screenlets folder (if the folder doesn't exist just create it).

Autostarting Screenlets

In the screenlets manager there's an option for autostarting them, but it doesn't work on KDE without some work. First, make the folder /home/[username]/.config/autostart. Now, in the screenlets manager, select the screenlets you want to load and tick off "automatically start on login" (it's in the bottom left). For each one, a file ending in .desktop will be created in the autostart folder you just made. Move each one to KDE's autostart folder which is /home/[username]/.kde/Autostart.

Create a text file named "" in KDE's autostart folder. Add the following to the file and then save:
#! /bin/bash
Now right click the file, select properties, then click on the permissions tab. Set the file to executable, and hit ok. Finally, add the line "Type=Application" all the various .desktop files you've transfered over.

That's it! Now your screenlets will load automatically the next time you sign in.

Friday, September 7, 2007

Integrate Compiz Fusion with Kubuntu

I keep a private list of all the changes I make to my system, so that if I have to reinstall I can look at it and remember how I did things. It seems to me that it makes much more sense to keep this list online, so that maybe someone else can see it and benefit.

So, you've figured out that your graphics card can run compiz fusion (beyond the scope of this article), and you've got it installed (you can find a guide for that on Feisty here.) But when you run it on Kubuntu, the system automatically loads the default window manager, kwin. So when you start Compiz Fusion, there's a brief flash where the wallpaper goes black -- which is ugly. Besides, loading kwin when you don't intend to use it is a waste of resources and time. So let's get Kubuntu to load Fusion when you log in, instead of kwin.

First, open up a terminal and type:
kdesu kwrite /usr/bin/

Now, what you have to put in here will vary by your video card manufacturer. Choose the correct one, enter the following, and save:

compiz --replace --indirect-rendering --sm-disable ccp &
sleep 5
emerald --replace &

LIBGL_ALWAYS_INDIRECT=1 compiz --replace --indirect-rendering --sm-disable ccp &
sleep 5
emerald --replace &

INTEL_BATCH=1 LIBGL_ALWAYS_INDIRECT=1 compiz --replace --indirect-rendering --force-aiglx --sm-disable ccp &
sleep 5
emerald --replace &

Now make it executable:
sudo chmod 755 /usr/bin/
Ok, now check to see that it works. At a terminal type:
And see if Fusion loads as you want it to. If it does, great, onto the next step. Open the file:
kdesu kwrite ~/.bashrc
Now add the line:
Save, and you're done! Log out and then back in, and Compiz Fusion should automatically be loaded as your window manager.