Archive for the 'linux' Category

Flash Player 9 for Linux released : Quick install for Ubuntu Dapper

Adobe Flash Player 9 is finally out of beta ! No more feeling like a second class netizen on “flashy” sites !

Here’s how I installed it on Ubuntu Dapper (the package is for Debian Sarge, but seems to work fine):

Download flashplugin-nonfree.

Use right-click, “Save Link As …” and save it to \tmp.

$ cd /tmp

$ sudo dpkg -i flashplugin-nonfree_9.0.21.78.4~bpo1_i386.deb

(you’ll be prompted for your password, and once you provide it, the install should happen)

You can check if it worked by typing about:plugins into the URL box in Firefox. You should see something like “Shockwave Flash 9.0 d78″ on that page.

Now go view some F-F-F-Flash cartoons :) (I don’t think Homerstarrunner requires Flash 9, but it’s the only Flash site I use on any regular basis)

Changing "Illustration" to "Figure" in OpenOffice Writer

I’ve decided to try and use OpenOffice Writer properly .. like take advantage of some of its more powerful features rather than just using it as a text editor with formatting.

For drafting manuscripts of scientific papers, pictures/photos/illustrations etc are usually referred to as “Figures”, however when inserting a picture via “Insert -> Picture -> From File ..” the default behavior of OpenOffice is to use the caption “Illustration”. This will not do.

From the OpenOffice Writer Guide, Chapter 8 [pdf], here is how to get it to use “Figure” by default:

• Open the “Tools -> Options –> OpenOffice.org Writer—> AutoCaption” dialog box.

• Under “Add captions automatically when inserting section“, check
OpenOffice.org Writer Picture, and make sure its checkbox is ticked.

• Under the Category drop-down list, enter the name that you want added,
eg, Figure, in the place by overwriting any sequence name in the list (it will probably have “Illustration”, before you overwrite it.) I also like my Figure label bold, so I also selected “Strong Emphasis” from the “Character Style” dropdown box. Press OK to save the changes.

Now you can insert a Picture using “Insert -> Picture -> From File ..” and the label should be “Figure”, not “Illustration”. The picture comes in its own frame, and you can edit the figure legend directly in the document.

Hmmm … Latex is not looking so bad again ….

Amarok 1.4.4 on Ubuntu Dapper

A new version of Amarok, my favorite music player for Linux, has been released.

This version boasts numerous bug fixes, and an nice interface to the Magnatune music store. Magnatune is cool since the full length tracks are under a Creative Commons license and are free to listen to. If you decide to support an artist you enjoy, you can buy downloads and choose how much you wish to pay. The artist splits the profits 50:50 with Magnatune, and you get uncrippled MP3/FLAC/Ogg files, which can be re-downloaded at any time if you loose them somehow. Since Magnatune operates like an enlightened version of a traditional record label, meaning they only select “high quality” artists … they don’t push loads of dross from self promoting artists that suck like the old mp3.com (RIP) did. “Brad Sucks” is (non-exclusively) on the Magnatune label, but his music doesn’t suck.

Hopefully in the future Amarok will include some generic API to interface with other enlightened music stores and repositories of Creative Commons music, so that Magnatune doesn’t get accused of monopolising :). For instance, I’d like to be able to add say, ccMixter and maybe IUMA in addition to Magnatune. An open web services API for music stores would make this possible, and while I haven’t looked “under the hood” of the new Amarok-Magnatune browsing feature yet, I suspect this is what they have already created.

Anyway, there doesn’t seem to be a backported version of Amarok 1.4.4 in the Ubuntu / Kubuntu Dapper in the repositories (yet). There are some Edgy Eft packages, but I don’t want to upgrade to Edgy at the moment.

Instead, I’ve compiled my own and have made some deb packages, using the official deb source packages. I haven’t tested this version heavily yet, but it seems to work. I had to override one dependency, since it complained that the Dapper “Common Debian Build System” (cdbs package) was not recent enough …. hopefully this was a safe thing to do.

You can download my packaged versions here:

amarok_1.4.4-0ubuntu1_i386.deb (link fixed .. Thanks victor !!)

amarok-xine_1.4.4-0ubuntu1_i386.deb

amarok-engines_1.4.4-0ubuntu1_i386.deb

Install them by typing:

$ sudo dpkg -i amarok_1.4.4-0ubuntu1_i386.deb amarok-xine_1.4.4-0ubuntu1_i386.deb amarok-engines_1.4.4-0ubuntu1_i386.deb

Yah, I should probably GPG sign these and try to get them included in Dapper backports or something …. but no time to do the job properly at the moment.

Update - if you have trouble with some missing dependencies, this may help:

$ sudo apt-get install ruby python-qt3 kdelibs4c2a libifp4 libnjb5 libpq4 libqt3-mt libtunepimp3 libvisual-0.4-0 libxine-main1

Hopefully that catches most of the dependencies that are likely to be missing, particularly for those running Ubuntu Dapper and not Kubuntu Dapper.

Firefox 2.0 installation and tweaks

I guess you’ve heard … Firefox 2.0 is out.

