Initial Ubuntu 8.04 Linux Setup 1

Posted by John Sun, 11 May 2008 20:53:00 GMT

After grabbing and installing Ubuntu 8.04 I then had to put together and setup the baby, luckily I wrote down most of everything I did in case I’d have to do it again and to help out you guys.

What follows are my findings and what I did to fix them. The machine I used is an HP Pavillion dv2000 model dv2742 special edition. It’s got a built-in intel graphics card, 3gb memory, sata 250gb drive, wifi, bluetooth and an intel dual core 2 processor.

I installed the o/s using the 64-bit edition of Ubuntu 8.04 Hardy Heron, all what you see below are workable settings which provided the right setup; hope they help your situation if you go down this route.

Update System

First port of call, check for any new updates post-install,

sudo aptitude update
sudo aptitude upgrade

Dependencies / Software / Setup

Next, install Ruby, FlashPlayer, GCC Compiler, MySQL, JAVA, SqlLite,

sudo aptitude install mysql-server flashplugin-nonfree ruby-full libsqlite3-dev build-essential libmysqlclient15-dev sun-java6-jdk

Volume Mixer,

sudo aptitude install gnome-alsamixer

ImageMagick,

sudo aptitude install imagemagick

Ruby Gem Handler

I could get GEM from the repositories but because with each new update it breaks away from the in-built Linux installer it’s best to install it from source,

wget http://rubyforge.org/frs/download.php/34638/rubygems-1.1.0.tgz 
tar xzvf rubygems-1.1.0.tgz
cd rubygems-1.1.0
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

Had problems updating the GEM system initally, so logged in as root to finish it off,

su root 
sudo gem update --system

Now when you type gem –version you should see GEM ready to roll,

Gem Libraries

The slow bit, ran this as root just to make sure it worked,

gem install rails
gem install rake
gem install mongrel
gem install mongrel_cluster
gem install thin
gem install capistrano
gem install mysql
gem install termios
gem install sqlite3-ruby
gem install mini_magick

VLC + GIT

Next VLC to play videos,

sudo aptitude install vlc

Transmission for torrents, most important bit,

sudo aptitude install transmission

And GIT to handle code versioning,

sudo aptitude install git-core

Firefox + MS Fonts

Next I need Firebug for Firefox 3. Ubuntu 8.04 comes with Firefox 3 beta 5, the one available thru Tools / Add-ons won’t work with it; but thankfully it’s in the repositories

sudo aptitude install firebug

And you’ll probably need Microsoft Fonts later down the line,

sudo aptitude install msttcorefonts

Pimp GEDIT

The default Gnome Text Editor Isn’t bad but let’s add some extra’s to really kick it in gear,

sudo aptitude install gedit-plugins

And tweak it,

wget http://robzon.kapati.net/rails/rhtml.lang && sudo mv rhtml.lang /usr/share/gtksourceview-2.0/language-specs/
wget http://robzon.kapati.net/rails/rails.xml && sudo mv rails.xml /usr/share/mime/packages
sudo update-mime-database /usr/share/mime

Follow the guide here to get the TextMate look,

Now when you open rails source files they’ll actually look right, thanks Grigio.

PostGreSql + Thunderbird

Pretty easy to install the most powerful db system, and the better email handler

sudo aptitude install postgresql thunderbird

Wine for Windows

Thanks to Google for their support the Wine project is going great, to get Windows software running natively on your machine,

First add the key,

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

Then add the repository to your default repository list,

sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list

And finally install it,

sudo apt-get install wine

Effects

To enable compiz effects make sure Appearance / Visual Effects is set to ‘Extra’, then install the Advanced Effects Manager,

sudo aptitude install compizconfig-settings-manager

This will give you access to the 3d cube, skydome effect and a host of other cool addons.

My desktop dpi is set to 100dpi, fonts set to ‘Bitstream Vera Sans Roman 8pt’, with ‘Bitstream Vera Sans Bold 8pt’ for Windows Title; and ‘Liberation Mono 8pt’ for fixed width font. Using subpixel smoothing for LCD.

