the itjerk

my adventures with technology

Monthly Archives: August 2009

installing opera on ubuntu 9.04

Hey – what a pain in the you-know-where was this! I first installed the .deb file for Ubuntu from the website. This was the latest version of Opera, 9.64, but it was also a "static" version. Flash didn't work, wouldn't update, etc. Sucks, right?

So to get Opera properly installed on my linux box, I had to a) edit my apt sources list, b) get a key to trust the new source, c) install opera, and finally d) reboot to see it in my application menu.

sudo gedit /etc/apt/sources.list
deb lenny non-free
sudo wget -O - | sudo apt-key add -
sudo apt-get install opera

linux box, restored

Okay, the hardware I put together works like a champ and I'm tickled pink with my new KVM switch. I dropped the Ubuntu 9.04 Jaunty Jackalope CD in the drive and let it do its thing. From what I could tell, the previous box made the switch from Fedora Core 5 or 6 to Ubuntu with Dapper Drake 6.06! Thus, after six (6) distribution upgrades, it was just time for a clean install. How sweet it is – I had no idea the 9.04 login art looked like that! But practically speaking, it's always nice to give a rethink to all the software I use/don't use. And there's no better place to start than with a squeaky clean, fresh installation of your operating system.

Before I go further, I should tell you about one mistake I made: although I didn't use the previous system hard drive on the new box (I had a spare laying around), I did't do a good job of preparing everything to be transfered over to the new box. Fortunately I could reboot from the old drive and get all my old setttings, preferences, web stuff and mysql database (for the wiki) saved to DVD, and make any mental notes about what apps I had/want, certain permissions on folders, and other tweaks etc.

Now let's get the machine back to work. First up were updates, and a lot of them. Update Manager took care of everything, then even reminding me to reboot. Then I added some really basic tweaks I just gotta have (remember to restart X afterwards). The second command avoids storing duplicates in ~.bash_history, (I picked it up from Linux Journal):

sudo apt-get install nautilus-open-terminal openssh-server numlockx landscape-common ntp
echo "HISTCONTROL=ignoreboth" >>~/.bashrc

Second Hard Drive
My linux box has always had a second hard drive, containing all my music. I'll automount that by first creating a mount point in /mnt, fixing its permisions, and then access it by creating a symbolic link in my home directory:

sudo mkdir /mnt/music
sudo chown username:username /mnt/music
sudo chmod 755 /mnt/music

Then, I add the following to /etc/fstab so that the drive actually mounts at boot (make sure to verify that the drive is indeed sdb1):

/dev/sdb1  /mnt/music     ext3    defaults,relatime        1 2

Installing MediaWiki was quite easy and painless: First, using Synaptic Package Manager, I searched for MediaWiki, checked it, and let it install all the required packages including apache and mysql. Easy or what? Then, I had to get the old database and wiki files off the old computer by backing up the wikidb using mysqldump command, and then tarballing the wiki folder (located in /var/www)

mysqldump -u root -p wikidb > backup/location/wikidb.sql
sudo tar -czvf backup/location/mediawiki.tar mediawiki

To get them up and running on the new machine, there's just one addition step; you first have to create a new database in mysql before you can replace it with the old one.

mysql –u root –p
Create database wikidb;
mysqldump -u root -p wikidb < backup/location/wikidb.sql
sudo tar -xzvf backup/location/mediawiki.tar /var/www/mediawiki

That's it, it worked. (One note: I did setup the new box with exactly the same hostname and users as the previous. Be sure to use the same mysql password, otherwise you'll need to edit the LocalSetttings.php file.)

Okay, next was to reinstall the Slimserver, whoops, Squeezecenter software on the new box. Just add the following repository to the sources list, and the rest is easy.

deb stable main
sudo nano /etc/apt/sources.list
sudo apt-get update
sudo apt-get install squeezecenter

Finally open up your web browser and run the setup by going to "http://localhost:9000/". It did ask me to update the firmware on my Squeezebox. Also, remember to install MP3 support first, Ubuntu does not support it out of the box.