I resisted running the earlier Firefox 2.0 release candidates, but now that the official 2.0 release is out, I thought I’d give it a go. In reality, there are no dramatically new features between the 1.5.x and 2.0 release, but I was more interested in the claim that 2.0 was faster and more stable than the (already pretty good) 1.5.x versions. And for the record, I’d say it is faster and more stable in my hands.

I thought I’d give a quick rundown of the installation and some tweaks, if anything for my own future reference.

Installation:
I’m running Ubuntu Dapper 6.06, and since Firefox 2.0 hasn’t been backported to the Ubuntu Dapper 6.06 repositories yet (and may never be), and I’m not prepared to upgrade to Edgy Eft 6.10 (yet), I had to find another option for getting my Firefox 2.0 goodness.

After backing up my ~/.mozilla directory ($ cp -r ~/.mozilla ~/.mozilla.1.5.0.7), I installed Swiftfox , a processor-type optimized build of Firefox (downloaded appropriate deb and ran $ sudo dpkg -i swiftfox_2.0-1_pentium-m.deb). After installing, ‘Swiftfox’ was added under ‘Internet’ in the Applications menu. As far as I can tell, apart from the compile time optimisations and changing the word ‘Firefox’ to ‘Swiftfox’ in a few places, there is no other difference to the vanilla Mozilla Firefox 2.0 releases.

So far, it’s been working nicely, but there were a few little steps to migrate my old Firefox 1.5.0.7 config and extensions to Swiftfox 2.0.

Rescuing disabled extensions:
Most of my Firefox configuration was carried over correctly, however a few extensions that have not (and may never be) updated for Firefox/Swiftfox 2.0 were automatically disabled.
The trick around this is to install the ‘Nightly Tester Tools‘ extension. Once you have restarted Swiftfox/Firefox, you can go to Tools->Add-ons and then right-click on any disabled Extension and select ‘Make compatible’. I’d suggest doing it one extension at a time, restarting and testing, since things can go stupid if an extension is truly not compatible.

Many extensions work fine, despite not being designed for anything higher than Firefox 1.5.x (eg NeedleSearch and SwitchProxy to name a few). However, not every extension behaved correctly when forced to run (eg. TabMixPlus), and so after having some strange behaviour, I re-disabled those. A lot of extensions tend to be fixed and updated a week or two after a major Firefox release, so there is hope that the broken ones will become available for Firefox 2.0 soon.

I also used this as an opportunity to disable or uninstall any extension I wasn’t using. I find it often makes Firefox run faster, use less memory, (leak less memory :P), and in a very small way it makes your browser more secure by not having lots of random unmaintained extensions hanging around.

Tweaks:
Here are a few things I like to tweak in a new Firefox installation, and some brand new options to tweak in Firefox/Swiftfox 2.0. (All these can be accessed by typing about:config in the address bar, and many were pinched from here).

Firefox 2.0 already restores all tabs and forms after a crash, but it can also be set to restore tabs back to their original state after a normal shutdown. This is about the only feature of the TabMixPlus extension that mattered to me … it’s great that it is now part of Firefox proper !

To enable auto-restore all the time, change:

browser.startup.page = 3

(this one can also be found under Edit->Preferences->Main->When Swiftfox starts->”Show my tabs and windows from last time”)

You can fit a few more visible tabs along the top by setting:

browser.tabs.tabMinWidth = 75

I hate those stupid close buttons on the tabs. I’m forever accidentally closing a tab unintentionally. Technically, it seems like putting the close button on the tab is actually better user interface design, but old habits die hard, so I put it back on the far right hand side in the style of Firefox 1.5.x with:

browser.tabs.closeButtons = 3

I got rid of the ‘Go’ button at the end of the url bar. I don’t need it, since there is a big, highly accessible ‘Go’ button on my keyboard already, labelled ‘Enter’.

browser.urlbar.hideGoButton = true

I also use some HTTP pipelining and rendering tweaks. Apparently pipelining can break some sites such as Myspace.com … but in the case of Myspace, how could you tell if the site was broken or not ?

network.http.pipelining = true
network.http.proxy.pipelining = true
network.http.pipelining.maxrequests = 8
(don’t set maxrequests higher, Firefox won’t allow more anyway since it adheres to the HTTP spec)
nglayout.initialpaint.delay = 0
(may need to experiment with this one)

I’m a cookie snob, so I disable third-party cookies (which doesn’t have a GUI configuration option in Firefox 2.0 like it did in 1.5.x … it’s gotta be some conspiracy):

network.cookie.cookieBehavior = 1

Finally, turn off link prefetching. This is a ‘feature’ whereby the browser follows links which authors have marked to be prefetched in the current page, potentially wasting your bandwidth and CPU time on the chance that you will click on one of the pages that gets “precached”. With it turned on, prefetched pages are likely to load much faster. Personally, I don’t trust that it won’t be abused by some page authors and I like to have more control of what my browser fetches. So, without going off into a paranoid rant … I turn it off.

network.prefetch-next = false

Well, that’s enough tweaking for today. I’ll leave the obligatory “Must have Firefox Extensions” post for another day.




Creative Commons Attribution 3.0 Unported
Creative Commons Attribution 3.0 Unported