Sound

For my laptop (hp pavillion dv2000 / dv2742se model), i had to use a different sound mixer to make sure the quickplay volume and mute buttons talked to the sound system.

So from the top menu bar, System / Preferences / Sounds, then set the Default Mixer Tracks hander device to: Conexant CX20561 (hermosa) (oss mixer).

Cleanup

To get any temp files carried on from the install, clean with,

sudo aptitude clean

Job done, however I had a problem with Hibernate & Suspend which was lucky fixed with some advice from here

Linux - Better Screen Fonts

Posted by John Sun, 11 May 2008 14:06:00 GMT

If you’ve just switched over to Linux, you’re probably hating the default monospaced font; thankfully I’ve found some better ones…

Liberation

On May 9, 2007, Red Hat announced the public release of these fonts under the trademark LIBERATION at the Red Hat Summit. You are free to use these fonts on any system you would like. You are free to redistribute them under the GPL+exception license found in the download.

Liberation Fonts

Lucidia Grande

AppleGaramond, Aquabase, LITHOGRL, Lucida Grande, Lucida Mac, lucon, MacGrand

Thanks to Nylock for sharing this fonts with us

Mac Fonts

Installing

Once downloaded, usually to your desktop, you’re going to need to install them into your system to use. They need to be copied to the /usr/share/fonts directory.

First unzip the files, then open Terminal and…

cd /usr/share/fonts/truetype
sudo mkdir liberation
sudo mkdir apple-fonts

Here, you’ve moved into the location where the System’s fonts are stored, then created one directory for the liberation fonts (worth having), and the apple fonts.

Now copy the files to each directory from the desktop to liberation & apple-fonts,