Restricted Formats
And that's been made exceptionally easy by installing one package:

sudo apt-get install ubuntu-restricted-extras

And for DVD support:

wget -c
sudo dpkg -i libdvdcss2_1.2.10-0.2medibuntu1_i386.deb

Windows Support
Samba is a protocol that provide for interoperability between Linux and the Windows operating system. It's now a fairly easy process to install and configure: First, install the appropriate packages. Second, set your samba username and encrypted password (I use the same as my user account). Next edit your smb.conf file to configure the shares on the linux box, and finally restart samba to make it all work.

sudo apt-get install samba samba-tools system-config-samba smbfs
sudo smbpasswd -a username
sudo nano /etc/samba/smb.conf [see below]
sudo  /etc/init.d/samba restart

Here's what I put into smb.conf so that my home folder can be accessed

path = /home/username
browseable = yes
writeable = yes

Now, when I browse my linux box from Windows, I see a folder called "shares" with my home folder inside, and am able to access it once I authenticate.

I also have a network drive from Buffalo that I use for backup. To get it to automount at boot, we'll again look to /etc/fstab. Here's it's entry:

// /mnt/backup cifs auto,credentials=/root/.smbcredentials,uid=1000,gid=1000,rw 0 0

CIFS, or Common Internet File System defines the type of file system we're going to mount. It's interchangeable for the smbfs that we installed above. Credentials points to a file that authenticates the drive, without having to reveal the information. Here's how it's created:

cd /root/
echo username=theusername > .smbpasswd 
echo password=thepassword >> .smbpasswd 
chmod 600 .smbpasswd

Finally, the uid and gid mark the proper permissions to access the drive as my user account. Straight forward, eh?

The Rest

  • Firefox needs Adobe Flash installed, though I think it's part of restricted-extras. Oddly enough, Adobe has still yet to release a 64bit version of Flash, so we're stuck in 32bit version of the OS until then. Also, Mozilla changed the way Firefox stores bookmarks. No longer is the bookmarks.html file insider your Firefox profile folder the most recent version of your bookmarks. Best is to either a) export your bookmarks using Firefox's Organize Bookmarks tool, or better yet, find .json files in the bookmark backup folder (in your Firefox profile) and restore the most recent one.
  • From Synaptic Package Manger, I installed: Audacity, Audacious, Grip, Easytag, Disksearch and Nicotine Plus. Along with Movieplayer and Rhythmbox, that's all I need for music. Oh yeah, and GTKpod, and the command line tools flac and oggenc. Remember to copy the settings files/folders from the old computer. They're located in ~/, and are hidden files (they start with a "dot", eg, .filename).
  • Shared Printer from Windows machine was simple. Haven't tried the scanner.
  • Still have to add some scripts: music_backup, dlame and converto. Another post.
  • See my post about the Dell Mini 9 to read about sshfs.

dell mini, received

Received my Dell Mini 9 today, and immediately installed Xubuntu 8.10 from a live USB drive. It's an easy enough process to create: insert a 2GB USB drive into the computer and either download the appropriate iso or insert a CD, then run usb-creator and a few minutes later you'll have a live distro ready to use on the optical drive-less Dell Mini. Xubuntu is based on Ubuntu, but just replaces most of the Gnome desktop environment with the resource-frugal XFCE. After installation, I had to fix the audio by editing alsa-base; this is a well-known issue with Ubuntu 8.10; I found the details at Just be sure to open the mixer and turn up the volume on the speakers after rebooting.

After rebooting, I accepted the proprietary driver for the wireless card, a Broadcom STA, entered my WPA/WPA-2 password, and connected to my wireless network. Like a good boy, I then updated Xubuntu, with all 118 packages that were available. I also installed the restricted media codecs, which includes java, mp3 playback and flash animation support:

sudo apt-get install xubuntu-restricted-extras

