Archive for the ‘Linux’ Category.

SimplyMEPIS on Dell Inspiron 5000e

My Dell Inspiron 5000e was the first computer I bought after I moved to California in 2000. It was pretty near the top of the line laptop because I wanted a desktop replacement, and even though it was a refurbished system it cost around $3,000. It was a great computer at the time, although it overheated too easily (probably why it was refurbished in the first place), requiring an external fan or other auxiliary cooling methods when working for extended periods of time in normal room temperatures. However, it is about 10 years old technology so I am finally getting rid of it.

Costco has has a laptop recycling deal with Gazelle, and it seems Gazelle would pay about $20 for the laptop with Windows Me on it. Unfortunately it does not seem like they would pay for any of the extra stuff that I’d like to part with: extra battery, Windows 2000 Professional upgrade, a second Orinoco wireless PCMCIA card, PCMCIA Firewire card, PCMCIA Ethernet card and PCMCIA modem card, along with an assorted set of cables, other software and nylon carrying case. Everything in about perfect condition. Incidentally, if anyone wants any of that, email me an offer.

While preparing to get rid of the laptop I wanted to see how a modern Linux distro runs on it. I first tried Xubuntu 9.04 but the Live CD only boots about 10% of the way, same with Ubuntu 8.04. I did not want to fight too much with it, so I decided to try SimplyMEPIS 8.0.10 instead, because I have read good reviews about Mepis. While it first did not have any better luck, I figured out the problem was that it did not detect the right display resolution. Forcing that by adding xres=1400×1050 to boot options fixed it, and I had no other problems installing it.

I was surprised and disappointed that I have more problems running Linux on a 10 year old laptop compared to last year’s model. Suspend and hibernate don’t work, plugging in PS/2 mouse disables touchpad until reboot, and wireless does not connect automatically after reboot (although the latter could be an issue with KDE). I am pretty sure most if all problems could be worked around, but when things just work with later hardware it really is a disappointment. I used to run Redhat 8 on it, but can’t remember if it had any of those problems. I am also pretty sure setting that up required some more work to get the display right.

SimplyMEPIS seemed fine, although I was somewhat lost due to unfamiliar UI. That could be due to SimplyMEPIS using KDE, but since I don’t have much experience with KDE it is hard to tell. The UI was slightly sluggish (although not too annoying), so if I were forced to use this laptop again, I would probably look for a more lightweight solution than KDE or Gnome.

I did a full writeup too in the Linux-on-laptop style: SimplyMEPIS 8.0.10 Linux on Dell Inspiron 5000e laptop

Recovering from Empty /etc/passwd

At work I have an old Dell desktop running SLES 9 (among other systems I manage). I inherited the system, and it was configured to mount home directories with help of LDAP, a process that I am not familiar with. It also runs some legacy systems I do not feel like migrating to newer systems yet.

Recently the LDAP information changed, so I needed to find out how to update this information. I found the settings in YaST, and everything seemed to be functioning with the new settings. That is, until I tried to become root. I got informed that there is no such user. “That is weird,” I thought, “I don’t think I’ve ever seen this kind of error with a Linux box”. After some more experimenting it became clear that updating LDAP had somehow caused all local users to disappear. /etc/passwd was empty!

As luck would have it, I found several backups of /etc/passwd, one even made by YaST itself when I updated the LDAP information. But this file was only accessible by root, which I could not become! Ubuntu has a way to boot into a root prompt, but I could not see how to do that with the SLES 9 boot prompt.

If I had a system rescue CD or Knoppix or something similar I would have tried that next, but it seems the recent office move displaced a number of our CDs so that was not immediately available either. However, I found old Ubuntu and openSUSE Live CDs. The Ubuntu CD wouldn’t work in this aging Dell (I suspect flaky CD drive), but the openSUSE 11 Live CD booted ok. I could not start X, but I could login as root through the console. Almost there!

The Live CD had not mounted the hard drives, but I could see the devices with fdisk -l. Then it was a matter of issuing:

mkdir /tmp/hd1
mount /dev/sda1 /tmp/hd1

to mount the HD, and then finally copying the backup passwd file over the empty one. After reboot everything was nominal (I guess I’ve watched too much Defying Gravity).

8525 as USB Drive in Ubuntu

I have had an AT&T 8525 cell phone running Windows Mobile 6 for a couple of years now, and one of my remaining issues with it is that I can’t sync it with my Dell Latitude D820 running Ubuntu 8.04. Yesterday I took a picture of a cool license plate with the phone and wanted to put it on my blog, but didn’t feel like booting my other computer running Windows just to extract the photo. A few web searches later I am still no closer to syncing, but I was able to access the SD card via USB cable plugged into the phone, and copy the photo from the card to my hard drive.

