Archive for the 'Computers' Category


Trying out Kubuntu - First Impressions

Sunday, December 24th, 2006

At the moment both my desktop and laptop run Gentoo Linux. It’s a fine OS and it’s been the longest running Linux distro I’ve had, but it takes a lot of effort to keep it up to date. Over time I’ve used my desktop less and less for work, to the point it’s really just a media server. Since it hasn’t been used for much, I haven’t kept it up to date, and it’s still awaiting the split-X upgrade, and now the gcc 4.11 upgrade. I don’t want to do them again, I’ve done them on my laptop and they take a long time, and there’s always something that needs fixing at the end. So I figure it’s time to try out something a little more low maintenance, enter Kubuntu.

I’ve had some experience with Ubuntu before, and it’s pretty pain-free, providing you don’t mix and match your source lists too much, all too common when you want to try some new version of a package. I downloaded a copy of Kubuntu Feisty Fawn, which is the latest development version, so strictly speaking you shouldn’t use it as your current desktop OS, but I don’t plan to upgrade for a short while so I just wanted to give it a test run.

N.B. This was done with the live CD rather than doing an install.

Startup

Overall pretty good, it did try to use an unsupported video mode between the original boot menu and X, but I just sat it out and it was fine. It brought up X and found the network.

X

X did start up and was working but still needed some configuration to get to a decent state. It had chosen the highest resolution possible, which meant a low refresh rate, I had to copy over my old settings to get it the way I liked it. I was surprised to see an option to change the resolution and refresh rate in KDE control center, but these had no effect besides restarting X. It also setup a US keyboard, so that needed changing.

Other Hardware

It didn’t detect my printer, but I’m still using the parallel port, so fair enough. More annoyingly it didn’t create any mount points for my hard drives and DVD drive, so I had to do this for myself.

Multimedia

Since the main purpose of the box will be to serve media files, this is an important area. Sounds works fine, so we were off to a good start, but that’s where it ended. There’s a definite lack of multimedia software with Kubuntu, namely:

  • mplayer
  • freevo
  • mythtv
  • Any UPnP AV servers (mediatomb, ushare, etc.)

The only media player was Kaffeine and when it started, it complained about various things, e.g. missing Win32 codecs, insufficient permissions to read /dev/dvd, not great. The lack of codecs was a real problem. Most files couldn’t play (duh, they’re avi files!), but also some mpegs lacked sound.

That’s where my first adventure into Kunbuntu ended. The appeal of apt-get is a strong one, so I think it’ll continue, I just need to find a source list that will give me multimedia love I crave. :) If I can get that sorted and setup a CUPS and Samba server, it might be time to retire one of the older Gentoo installations out there.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Trying out Kubuntu - First Impressions digg.com digg it!  |  reddit reddit!

Using Gmail as a Client for Your Other Email Accounts

Sunday, November 19th, 2006

I’ve started using Gmail at work and I like it. The conversation view really grows on you, and little things like filtering out duplicate mails (think replies to a mailing list) are really handy. After using it for a few weeks it made Squirrel Mail, which I was using for my personal mail, feel really basic. So I decided to setup Gmail to be my main mail client, but with my regular email address. Here’s what I did:

  1. Register your personal email address with Gmail. This allows you to send mail from your regular address instead of your Gmail address. You might also want to set that address to be the default one messages are sent from.
  2. Start forwarding your other mail to Gmail. This step really depends on your ISP, I have shell access so I use procmail:
    PATH=$HOME/usr/bin:$HOME/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
    MAILDIR=$HOME/Maildir
    PMDIR=$HOME/.procmail
    LOGFILE=$HOME/procmail.log
    SHELL=/bin/sh
    
    # ... SpamAssassin stuff omitted ...
    
    
    # Forward to Gmail (if not from Gmail, e.g. bcc’s)
    :0c
    * ! ^Sender: user@gmail.com
    ! user@gmail.com
    
    
    # Default entry to make sure mail is delivered
    :0
    $HOME/Maildir/
    

    N.B. replace user@gmail.com with your email address.

    The bold bit forwards all mails to Gmail unless it’s sent by your Gmail user, e.g. if you’re bcc’ing each mail to yourself (useful for normal mail clients to maintain a conversation view but unnecessary for Gmail), but the main idea is to stop loops.
  3. Optional step
  4. I like to send a copy of each mail to myself using BCC. This means I can backup sent mail, and still see the whole thread if I’m using another client. This can’t be done automatically with Gmail, but can be done with a greasemonkey script, I’m using Gmail Auto BCC. The procmail rule above allows you to BCC your main email address without sending a copy back to Gmail, but it’s not perfect. When you bcc yourself Gmail spots this and marks it as a new message in your inbox, I haven’t found a way around this yet with only one address. But I have my own domain so I can have as many addresses as I like, so I setup a bcc@ address for my auto forwarding.