Only a few more things to install, like the Opera browser and Skype from their respective .deb packages, and sshfs from the command line, in a few easy steps:

sudo apt-get install sshfs
sudo modprobe fuse
mkdir /your/mount/point/

Then open terminal and connect:

sshfs /local/mount/point

If you haven't used sshfs (or scp for that matter) you're missing out on one of the easiest ways to connect remote computers. Perfect for the Dell Mini.

Here's my quick two cents: I've taken a few old Pentium III and IV-era laptops, installed Xubuntu and tried to make a go of them as "netbooks". The Dell Mini 9 is not an old computer; it's a fast, modern dual-core machine, even with the stock 512MB of RAM. (In fact, I'm wondering why I even bothered to order the extra 2GB RAM!) The screen is brilliant, the wireless integrated, and, even at 4GB, the SSD drive packs enough for a distribution like Xubuntu and some user files. There's an SD reader for convenient extra storage, and the integrated camera works out of the box with Skype. Yes, it's got a 9" screen, and yes using the keyboard is awkward, especially if one is used to desktops (like me). But I only paid $200. One dart though, the touch pad and keyboard are a bit too sensitive and jumpy, mandating one-finger typing. Yet, all in all, I'm very impressed. Thanks Dell!

On the web:
Official Dell Mini Site

iogear 2-port usb kvm switch

*Although I didn't buy a video card for the new box, I did spring for a new KVM switch, the IOGear 2-Port USB GCS42UW6, for $19.95 (again Microcenter price-matched NewEgg). What an excellent upgrade. The display from the Ubuntu box looks markedly improved over the old Trendnet TK-207 KVM. No flicker or noise, and no more continual need to auto adjust on my analog monitor. (Yeah, those DVI KVMs are quite pricey). And incidentally, I also noticed that the IOGear installed itself as a USB hub on the Vista machine, something the old one never did.

I'm so happy with this I'm going to give it it's own post. Hey, it's the little things in life…

linux box, rebuilt

I've been thinking about rebuilding my linux box for sometime now. The old box was about three (3) years old (I know, ancient in computer terms), running a Pentium D 805 processor. Performance really wasn't that bad at all, but I was itching for something new, and something on a budget. The computer does two things for me: a) it runs my wiki-forever-in-construction for my website, and b) runs my Slimserver (whoops, that's Squeezecenter now). I do a bit of CD ripping, sftping, and some desktop use as well. So no, I don't need a quad-core monster, and yes, energy efficiencey is a priority.

For a processor, I went for the Intel Pentium E5200, a dual-core model running at 2.5Ghz, but using a modest 65w of power. Microcenter had it on sale for a super low $49.99. For the motherboard, I had decided on the Gigabyte GA-G31M-E2SL. It's a "rock-solid" model using the Intel G31 chipset. Nothing too fancy, and carrying a $52.99 price tag (price matched with NewEgg), a nice low-end solution for the E5200 processor. Finally, I purchased a 2GB RAM kit from Cosair, $24.99 after rebate. Total spent: $140, including tax.

I always have a degree of nervousness when assembling a new computer from parts. Will they all work? Are they all compatible? Reading reviews at about DOA parts, etc is depressing, especially if you have to mail back for replacements. But Microcenter had everything in stock, and as I mentioned, was even willing to price-match NewEgg on one of the items. I used the rest of the parts from the old box: Wizard case from Ultra, Western Digital SATA hard drive and Sony IDE DVD-RW optical drive, and an Antec Earthwatts power supply (80% efficient, 380 watts). I didn't get a video card; the old board had an AGP card, but I really didn't know what to get – so it's on-board graphics for now*. Good news, everything was quick to assemble, especially when you learn how to mount those Intel stock CPU fans, and I even had a bit of Artic Silver 5 for the heat sink. The computer posted on first boot, and I had a clean install of Ubuntu 9.04 Jaunty Jackalope in no time.

Next up, I'll post details about getting all my data transfered, software setup, and getting the box back into use.