If you try to plug in the 8525 via USB cable to Ubuntu, Ubuntu will see this as a new internet connection. There are applications you can install on the 8525 that when running, make the phone appear as storage. At first I tried WM5torage, but Ubuntu did not seem to recognize the phone as storage even then. I even managed to hung WM5torage so bad that I had to reboot the device. After that I read about someone having succeeded with Softick Card Export. I installed it, launched it, then plugged the USB cable in. Success!

Softick Card Export is not free, but it has a free evaluation period. I will probably not end up buying it since I am thinking about getting a new phone soonish.

HP USB Multimedia Keyboard

My Dell Latitude D820 has developed a second hardware problem: the ‘E’ key functions only sporadically, and one day I could not get it to work at all (it has improved a bit since then). The laptop is still under warranty so hopefully I’ll get that fixed.

In the meantime I really needed a backup keyboard, so I went to the nearest Fry’s and and grabbed the cheapest USB keboard that had an unopened box. It happened to be an HP 321AA USB Multimedia keyboard. I just plugged that in, and Ubuntu was happy. All the normal keys work as you would expect. I was surprised that even some of the extras work: Home button takes my browser to my home page, and the volume buttons work too. Sleep, page back and forth, favorite page and email button don’t seem to do anything. I also haven’t tried the play/pause, stop and track changing buttons. All the button presses are recognized, though (I verified with xev), and it seems like I can use System > Preferences > Keyboard Shortcuts to map the special keys to whatever I want (I just tested that I was able to map one key).

I was prepared to pay up to a $100 for an external keyboard to solve this “key-mergency”, so I was really happy when I walked out of the store with a $15 unit. Even though the keyboard feels pretty nice, I think I have gotten too used to laptop keyboards (I’ve used laptops pretty much exclusively since 2003). The full sized keyboard just feels too clunky. The optional wrist support can make it feel a bit more like a laptop, but unfortunately I had no room for it in my setup.

Ubuntu Lost Sound – Pulseaudio to the Rescue

I have been using Ubuntu as my main OS since 2006, and while I had occasional sound glitches here and there on my Dell Latitude D820, even in the worst case the problem solved itself if I suspended and resumed or rebooted. But my latest problem was not tamed that easy.

For a few days I was getting either no sound at all, only white noise or crackling, or nothing but YouTube sound working and even then only the YouTube volume control affected the sound. I noticed the problem when I tried to play a presentation by Richard P. Gabriel and Guy L. Steele linked in here, and couldn’t hear a thing. At first I thought it might have been a codec issue, so I installed a couple of packages but this made no difference. Then I noticed the seriousness of the problem when I couldn’t hear sound from anything else either.

I tried uninstalling the new packages, reinstalling all packages that I thought had anything to do with sound, and still nothing. Then I went searching the Ubuntu Forums, but nothing helped until I finally found the Intrepid Sound Solutions post. Basically the post tells you what extra packages to install and how to configure everything to use pulseaudio.

For easy reference, the packages I installed were: asoundconf-gtk, gnome-alsamixer, alsa-oss, libasound2, libasound2-plugins, padevchooser and gstreamer0.10-pulseaudio. I probably have other sound-related packages installed as well, but those were pointed out in the post. Then I went to System > Preferences > Sound… and changed all to Pulseaudio Sound Server except for the Default Mixer Tracks which I left at HDA Intel (ALSA mixer). Then right-click volume icon in task bar, open volume control, check that File > Change Device shows HDA Intel (ALSA mixer) and make sure Master and PCM were not muted (I guess PCM does not matter but did it just in case). Applications > Sound & Video > PulseAudio Device Chooser, wait for the icon in the taskbar, then click on it and select Volume Control… and check that Output Devices looks correct. Incidentally, it says STAC92xx Analog.

The most amazing thing was that it was not necessary to use the command line at all! (I still used command line to install the packages, but you can avoid even that by using Synaptic).

Sound has now worked correctly in all the applications I have tried, even after reboot and suspend.

M2Crypto Build Wrapper for Fedora Core -based Distributions

Ever since M2Crypto got support for Elliptic Curves (EC) cryptography, it has been somewhat difficult to build M2Crypto on systems where OpenSSL has been built without EC support. Notably distributions based on Fedora Core, which besides Fedora Core include of course Redhat and CentOS.