With this setup a copy of all my email is forwarded to Gmail, I can send mail from my regular address, and a copy of each message I send is backed up to my ISP. It’s working well at the moment, the only downside being I have to sort through mail twice, first in Gmail, and secondly went downloading the backup from my ISP, I’ll have to see how that works out in the long run. My next tasks will be to see if I can upload my old mail, and to try out the new mobile Gmail app.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Using Gmail as a Client for Your Other Email Accounts digg.com digg it!  |  reddit reddit!

My lap is safe for now…

Friday, September 29th, 2006

I noticed a while ago that an IBM Thinkpad finally caught fire. IBM (Lenovo really) has issued a recall for some batteries. Thankfully my trusty T30 is not on the list. It’s only Sony batteries that are affected, and my one is made by Sanyo, so I’m safe for now.

But if it’s overheating that’s causing these fires it won’t be long before my hard disk or power adapter bursts into flames…

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit My lap is safe for now… digg.com digg it!  |  reddit reddit!

Weird Hibernation Issues

Wednesday, September 20th, 2006

No, nothing to do with sleeping for a very long time, but weird things my Thinkpad does when it hibernates. For the most part hiberation works very well on my Thinkpad. I use the hardware supported one rather than the one built into Linux, but it does do a couple of odd things.

The first is that Firefox occassionaly (but not always!) dies during hibernation. I think I’ve narrowed it does to either Ajax apps running (some network connection getting killed, then killing the app?) or I’m using swap (more likely Firefox has been opened long enough that something else is the cause). It’s not really a problem because I use Tab Mix Plus, which can restore my session after a crash, but it is frustrating if you open a bunch of articles that you want to read on say a long train journey, only to find the browser is gone!