sudo cp /home/[user]/Desktop/liberation-fonts/* /usr/share/fonts/truetype/liberation
sudo cp /home/[user]/Desktop/fonts/* /usr/share/fonts/truetype/apple-fonts

Final bit, refresh the font cache…

sudo fc-cache -vf

Logout, login and your ready to use them.

Webcam + Ubuntu on DV2000

Posted by John Sun, 11 May 2008 13:49:00 GMT

Setting up the built-in webcam on the HP DV2000 laptop isn’t that hard, here’s a quick run thru…

Dependencies

First install all the dependencies your going to need to build the drivers from source,

sudo aptitude install linux-headers-`uname -r`
sudo aptitude install build-essential subversion

This will install the GCC compiler, linux headers, etc.

Build Driver

Now in Terminal,

svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk
cd trunk
sudo make
sudo make install

First you pull the Linux-UVC source from Subversion, move to that directory, compile the source the install the binaries.

Check for Webcam

Now check to see if you have any USB video devices (your webcam usually)

sudo lsusb -v

Scroll thru all the entries, one should be the webcam.

Use it

Next up we’ll need some tools to use it,

sudo aptitude install ekiga cheese

Cheese is a simple webcam recorder, much like Apple’s, allowing you to take a photo from your webcam and apply some neat effects to it real-time, the other is a more convential tool to use it.

Tested & Working on Ubuntu 8.04

Multi-Boot Vista + ArchLinux with GRUB

Posted by John Thu, 20 Mar 2008 17:11:00 GMT

After setting up my new HP laptop with Vista and ArchLinux I thought I’d post how to replicate the same setup to help anyone else wanting to do the same, so here’s a guide to do this with the latest Windows Vista and Arch Linux; enjoy!

Install Windows Vista

Vista

First off install Vista. Now when it gets to asking you about how much disk space to use, say half (250gb drive => 128gb approx), this will mean the other half will be unused space (perfect for your linux build).

Install Vista and set it up, when you’re happy and it’s running ok continue to the next step.

Get ArchLinux

By now you should have two hard-drive partitions, one with Vista (NTFS) and one blank; now we’re going to sort that second one out.

First download the relevant ISO disc image,

Download it and burn it to CD, it’s only 120mb so shouldn’t take too long. Once done insert it into your laptop and re-boot with it so it starts up the installer on bootup.

Install ArchLinux

ArchLinux

When the installer boots up and shows the blue install screen you’ll see 6 options, let’s go thru each one…

1. Prepare Hard Drive

Don’t choose Auto-Prepare, it’ll wipe your hardrive and destroy Vista, select Partition Hard Drives which will put you in the disk partition tool.

You should see two entries, one will be…

1. [boot] [primary] [ntfs]
2. ...... [unknown] [unknown]

The first is setup as the boot partition (the one which will boot on startup) and you know it’s Vista as the filesystem is marked as NTFS, the other is unknown; our target for the Linux install.

So select the unknown one and create, mark it as a primary partition, select write to write the change and then quit to continue. Note the name of the new partition (e.g. hd0/sda2) and goto step 2.

Note: SDA = SATA, the machine i’m using has SATA drives, if you’ve got older IDE drives it’ll be HDA0.

2. Set Filesystem Mountpoints

With this we’ll want to set which partition we want to use as a swap disc, but as we didn’t create one, select none.

Next you’ll be asked which partition will be used as the root one for this install, select hd0/sda2 (or whichever name you wrote down in step 1). Continue to step 3.

3. Select Packages

Here we select which packages we want to install, ArchLinux is broken up into 4 separate blocks; base being the core o/s. Select all four as we’ll be wanting all the tools to practice (otherwise you can choose ‘base’ and customise later). Step 4…

4. Install Packages

This will install ArchLinux to your target FileSystem, shouldn’t take long; once done goto 5…

5. Configure System

Now configure your system, with most options choose the defaulty chosen options; afterwards your configuration will be written to the new system. Now onto the important step 6.

6. Install Bootloader

Now we’ll install the bootloader to allow you to select on-bootup which O/S to start. Choose GRUB as your bootloader, you’ll then be taken to the bootloader’s config file.

Scroll down to the bottom of the file and uncomment the bottom entry until it resembles…

# (2) Windows Vista
title Windows Vista
rootnoverify (hd0,0)
makeactive
chainloader +1

This will add to your selection list an entry pointing to your first partition so you can select to boot Vista. Scroll up to the top of the file and check these lines, adjust as appropriately…

  • timeout 5 …this sets the seconds to wait until booting the default entry

  • default 1 …once the timeout expires GRUB will boot the option 1, ArchLinux, if you want to boot Vista instead, change it to 2.

  • fallback 0 …if the default can’t be booted, the fallback will be started, in this case the ArchLinux FallBack system created when we just installed ArchLinux (think of it as it’s Linux’s safe-mode, only much more powerful).

If you’re happy with the setup, press CTRL+X to save the file and continue.

You’ll next be asked where to place the Bootloader, we want to place it inside the MBR of the Drive so it will be launched when the disc spins up. The MBR is the first sector of the Hard Drive and commonly called the Master Boot Record.

You’ll be presented with probably 3 options…

/SDA
/SDA1
/SDA2

Choose the first, this will be where the MBR is located.

Now you’re finished, exit the Installer by selecting Exit Install, then type REBOOT to reboot.

The computer should restart and present you with the GRUB bootloader menu, where you’ll now be able to select which O/S to start; job done.

Setting ROOT Password

Please note that with this initial install your ROOT account won’t have a password assigned to it, posing a poblem later on down the line.

So when you’ve booted into ArchLinux, and typed ‘root’ as the username and hit ENTER to login, type…

passwd

To set the ‘root’ account’s password.

Changing The Config

To edit the GRUB config later on, do…

nano /boot/grub/menu.lst

Settings

So as you know, the system config files are located in…

  • /etc/rc.conf (main system config)
  • /boot/grub/menu.lst (grub boot menu)
  • /etc/lilo.conf (lilo boot menu)
  • /etc/mkinitrd.conf
  • /etc/hosts
  • /etc/fstab
  • /etc/modprobe.conf
  • /etc/modules.conf
  • /etc/resolv.conf
  • /etc/conf.d/*
  • /etc/profile