Disabled EC support alone wouldn’t be an issue, since normally opensslconf.h defines OPENSSL_NO_EC, but those same systems have also changed OpenSSL build so that instead of opensslconf.h you need to include processor architecture dependent file. And if that wasn’t enough this isn’t actually what you are supposed to be doing, and you will hit a compiler error to notify you of that. The final step in the recipe is to tell SWIG to treat errors as warnings. The distributions make build changes in their own versions of M2Crypto, but unless you know the recipe, you are going to have a hard time building M2Crypto yourself. Miloslav Trmač showed me what kind of changes were needed, and I made a new setup wrapper fedora_setup.sh which should help you get off the ground with M2Crypto if you are having a hard time building it. Let me know if you run into any problems with the setup wrapper.

I am sure the distros did not make these changes just to make it harder to build systems based on OpenSSL, although it sure does feel like that at times. Maybe someone can shed light on why these changes were made in the first place.

Imation 8 GB USB Flash Drive

I finally got on the USB Flash Drive movement and bought an Imation 8 GB USB Flash Drive. I was looking for something in really small form factor so that I could keep it in my key chain. The Imation definitely fits the bill: it is so small that I can barely get enough grip to pull it out of the USB port. There are no moving parts nor any parts that could get lost. It is big enough for what I needed it: copies of my Firefox and Thunderbird profiles so that I can get my bookmarks, passwords and emails on computers that I normally wouldn’t want to copy my profiles to. It was also pretty cheap at around $30 when I got it.

I plugged it into my Dell Latitude D820 and D830 running Ubuntu Linux, and the systems mounted the drive without any problems.

Due to my usage pattern I did not need a full Firefox-on-stick option, so I was able to just make two launcher scripts that would start a separate Firefox or Thunderbird instance and load the profiles from the flash drive. It took a little digging to find the right command line options, so here are the actual commands you will need: firefox -no-remote -profile /path/to/fx/profile/dir and thunderbird -no-remote -profile /path/to/tb/profile/dir. Using Firefox and Thunderbird this way makes them really slow due to the slow speeds of the Imation flash drive, but since I don’t need to do that too often I am fine with it.

Garmin Nüvi 760

I got a Garmin Nüvi 760 for Christmas. It was quite a surprise, since my Garmin iQue 3600 still works, although it had some stability problems in the summer.

The iQue is a hybrid Palm/Garmin navigator, which means that it has the benefit of being able to run most Palm software. The killer application for a navigator turned out to be Fastfinger, which let’s you record macros for anything, and run a macro with a single touch. I configured the REC key to open the Fastfinger quick launch screen where I configured 11 actions for things like: route home, next gast station on route, next Starbucks on route, cancel next via point, nearest parking, nearest hospital and so on. Combined with the highly configurable navigator options, the possibilities were basically endless. The downsides include short battery life (and needing to restore from a computer once this happens), needing to use the stylys to write, long time to acquire satellites, and no custom points-of-interest support. I also haven’t tried it with Linux, but I doubt I would be able to synchronize the map data.

The 760 is obviously more advanced, but it took me a while to start liking it. It uses Garmin proprietary OS for which there does not seem to be many hacks, meaning you are stuck with whatever Garmin put on the device. The screen has different orientation, the UI is really dumbed down (to a stage where I had to read the manual to figure out how to add a via point), text-to-speech (TTS) can be somewhat hard to understand (although it beats having to look at the navigator for the name of the street you need to turn next to) and it shows the current speed limit. Out of the box the 760 comes with two options for sound: either use the FM transmitter and turn your car radio to the channel, or use the builtin speakers. The former does not work well in areas that have lots of radio stations available like the Silicon Valley, nor is it convenient on long drives where you pass through areas that use different frequencies. The volume level from the device itself has been configured a tad too low, although it seems there is an easy hack to make it louder.

The 760 also comes with a free 60 day subscription to traffic alert service. Supposedly you can buy a lifetime subscription for an additional $60. It seems to have worked pretty well on my freeway commute (101), but it doesn’t seem to include support for small roads. When it works it is pretty nifty: you get a little alert icon in the display that tells you how much traffic is going to slow you down, and automatically calculates you the fastest route taking traffic into account.

I haven’t really confirmed it, but it seems to me the 760 isn’t giving me as accurate driving information. For example, it gave me directions to a restaurant but failed to inform me that to get to the restaurant I needed to drive one more block and make a U-turn. I think the iQue has always told me to do a U-turn if needed to get to the right side of the road.

I was pleasantly surprised that my system running Ubuntu Linux recognized the 760 as a USB storage device when I hooked it up. I can access the SD card via this way as well. Of course, since the system is so locked down there isn’t much you can do besides uploading music to the SD card.