Wednesday, March 23, 2011

Installing Firefox 4 and Making it Usable

I installed Firefox 4 today. It's not in Ubuntu's repository yet, but you can get it from a mozilla repository:


$ sudo add-apt-repository ppa:mozillateam/firefox-stable
$ sudo apt-get update
$ sudo apt-get install firefox


Hurray!

browser.tabs.tabMinWidth has been removed in favor of making people write a userChrome.css file. Create userChrome.css in ~/.mozilla/firefox/{profilename}/chrome. ({profilename} is a random string followed by a dot and the visible profile name. If you have multiple profiles, make sure you're inside the right one.) There should already be a userChrome-example.css file in there. Your userChrome.css file should look like this:


@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

.tabbrowser-tab:not([pinned]) {
  min-width: 40px !important;
  max-width: 250px !important;
}


(If the @namespace part gets wrapped, make sure it's a single line.)

Set min-width and max-width to whatever you want. The defaults are 140px and 250px, respectively. Just adding that breaks tab resizing when closing windows, though, unless you disable animation. Open the magic about:config URL, find browser.tabs.animate, and set it to false.

Restart firefox for changes to take effect.

Tuesday, March 8, 2011

Ripping CDs (from the command-line)

I don't use Gnome or KDE, so I didn't bother with any of those fancy GUI multimedia apps. It's just as easy from the command-line with abcde (A Better CD Encoder):
$ sudo aptitude install abcde id3v2 lame
[insert CD]
$ abcde -o mp3
[wait, watch cute ASCII progress bars]
It doesn't format the filenames in the particular way I like, but that's configurable with a shell function you can define in ~/abcde.conf. Since this was a one-off, I just used mved to clean things up manually.

[Edit, 2011-09-03: My abcde.conf specifies a mungeheader() that works pretty well for me.]