Monday, April 13, 2009

Ubuntu 8.04 Standard Setup Guide

Since many of you are new to Ubuntu and even Linux in general, I am going to put together a post highlighting some of the key setup features that I do on a Linux box when I first install. This guide is specifically built for Ubuntu 8.04 (Hardy Heron)

Where can I get Ubuntu from, and what do I need?
You can download Ubuntu from You will want to download the Desktop version. For compatibility sake, I would pick the 32-bit version as that is what I use for this guide.

Also, with Ubuntu, the standard install cd is a LIVE CD. Meaning that you can boot from the CD and see Ubuntu as it will run straight from the cd without having to be installed. Gives you an idea of what to expect and how compatible your hardware is right out of the box.

What is the "Alternate CD" for?: It's primary for low-end computers or boxes which have trouble with the standard install cd.

What's with the different versions, Ubuntu, Kubuntu, Xubuntu, etc?
Essentially, they are the same OS...but they each have a different desktop environment installed. Ubuntu uses Gnome...and is what I suggest for following this guide as that is what I used. Kubuntu uses KDE which is a competing desktop environment to Gnome. Xubuntu uses XFCE which is a low frills light-weight desktop environment suitable for low-end computers or for those who want the fastest possible performance and are willing to give up a few visual things.

Once you pick one, it's simple to just install the other desktop environment if you want to get a feel for how they look. Once you get through this guide, you will just need to install kubuntu-desktop or xubuntu-desktop.