The other weird issue is that my fonts disappear from OpenOffice and Microsoft Office (running via Crossover Office after hiberation. This includes menu fonts and the fonts used in the document. All the spacing remains correct, just no text. It only happens to these two programs, everything else is fine. Restarting xfs doesn’t make a difference, the only way to fix it is to restart X. This problem is just bizarre.

If any one has any solutions to these problems, I’d love to hear them!

Update 1: It looks like the hibernation processes shuts down the network connection and all programs that depend on it. I don’t know if that’s a Gentoo specific thing. The only other process that isn’t running when the computer is turned back on is gconfd-2, but unfortunately starting it up doesn’t help with the font problem.

Update 2: The gconfd-2 thing was a red herring, it was started up by Firefox. Killing it doesn’t affect the fonts. I guess something in X is dying, which can only be fixed with a restart.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Weird Hibernation Issues digg.com digg it!  |  reddit reddit!

Gentoo and Amarok 1.4.0

Monday, July 31st, 2006

If you’ve just upgraded to Amarok 1.4 on Gentoo Linux and it keeps crashing on startup, try installing sqlite:

emerge --oneshot dev-db/sqlite

It looks as if this is a runtime dependency of Amarok that emerge fails to install.

I’ve raised this issue as bug #142340 on Gentoo’s bug tracker.

Update: This might just be required if you’re upgrading a collection from 1.3.x.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Gentoo and Amarok 1.4.0 digg.com digg it!  |  reddit reddit!

Beat some sense into your computer

Wednesday, July 26th, 2006

How cool is this?

You can control your ThinkPad by hitting it.

You can find out more at:

Sadly my ThinkPad is too old, so I’ll have to stick to boring keyboard based commands.

Update: Wordpress’ WYSIWYG editor doesn’t let me embed the YouTube flash player, disabling it allowed me to embed the video.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Beat some sense into your computer digg.com digg it!  |  reddit reddit!

Finally got a Google Analytics account

Wednesday, May 17th, 2006

I’ve wanted to add some sort of analysis package to my site for a while. My preferences were Google Analytics and Measure Map (also purchased by Google. Unfortunately both are invitation only. I looked at Mint, but with all the free stuff out there, I’m too cheap to fork out $30 a site. I never managed to succeed registering with Performancing. There were a few other things on my radar, but none of that matters now because I just received an invitation to Google Analytics.

Once I get it setup I’ll finally get a chance to see what Simon and David read. Then I can cater my posts to their tastes or I could write a few inflammatory posts about Rails to get some other readers. ;)

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Finally got a Google Analytics account digg.com digg it!  |  reddit reddit!

Microsoft’s New Brain

Wednesday, April 19th, 2006

I don’t normally just posts links, but this is a good article on Fortune about Microsoft’s new CTO, Ray Ozzie, and what he’s doing to the company:

http://money.cnn.com/magazines/fortune/fortune_archive/2006/05/01/8375454/index.htm

He also has a blog here:

http://spaces.msn.com/rayozzie/

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Microsoft’s New Brain digg.com digg it!  |  reddit reddit!

GPRS Internet with Linux

Tuesday, April 18th, 2006

I actually came across the correct settings for Vodafone GPRS while trying to use my phone as a modem. I was away over Easter and had my laptop, but my only Internet connection was a vain hope there would be a public wireless connection around. There weren’t any, and surprisingly all the ones I did find were encryptyed.

It was annoying to see wireless connections around but not being able to connect. I figured if I couldn’t get a permanent solution like a 3G datacard or a monthly subscription to T-Mobile HotSpot, then I’d have to fall back to the old trusty dial up. There is a modem built into the Thinkpad T30, but I’ve never bothered to set it up. I figure if there is a phone line, there’s going to be some sort of broadband connection. The modem I wanted to use was in my phone, the main driver being I had a load of bundled minutes with it and what better way to use them than downloading email at 9.6kbps?

But before I could find out if I could even be old fashioned and dial up to Freeserve (or what ever they’re called now) I remembered about GPRS, which should give me a data rate of about 25-40kbps. I found some instructions how to use a Sony Ericsson phone as a GPRS modem in Linux. These particular instructions use Bluetooth, something my T30 doesn’t have, but you can connect using the supplied USB cable as well. After you plug in your phone load the following drivers:

  • cdc_acm
  • ppp
  • ppp_deflate
  • bsd_comp

The first driver should create a device at /dev/ttyACM0, the others are to allow you to dial up and use PPP. So ignore the first step in the instructions above (unless of course you’re using Bluetooth). Then in the first file change the device to /dev/ttyACM0, and make sure you have the correct user (’web’ for Vodafone). My copy of /etc/ppp/chat.gprs contains:

TIMEOUT         5
SAY             "Internet via Vodafone GPRS"
ABORT           'nBUSYr'
ABORT           'nERRORr'
ABORT           'nNO ANSWERr'
ABORT           'nNO CARRIERr'
ABORT           'nNO DIALTONEr'
ABORT           'nRINGINGrnrRINGINGr'
''              rAT
TIMEOUT         12
OK              ATE1
OK              AT+cgdcont=1,"IP","internet"
OK              ATD*99***1#
CONNECT         ''

and finally in /etc/ppp/pap-secrets set the username and password to what ever your provider requires. Then you can connect with:

pppd chat gprs

and amazingly you’re connected to the Internet. Maybe I’m too cynical about technology these days, but I was amazed how easy this was to setup.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit GPRS Internet with Linux digg.com digg it!  |  reddit reddit!

WPA, Gentoo Linux and an IBM Thinkpad T30

Sunday, April 2nd, 2006

I decided it was finally time to switch from WEP to WPA because WEP is simply broken and shouldn’t be considered safe. There are some attacks available against WPA, but they tend to be ‘try every key in existence’ type. Have a sufficiently long key and you’re pretty much safe. The attacks also seemed to be geared towards weaknesses in TKIP, I haven’t read any about AES.

Using WPA in Gentoo is trivial and the guidebook covers all you need to know. There was one slight hiccup, my wireless card’s firmware didn’t support WPA. I have the optional mini-PCI card for the Thinkpad T30. This is based on the Intersil Prism 2.5 chipset. The hostaputils package contains the ‘prism2srec’ command that allows you to update the firmware. Here are the instructions I followed.

First check what card you have:

# hostap_diag wlan0
Host AP driver diagnostics information for 'wlan0'

NICID: id=0x8013 v1.0.0 (PRISM II (2.5) Mini-PCI (SST parallel flash))
PRIID: id=0x0015 v1.1.0
STAID: id=0x001f v1.4.9 (station firmware)

The ’station firmware’ needs to be at least 1.7.0 to use WPA. If you try to run wpa_supplicant before updating the firmware you’ll get a driver doesn’t support WPA error message. Check out the instructions I linked to previously to work out what files you need. The latest firmware is 1.8.4, but the I only upgraded to 1.7.4 since several people had tested that version and it works. With that version of the station firmware also came an update to the primary firmware, the files I used were:

Only use those files if the output of hostap_diag matched mine.

You’ll have to modify the hostap driver to enable flashing since it’s disabled by default. Instructions are on the linked page. Once you’ve done that it’s a simple matter of:

# prism2_srec -v wlan0 pk010101.hex sf010704.hex

and if everything went smoothly (no error messages), do it for real:

# prism2_srec -f -v wlan0 pk010101.hex sf010704.hex

After a lot of messages you should see:

Downloading to non-volatile memory (flash).
Note! This can take about 30 seconds. Do _not_ remove card during download.
OK.
Components after download:
  NICID: 0x8013 v1.0.0
  PRIID: 0x0015 v1.1.1
  STAID: 0x001f v1.7.4

Your card will be updated and you can start using WPA.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit WPA, Gentoo Linux and an IBM Thinkpad T30 digg.com digg it!  |  reddit reddit!