Friday, May 8, 2009

Configuring 64-bit Ubuntu 9.04 (Jaunty Jackalope)

In a previous post, I described my experiences with upgrading from Ubuntu 8.10 to 9.04. The previous post also provides some cautionary notes on upgrading from the ext3 to ext4 filesystems. This post describes the process of configuring 9.04 from scratch, after downloading the ISO file and burning it to CD. (For future troubleshooting purposes, you may also want to download and burn the "alternate" ISO file.) The basic installation was pretty simple: insert the CD, boot the computer, and follow the instructions. The main exception was the partitioning step, especially if the machine had several partitions. I defer to other websites that provide details on the basic installation. In my first try, I started by installing and configuring Firefox extensions, but that was very time-consuming, so I decided to save that for later, in case I would have to re-do my installation. What had forced me to start over in my installation was related to compiz, so I decided to start there, this time, and make sure that part was OK before proceeding with the rest. The specific problem I had run into had come up when I was following the advice at 10 Tips for After You Install or Upgrade Ubuntu. The gist of it is that I tried installing fusion-icon, wound up with the black screen problem that lots of people seemed to be having, went through a whole hassle (documented elsewhere), and decided not to use fusion-icon. On my next try, I also decided not to use compiz, which was also causing unexpected behavior in my system. I also wasn't using wine. Therefore, the 10 Tips, modified for 9.04 and combined with some other tips, so as to do things in the best order, came out as follows:

System > Administration > Update Manager > Check. (This one would ideally be postponed until you've done a couple of these other steps, but it may insist upon being run early in the process, in which case you may want to repeat it later.) Install updates. Restart if advised, and then run Check again, until there's nothing left to update. Applications > Add/Remove > Show All Available Applications. Then search for "restricted extras." Check the box next to "Ubuntu restricted extras." Click Apply Changes > Apply. System > Administration > Hardware Drivers. I was using an nVidia graphics card, and here I saw that my system was not using nVidia drivers, and that I did have a couple options to choose from. I chose to activate the recommended driver. I had to reboot before it would take effect. System > Administration > Software Sources. Go to the Ubuntu Software tab > Download From > Other > Select Best Server > Choose Server. Also, go to the Third-Party Software tab and add other stable repositories. (On that webpage, under the "Install packages" heading, where it says "Display sources.list entries for" choose "The Jaunty Jackalope." Then copy the lines from the text box immediately below that heading. For instance, I copied and pasted these two lines, one at a time, into the dialog box that said,"Enter the complete APT line of the repository that you want to add as source":
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
(Those are each one-line commands.) I had to click "Add" after each one in order to be able to install the next one. Then click Close. This called for a reload of current software information. If you don't get a "Reload" option when you click Close, go back into Third-Party Software and unclick and then re-click some item and try again.
Remove Partition Icons from Desktop. A mere tweak, but while we're doing the 10 Tips, it's easy. Alt-F2 > gconf-editor > Run > apps/nautilus/desktop. Unclick volumes_visible. Close the Configuration Editor. System > Administration > Synaptic Package Manager. Search for each of these items and mark for installation when it comes up: cups-pdf; firestarter; flashplugin-installer; gparted; ntfs-config; p7zip-full; pysdm; and sun-java6-jre. (If numerous items come up in response to your search, click on the Package heading to sort them alphabetically. Also install other related packages, if given the option.) Some of these may ask if you want to "Mark additional required changes?" Click "Mark" and go on to the next one. Then click Apply. (I initially installed, but decided not to keep, compizconfig-settings-manager and emerald. They appeared to be generating multiple problems for others and were not functioning well on my machine.) Some of these programs may already be shown as being installed on your system. If so, no problem.
Next, I closed that and ran Update Manager once more. I went to System > Administration > Firestarter to configure the Firestarter firewall. I had second thoughts after installing it; it seemed that some people had problems with it. It was also said to be a security risk -- something for special needs, not like a Windows firewall that would be highly recommended for general use. I thought about removing it via Synaptic or the command line, but it didn't seem to be bothering me now, so I let it alone.
Then it was time to install some Ubuntu programs that weren't available, or didn't install well, via Synaptic. Installing these called for use of Ubuntu's command line -- which, if you are an accurate typist, can be manageable. These programs were of two kinds. First, there was the previously downloaded program that was too big to download again unless necessary. An example of this was my copy of VMware Workstation 6.5, which was 340MB and had cost me $189.
Downloads typically came in some kind of compressed format, so I had to decompress them before I could use them. To decompress them, I had to run Ubuntu's Places > Computer menu pick. This opened File Browser, which worked like Windows Explorer. In File Browser, I navigated to the folder where I had saved my downloaded .bin file. File Browser's Location field gave me the path for this folder. I copied that path into Ubuntu's Terminal program (Applications > Accessories > Terminal). (If you're used to using Ctrl-C and Ctrl-V to copy and paste, you may have better luck by using the right-click options instead.) Once I was in the right folder in Terminal, I typed "cd [pathname]" which, in my case, was as follows:
cd "/media/CURRENT/Miscellany/Ubuntu Programs"
About quotation marks: in this post (indeed, in my posts generally), don't type them if they just bracket the command. In the previous sentence, for example, you would type the quotation marks in the indented command (i.e., cd "/media/CURRENT etc.), but not the quotation marks in the "cd [pathname]" example. I had to use quotation marks in the indented example because that pathname contains a space (between "Ubuntu" and "Programs"); this space would confuse the CD command otherwise.
At this point, in Terminal, I typed "sudo -i" so that I could execute commands as root (i.e., as administrator). Then the commands I used to decompress these files were as follows:
BIN Files. (The example used here is GoogleEarthLinux.bin, although this program is regularly updated and not that big, and is therefore better installed by a different method that brings you the current version, as described below.) For BIN files, I used this procedure: (1) Type "chmod +x" followed by the .bin filename. Example: chmod +x GoogleEarthLinux.bin. (2) Type "./" followed immediately by the .bin filename. Example: ./GoogleEarthLinux.bin. (If "./" doesn't work, try "sh" -- with no space after ./ but a space after sh). (3) Designate "/home/ray" (with your own username in place of ray) as the installation directory.
BUNDLE Files. Same steps as BIN files.
DEB Files. Right-click on the filename and use GDebi. Click on its "Install Package" button. It seems to know already where it wants to install the files -- not necessarily in or under the directory where the .deb file itself is located.
TAR Files. To install a TAR.GZ file: Copy to /home/ray (replacing "ray" with your username), navigate there in Terminal, and then use this command format: tar -vxf filename.tar.gz (or possibly tar xvfz instead). To uncompress the files (or to get the files out of a tarball), use this format: tar xvf filename.tar. If you have a .tar.bz2 file, use this format: tar yxf filename.tar.bz2.
To install Google Earth, I didn't use a previous download (see above). Instead, I typed this:
wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin
sh GoogleEarthLinux.bin
(That "wget" is supposed to be on the same line as the URL that follows it.)
I got an error message when I tried to start Google Earth:
Google Earth detected an error while trying to authenticate. Please check the following:
- your network connection (can you get to www.google.com?) - your firewall settings (are you blocking /opt/google-earth/googleearth-bin?) Error code: 29 For more information, visit: http://earth.google.com/support/bin/answer.py?answer=20717hl=en
That link didn't work for me. I did find advice to rename the libcrypto.so.0.9.8 file in the google-earth directory (which, by default, was /opt/google-earth) to something else, but that didn't solve the problem this time, so I changed it back to its original name. The solution, for me, was to type "sudo apt-get install lib32nss-mdns." The other problem was that I had to replace the entries in My Places in Google Earth; the ones that I had previously installed (which were still visible after the reinstallation) would cause the program to crash.
Next program: Firefox. Firefox was included with Ubuntu. Updating it depended on the situation. On one machine, I had wiped the partition and was installing Ubuntu from scratch. In that case, I had to fiddle with Firefox extensions. Before wiping and reinstalling, though, I had previously installed the InfoLister extension. This add-on had created an HTML file listing my currently installed extensions. I had kept a copy of that HTML file, and now I opened it. Although the HTML file contained links directly to webpages containing information and downloads for the various extensions, I had found that the fastest way to reinstall these extensions was just to open the Mozilla addons webpage and search for and install them one at a time. (It was not necessary to restart Firefox each time I marked an addon for installation.) I also went to the Categories > Plugins webpage, there at Mozilla, and downloaded the latest versions of the plugins I thought I would be needing. To get YouTube and other videos to play, I tried the alpha version of 64-bit Adobe Flash Player 10. One addon (Snap Links Plus) was available only in a manually installed .xpi form, so I went into Firefox and chose File > Open File and indicated that one for installation. To see what plugins I had installed, I typed "about:plugins" in the Firefox address bar (also accessible by Ctrl-L). I also had to configure the Preferences for a number of add-ons individually (Firefox Tools > Addons). On another computer, by contrast, I was installing Ubuntu 9.04 on top of 8.04, without first reformatting the partition. This kept a bunch of the things I had already installed, including my Firefox extensions. Some were not compatible with 9.04, but otherwise Firefox seemed to run pretty well.
Next, I wanted to make some adjustments to the system. First, I didn't want all those various prior Ubuntu kernels to be listed in the GRUB menu at startup. To edit this, I typed "sudo gedit /boot/grub/menu.lst" and put # symbols in front of each line that I didn't want to appear in the GRUB menu.
I also wanted Ubuntu to mount NTFS drives automatically at bootup. This involved a fair amount of screwing around, on the system where I had installed Ubuntu 9.04 without first uninstalling or formatting the partition where 8.04 was installed. I have detailed those efforts in a separate post.
That was pretty much it, for the update installation -- the one where I installed 9.04 on top of 8.04. For the installation from scratch, I had some additional problems. Here are some brief notes on those:
My dual-boot system was screwed up. When I booted, I got GRUB Error 12. The solution was to remove "makeactive" from the Windows XP entry in /boot/grub/menu.lst, and use GParted to give WinXP the boot flag.
If you may be rearranging your drive partitions (e.g., swapping hard drives), you may want to change the partition references in fstab to refer to UUIDs (which stay with the partition) rather than partition numbers (e.g., sda1) which will change when you rearrange partitions. To do this, open gparted (System > Administration > Partition Editor). Then, in Terminal, type "sudo blkid" to get UUID information for each drive. Type "sudo gedit /etc/fstab" to edit the fstab file. Change each line in fstab that refers to a fixed location, so that it refers to the device's UUID instead. For example, if fstab contains a line that begins with "/dev/sda5" and if blkid tells you that the UUID for that device is 500D33F91G01, then you might want to move the /dev/sda5 to a previous line as a comment, and replace it with the UUID. (Everything after the /dev/sda5 on that line would remain unchanged.) So the line that used to read like this:
/dev/sdaa5 /media/DRIVENAME ntfs-3g [etc.] might now look like this: # Entry for /dev/sdaa5 : UUID=500D33F91G01 /media/DRIVENAME ntfs-3g [etc.] Next: in Nautilus (i.e., File Browser), go to Edit > Preferences > Behavior and make sure the "Always open in browser windows" box is checked. I found a solution to a networking problem in which Ubuntu was unable to connect to the Internet. In one of my installation attempts, I also had to fix a keyboard problem. The solution was to use an alternate keymap code. Although I didn't actually use it, I got a tip that said I could designate programs to open automatically at startup by selecting System > Preferences > Sessions. In response to error: "Unable to lock the download directory," use "sudo pkill apt" OR "sudo killall dpkg."
There's no limit to the number of other things that can be installed and other tweaks that can be made. But the next big step, for me, was installing VMware.

7 comments:

raywood

I forgot to mention: the upgrade installation described in this post was on a different machine from the upgrade installation described in the other post. I don't know why it went so much easier for this machine.

raywood

Another program to install in Synaptic: xfe. It's a Windows Explorer look-alike. There are others worth noting (e.g., GNOME Commander), but at present this appears to be the best replacement for Ubuntu's Nautilus program, for my purposes.

raywood

Further notes on programs to install with Synaptic:

(1) I got some flaky results with xfe and am no longer using it. As I recall, this happened with folders containing large numbers of files.

(2) It seems I should have installed sysinfo as well. Once installed, it was available at Applications > System Tools > Sysinfo.

raywood

Also install fdutils in Synaptic if you have a floppy drive.

raywood

My shutdown button led to two options: log off or switch user. I wanted it to have shutdown and reset options. To change this, I made changes to the panel (or taskbar) where the shutdown button was located. Specifically, I right-clicked on a part of the panel where I would get the option of "Add to Panel." I chose that option and went down until I got to the Shut Down option. Then I closed out of that and right-clicked on the former shutdown button to remove it. Basically, Ubuntu or I had installed a logoff button when what I really wanted was a shutdown button.

raywood

An article in LinuxChronicles (http://linuxchronicles.wordpress.com/2009/01/) suggests additional useful things to do for an Ubuntu 8.10 installation.

raywood

Also install boinc-manager in Synaptic to let different research projects use your computer when you're not using it.