The command line (aka The Shell, The Terminal)
Yes, I do a lot of my installing from here. Reason, you can cut and paste the line that I give you here into the shell and get it right every time
Applications, Accessories, Terminal (I'd suggest, right click and Add Launcher to Desktop)

What is this sudo thing?
Sudo is the system that is used to elevate your standard user account to termporarily have admin priviledges. When you first installed Ubuntu, the installer made your first user account a member of the sudo system who is allowed to do this.

To use sudo, you simply preface a command with sudo. For example, sudo apt-get install something (this runs apt-get which is the online installer and it is going to install something...and because you started with sudo, it does it with root level priviledges.

When sudo asks you for your password, it will cache it for a few minutes....therefore future commands typed in the next few moments will not require you to type your password over and over again.

What is root, who is root?
This is the equivalent account to Administrator in Windows. root can do anything and everything on the system.

How to update all of my software to the latest and greatest?
Terminal, sudo apt-get upgrade

Adding Multimedia Repository support into Ubuntu
First, Ubuntu does not come with the ability to playback encrypted DVD's, MP3 files or other Windows codec stuff. The reason, is because these are not-open source, royalty free or have other license restrictions. The good news is that you can easily add this support on your own using the medibuntu repository (multimedia, entertainment, distractions in Ubuntu).

sudo wget -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update (when asked to install without verification, say YES)

The 1 step approach to getting all of the restricted stuff installed
sudo apt-get install ubuntu-restricted-extras

Installing this package will configure support for MP3 playback and decoding, support for various other audio formats (gstreamer plugins), Microsoft fonts, Java runtime environment, Flash plugin, LAME (to create compressed audio files), and DVD playback.

Note: package is called kubuntu-restricted-extras for KDE and xubuntu-restricted-extras for XFCE

Therefore, if you install won't need to follow the stand-alone instructions for each as contained below.

Playing Encrypted DVD's (Commercial DVD's)
sudo apt-get install libdvdcss2 gxine libxine1-ffmpeg
Applications, Sound and Video, gxine, choose File (pick DVD), choose View (select desired size). Enjoy

Playing non-native Media formats
For example, Real Player, some Windows video files, and Apple Quicktime
sudo apt-get install w32codecs

MP3 Playback
Amarok is the player that i like the best, so that's the one I show here. There are many others which could be used.
sudo apt-get install amarok
Applications, Sound and Video, Amarok

Another popular application which is starting to gain momentum is banshee. However, the version included in the Ubuntu repositories is pretty old. To install the latest 1.2 release, do the following;
sudo gedit /etc/apt/sources.list

add following line to bottom of file;
deb hardy main
save and exit the editor.

sudo apt-get update
sudo aptitude --with-recommends install banshee-1

Installing Sun Java Support and Firefox Java Plugin
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-plugin

CD-ripping with grip to MP3
sudo apt-get install grip lame
Applications, Sound and Video, grip
Natively, this app will rip to an .ogg file (ogg vorbis). This is a fantastic high-quality open source free format...but if you have a portable device which won't use those can change to MP3 as I show you below.

I like to rip to MP3's on VBR 3 (Variable Bit Rate 3). Here is how I do that;
Open grip, Go to Config tab, encode, change to lame
Changed encoder command line to read: -V 3 --vbr-new %w %m
changed encode file format to read: ~/ogg/%A/%d/%t-%n.%x

The ripped files will be in a folder in your home folder (/home/username) in a subfolder called Ogg.

Installing the Flash Player...for things like YouTube videos
Choose Download .tar.gz for Linux. Choose Save file when asked
Open a terminal
cd Desktop
gunzip *.gz
tar -xvf *.tar
cd install_flash_player_9_linux/
sudo ./flashplayer-installer
when asked for browser install point, enter /usr/lib/firefox-3.0b5

Mounting a Windows share on another computer
sudo apt-get install smbfs
sudo mkdir /mountpoint (you can call mountpoint whatever you like and put it wherever you want)
sudo mount -t cifs //server/share /mntpoint -o username=Windows_user_name

Mounting a Windows share on another computer at boot time
touch /home/user_name/.smbpassword
sudo gedit /home/user_name/.smbpassword
--add the following 2 lines into this file and save
password = NT_Password

sudo chown root /home/user_name/.smbpassword
sudo chmod 600 /home/user_name/.smbpassword

sudo gedit /etc/fstab
--add a line similar to the follow (change to suit tastes)
//server/share /mntpoint cifs credentials=/home/user_name/.smbpassword 0 0

sudo mkdir /mntpoint (obviously you can call this whatever you want)

test mount with;
sudo mount -a

Adding sysvconfig for controlling startup scripts and such (probably not necessary for most people)
sudo apt-get install sysvconfig
sudo sysvconfig
toggle the services which auto start on boot. If there is something you don't need,shut it off and speed up your boot and your machine.

Backing up a DVD (just like DVD Decrypter and DVD Shrink under Windows)
sudo apt-get install k9copy
Applications, Sound and Video, k9copy
select the large movie file, expand the options and select only the items that you want
In the lower right, I suggest removing the check for "Keep original menus"
click the DVD button.
Choose a location for the ISO file
Once completed you can burn the .ISO file. Applications, Sound and Video, Brasero Disk Burning

What apps already come pre-installed on Ubuntu
· FireFox: Web Browser: Applications, Internet
· Pidgin: Instant Messenger: Works with AIM, Yahoo, MSN and many others: Applications, Internet
· Open Office: Word processor, spreadsheet, slide shows, etc. Compatible with MS Office files. Applications, office
· The Gimp: Photoediting software. Similar in function to Photoshop. Applications, Graphics
· Brasero: CD and DVD Burning software. Similar to Nero or Roxio. Applications, Sound and Video
· Transmission: BitTorrent software. Applications, Internet

How to make a transparent terminal window
Start terminal (Applications, Accessories, terminal)
Edit, profiles
Edit default profile
Click on Colors to set your color preference (I like green on black)
Click on Effects to set a Transparent background

How to change the logon screen to something else
On the left, click on GDM themes
Find one that you like, download it. It should be in the format of something.tar.gz
System, Administration, Login Window
click on Local tab at top
Choose add, find the GDM theme that you just downloaded (the something.tar.gz), click on Install
Set the theme to Selected Only
Pick the new GDM theme that you want to use.
Log off and back on.

Edit: You can also find pretty cool GDM themes here:

How can I change the Ubuntu Splash screen that displays when the machine boots and shuts down?
sudo apt-get install startupmanager
sudo apt-get install usplash

Head over to Click on Splash Screens on the left. Find one you like and download.

System, Administration, Startup Manager, appearance tab
At bottom, click on Manage Usplash theme
Find your theme file that you downloaded.

Edit: If your download was a .tar.gz...double click on the file and extract the That's the theme file that you have to point to above.

So, does this thing have a firewall and how do I configure it
Like most distros, Ubuntu uses iptables for firewalling. However, unlike many other Linux distros they don't enable it or turn it on by default
With Ubuntu 8.04, Ubuntu uses a new front-end tool for configuring IPTables called ufw (Uncomplicated Firewall)...unfortunately, if you are very new to firewalling, you won't find this very uncomplicated.

First, let's set a default deny policy
sudo ufw default deny

Second, let's allow remote access via SSH to our Linux box
sudo ufw allow 22/tcp
if you later wanted to delete this rule, you can do so with: sudo ufw delete allow 22/tcp

Finally, once you have some rules in place, you have to turn on the firewall
sudo ufw enable
if you later wanted to shut off the firewall, you can do so with: sudo ufw disable

How can I install software without the Terminal or I don't know the exact name of what I need?
System, Administration, Synaptic Package Manager
Search for what you want, mark it, install/uninstall it

How do I modify the programs in the Applications menu?
System, Preferences, Main Menu

Is there something similar to Task Manager in Windows which shows me system performance?
System, Administration, System Monitor

How can I see how much disk space is free?
sudo df -h

After I download a lot using apt-get, i notice I run low on disk space
apt-get will cache everything it downloads to the hard drive in /var/cache/apt
sudo apt-get clean (erases the cache)

How can I quickly see how much space is being used and where in my file system?
sudo du -h --max-depth=1 / (that is 2 dashes before the word max)

How can I tell which applications are installed and which version?
dpkg -l |less (I piped to less because this is likely a long list

Install frostwire (free LimeWire Pro equivalent application)
Note: if you have problems with the GUI coming up, be sure to install the Java 6 stuff as I did above

Download FrostWire from here

The Ubuntu 7.10 deb file should work fine

Double click on the .deb file, choose Install Package
Applications, Internet, frostwire

If you have problems with "starting connection";
cd .frostwire
remove everything there and replace with everything from this thread:

If you still have problems with starting connection";
set port forwarding on your router for Port 6346 (both TCP and UDP) to your Linux machine IP address

Mounting your NTFS partition if you are dual-booting with XP or Vista

sudo mkdir /windows (or whatever you choose to call this mountpoint)
sudo gedit /etc/fstab

Add following line to bottom
/dev/sda1 /windows ntfs-3g defaults,locale=en_US.UTF-8 0 0
NOTE: Obviously, your Windows partition may be something other than / will need to know where Windows is installed on your machine and substitute appropriately.

Test your configuration
sudo mount -a

Making a full backup of your system which can be re-installed from a cd/dvd using Remastersys

sudo vi /etc/apt/sources.list, add the following to this file:
# Remastersys
deb remastersys/

sudo apt-get update

sudo apt-get install remastersys

To make a live backup of your system and create personal_install.iso
sudo remastersys backup personal_install.iso

To make a live distributable cd/dvd of your current installation and name it custom_install.iso
sudo remastersys dist custom_install.iso
Note: You give this to friends and it has all software installed and updates...just not your own personal files.

When you are done making your isos, be sure to clean up
sudo remastersys clean

How do I remotely connect to my Ubuntu box from a Windows or other Linux host?
The simplest method is with an SSH client
Install the ssh server on ubuntu with;
sudo apt-get install openssh-server

Now, from a Windows host, you can use either Putty, Winscp or any other SSH client
From a Linux host, just use the ssh client preinstalled.

How do I switch to xfce, fluxbox or KDE instead of Gnome?
sudo apt-get install xfce-desktop
sudo apt-get install fluxbox
sudo apt-get install kubuntu-desktop

Now, logout. From Logon screen, click on Options, Choose Select Session and pick your desktop environment. When you then logon, it will ask if you want to use the new session 1 time or make it permanent.