Archive for the ‘Ubuntu’ Category

AppArmor Fun with Firefox 4 Daily Builds

So, here’s a problem I’m sure millions of computer users have.

The latest nightly Firefox builds from the Ubuntu Mozilla Daily Build PPA suddenly stopped working for me; every time I started with my usual profile (in my Encrypted Private Directory), it complained that Firefox was already running (it wasn’t). Running with a profile in my unencrypted home directory, in the usual place, seemed to work. For a while I though the profile was hosed, or the new Firefox build had a problem with the encryption.

Turns out the AppArmor profile has been updated to confine write access to the only default Firefox profile location ( ~/.mozilla/firefox-4.0 in this case), and a few other select directories (like the default downloads directory). Since my profile was outside that directory, AppArmor was preventing Firefox from writing to the profile. Updating the AppArmor profile (by editing /etc/apparmor.d/local/usr.bin.firefox-4.0) with the following fixed the problem.

owner @{HOME}/Profiles/** rwk,

Just in case someone else out there runs into a similar problem. There might be somebody.



Ubuntu’s Firefox 3.5 and Facebook Chat

Those of you using the official Firefox 3.5 packages for Ubuntu 9.04 have probably noticed that it’s actually labeled as “Shiretoko,” which was the code name while Firefox 3.1/3.5 was in development. This is done to avoid confusion with the default installation of Firefox 3.0. For several technical reasons, the Firefox 3.5 package does not replace 3.0, but is installed alongside it.

My wife noticed that her Facebook chat popped up in a separate window when using her browser, which is very annoying (especially because she’s an Ubuntu Netbook Remix user, where all windows are maximized). Facebook claimed that she was using “an old browser,” and ironically chided her to upgrade.

Ubuntu’s Firefox 3.5 User Agent string is this:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090701 Ubuntu/9.04 (jaunty) Shiretoko/3.5

My guess is that Facebook is using simple user-agent sniffing, and since it sees “Shiretoko” and not “ Firefox,” gets confused.

So to fix this, we’ll enlist the help of the User Agent Switcher extension and use it to tell Facebook you’re using the “real” Firefox 3.5. Here are the steps:

  1. Download and install the User Agent Switcher if you haven’t already.
  2. After Shiretoko restarts, go to Tools->Add-Ons-. Select “Preferences” for the User Agent Switcher.
  3. Click the “New” button to create a new User Agent string.
  4. Put “Fake Official Firefox 3.5,” or something else that makes sense to you in the “Description” field. The other fields are automagically populated with the “ default” user agent, which makes our life easier.
  5. At the very end of the “User Agent” field, replace “Shiretoko” with “Firefox” and click OK.
  6. Go to Tools->Default User Agent and then select “Fake Official Firefox 3.5”.
  7. Go to Facebook.

You can use this trick for any other site out there that claims you’re not using an up-to-date or unsupported browser.

Upgrading to Ubuntu 8.04

There have been many blog posts on the Ubuntu Planet about the ease of upgrading to the brand new 8.04 version. Unfortunately, my experience with my Dell Inspiron 1420N was not flawless. Of course, the three big problems were caused by software that was not fully supported; one problematic package was an esoteric bit of software from the community-supported “universe,” the second was caused by a Dell-provided driver for a softmodem I never use, and the third was caused by a proprietary program that hasn’t kept up with the changes to the Linux kernel. There was also a minor problem with the Wifi light that is easily fixed by installing an additional package. Most people, who stick to Ubuntu-supported software (the “main” component), or well-known stuff from universe, will probably have an easier time. I did, however, get everything working with a little bit of elbow grease, the details of which follow for anyone who finds themselves in the same boat.

The first and most serious problem: pam-encfs, as shipped in Hardy, does not work, and will mess up your PAM configuration. This will prevent you from logging in, and in fact, will lock you out of your system in the middle of the upgrade if your screen locks after a period of inactivity (as happened to me). To gain control of things, I had to boot into recovery mode, run “dpkg –-configure -a”, and then “apt-get dist-upgrade” to make sure everything was installed correctly. Even then, I still could not log in. From recovery mode, looking in /var/log/auth.log revealed the following messages:

Apr 22 21:10:18 pigwidgeon gdm[5577]: PAM unable to dlopen(/lib/security/
Apr 22 21:10:18 pigwidgeon gdm[5577]: PAM [error: /lib/security/
    undefined symbol: __stack_chk_fail_local]
Apr 22 21:10:18 pigwidgeon gdm[5577]: PAM adding faulty module:

After disabling pam-encfs in my PAM configuration, I could log in normally, but my encrypted directories weren’t mounted automatically. Googling around turned up bug 20573 in Launchpad, so I’m not the only one who ran into this. Luckily, there’s a patch, and I’ve built a usable package that will work until the official fix gets into Ubuntu, which can be obtained from my Personal Package Archive on Launchpad.

If you encrypt your entire home directory, something like the following might work (I haven’t tried it myself, so YMMV):

  1. Do the upgrade, make sure your screen doesn’t lock, and don’t do anything that would require authentication.
  2. Reboot when it’s done, but make sure you reboot into “recovery mode,” and drop into a root shell.
  3. Add the my Personal Package Archive on Launchpad to your Apt sources.
  4. Do the usual “apt-get update && apt-get upgrade” thing, make sure libpam-encfs gets upgraded.
  5. Exit the root shell, continue bootup as normal.

It appears that libpam-encfs is not a very widely used package, so hopefully the number of people who will be bitten by this is small.

The second problem: No Sound. This always seems to be a problem with the 1420N (I initially had no sound on the Feisty to Gusty upgrade), and it has the same cause: the softmodem driver. But I didn’t figure that out until an entry on the Dell Linux Wiki about it appeared soon after the official release. After following those instructions to remove the driver, the problem was solved. I’m sure that in a few weeks the Dell folks will have a new, working driver for the softmodem, but since I never use it, I’m not too worried about it.

Third problem: VMware doesn’t work. There are two issues here; the first is that VMware Server 1.0.x is incompatible with the 2.6.24 kernel series, and the second is a conflict with a system library that VMware overrides. The kernel issue was solved by uninstalling the vmware-server and vmware-kernel-modules packages, installing the tar.gz version of VMware Server 1.0.5, and then running the latest vmware-any-any package (download here). The library conflict, which prevented even the server console from running, manifested itself with the following error messages on startup: version `GCC_3.4' not found (required by /usr/lib/
   /usr/local/lib/vmware/lib/ version `GCC_4.2.0'
   not found (required by /usr/lib/
   /usr/local/lib/vmware/lib/ version `GCC_3.4'
   not found (required by /usr/lib/

This was caused by an incompatible version of the library that’s shipped with VMware. Removing the file /usr/local/lib/vmware/lib/ forced VMware to use the Ubuntu-supplied version of the library, and allowed VMware to start normally.

The fourth problem, which is very minor, was that the WiFi light on the front panel no longer works. This is a consequence of moving to the next-generation driver for the Intel wifi chip. To solve it, simply install the “linux-backports-modules-2.6.24-16-generic” package.

Once those problems were out of the way, I was able to enjoy the new release, which is full of the incremental improvements I’ve come to expect from Ubuntu every six months – including an integrated version of the new Firefox 3, which is worth it for the JavaScript performance improvement alone.

Life with the Dell Inspiron 1420n

Soon after it was unveiled, I ordered the 5.5 pound Dell Inspiron 1420n pre-installed with Ubuntu. It took almost three weeks to get here, probably owing to Dell’s recent supply chain problems, but luckily there were no further delays. I had heard some real horror stories about waiting much longer, and that would have really soured me on Dell, despite their new partnership with Ubuntu.

This is my fourth laptop that runs Linux, and as you’d expect, it was by far the best experience. There were some hiccups here and there, but in general things just work. That’s a very nice change from what I’ve become used to (especially with my previous HP laptop). Although I’ve enjoyed messing around to get things to work in the past, it’s not as much fun as it used to be, and my time for tinkering is much more limited these days.

Here is what I’ve noticed so far:

  • Compared to the behemoth HP, this thing is pretty darn light. Not as light as those dainty PowerBooks, but I believe that taking this laptop through an airport will be a much nicer experience.
  • Five hours of battery life. No, really.
  • The wireless would have worked out of the box had I remembered to add the new laptop to my wireless access point’s MAC filter list. Once I fixed that, it was smooth sailing. NetworkManager is really sweet when it works.
  • It took some coaxing to get the touchpad scrolling to work properly. Fortunately, it was well-documented.
  • During the first week, I had a few problems coming out of suspend where I had to forcibly power down. But I haven’t had any since, and I haven’t had any crashes with Hibernation.
  • The volume control buttons just work. As do the stop/play/forward/backward buttons, at least with Rhythmbox and Totem.
  • After resuming, the volume panel applet will crash. Fortunately, a little popup asks if you’d like to restart it when this happens. A bit annoying, but definitely manageable.
  • If you have multiple users’ sessions running at once and you suspend/hibernate, the touchpad may not work for particular users, or for any users. I haven’t figured out the exact behavior yet.

So far, so good. I’m very happy with this laptop.  Update: Starry Hope Productions  looked at the 1420n here; they’ve exercised a lot more things than I have (3D video, for example), but the review is mostly positive.  Fortunately, I have had a different experience with hibernate and suspend.

Just What I Was Looking For

Ever since I switched to Ubuntu, I’ve been looking for a “Powered by Ubuntu” sticker to put on my computers, much like the “Powered by Red Hat” stickers that came in the old Red Hat boxed sets. Through the wonders of the internet I was able to find a site in Germany that sold them. I was more than willing to fork over the €4.90 to buy them; unfortunately, I couldn’t get the site to work, and not knowing German certainly made things more difficult. The free ubuntu CD’s come with a set of Ubuntu stickers, but they’re way too big for my purposes. I want something to counter the “Designed for Windows XP” things that are all over standard PC’s.

On the Ubuntu Fridge today, I found a link to a company called System 76 that will send you “Powered by Ubuntu” stickers for the cost of a self-addressed stamped envelope. Sweet!

As a bonus, I know where I’m buying my next non-used laptop. Of course, that’s probably why System 76 is doing this.