Showing posts with label lucid. Show all posts
Showing posts with label lucid. Show all posts

Wednesday, November 3, 2010

Ubuntu 10.04 upgrade on Toshiba Satellite: TrueType fonts & VSM font

Previous: Ubuntu 10.04 upgrade on Toshiba Satellite: Instiki wiki

To install some favorite TrueType fonts, I installed the basic TT font package:
sudo apt-get install msttcorefonts


To install the very handy Value Stream Mapping font from Ambor, I followed the procedure documented in this blog entry.

Next: Ubuntu 10.04 upgrade: Summary

Tuesday, November 2, 2010

Ubuntu 10.04 upgrade on Toshiba Satellite: Ruby Version Manager

Previous: Ubuntu 10.04 upgrade on Toshiba Satellite: Skype

Installation of rvm went pretty smoothly after the practice I got installing it on the Acer netbook. First step was to install prerequisites:
sudo apt-get install
curl
git-core
build-essential
zlib1g-dev
libssl-dev
libreadline5-dev
Next step was to run curl to do the basic install of rvm:
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Then I edited .bashrc and commented out the line
[ -z "$PS1" ] && return
I noticed I had made a mistake when adding the source line to .bashrc on the Acer. The line should be
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
After that, I executed .bashrc like this
. ./.bashrc
and when I ran
type rvm | head -n1
I got the response
rvm is a function
just as the original instructions said to expect.

Next I ran
rvm install 1.9.2
and it downloaded and installed ruby 1.9.2 and rubygems 1.3.7.

At this point ruby -v said "The program 'ruby' is currently not installed". After I ran
rvm --default 1.9.2
then ruby -v said "ruby 1.9.2p0..." and gem -v said "1.3.7".

I uncommented the line
[ -z "$PS1" ] && return
in .bashrc to see if my guess was right about reinstating it after rvm had been used once. I closed the Terminal window and opened a new one, and ruby -v still worked. I logged out and in again, and ruby -v still worked.

Next: Ubuntu 10.04 upgrade on Toshiba Satellite: Instiki wiki

Ubuntu 10.04 upgrade on Toshiba Satellite: Skype

Ubuntu 10.04 upgrade on Toshiba Satellite: Adobe Flash Player

The last time I checked, there was no 64-bit Skype client for Linux. On http://www.skype.com/intl/en-us/get-skype/on-your-computer/linux/ I found a beta version available, and they showed a 64-bit version available. I downloaded it to give it a try.

No instructions were provided, but I saw by the filename that it was a .deb file. Fellow noobs might recall that Ubuntu is descended from Debian, so we can use Debian utilities on Ubuntu. In Terminal, I ran the following command:
sudo dpkg -i skype-ubuntu-intrepid_2.1.0.81-1_amd64.deb
The installer complained of missing dependencies. I tried apt-get install on the exact names of packages the installer listed:
sudo apt-get install
lib32stdc++6
lib32asound2
ia32-libs
libc6-i386
lib32gcc1
Ubuntu could find no installation candidate for any of these packages.

An Internet search brought me to http://blog.mypapit.net/2007/06/how-to-install-skype-on-ubuntu.html, which mentioned adding deb http://download.skype.com/linux/repos/debian/ stable non-free to Synaptic Package Manager.

I made a backup of /etc/apt/sources/list
cd /etc/apt
sudo cp sources.list sources.list.backup
and edited the file, adding the repository at the end.

When I tried the apt-get install command above, everything was found except list32stdc++6. Another Internet search took me to http://ubuntuforums.org/showthread.php?t=1457771, where someone had reported a similar problem and later posted that an update had fixed it. I tried
sudo apt-get update
but the update complained that it could not find http://download.skype.com/linux/repos/debian/dists/stable/non-free/binary-amd64/Packages.gz.

I went back into /etc/apt/sources.list and commented out the line for that repository, then tried the update again. No complaints, so I tried
sudo apt-get install lib32stdc++6
This time it complained about unmet dependencies, and suggested running this:
sudo apt-get -f install
This did quite a lot, including installing or updating all the dependencies the dpkg command had complained about. It took a while.

To my surprise, it installed the Skype client as well. I called my wife, and she could see me but not hear me. I could see and hear her. We were unable to resolve the problem. Afterwards, I browsed the Internet and eventually found a bug report at https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/584051 that said the internal microphone on Toshiba Satellite laptops doesn't work under Ubuntu 10.04 due to a bug in the alsa driver. It's low priority and they may or may not fix it. Other postings online suggest an external microphone will work. I might try that later.

Ubuntu 10.04 upgrade on Toshiba Satellite: Ruby Version Manager

Ubuntu 10.04 upgrade on Toshiba Satellite: Adobe Flash Player

Previous: Ubuntu 10.04 upgrade on Toshiba Satellite: Prep and basic install

At the time of this installation, Adobe Flash Player for 64-bit Linux systems was still in a preview release. I went to http://labs.adobe.com/downloads/flashplayer10.html and downloaded the tarball for Linux. No installation instructions were provided.

When I unpacked the tarball, I found it contained a single file: libflashplayer.so. The filename jogged my memory, and I looked on this blog for previous notes about installing a non-production version of Flash Player with Firefox. I found it in this blog entry, and copied libflashplayer.so to /usr/lib/mozilla/plugins and restarted Firefox.

Gold!

Next: Ubuntu 10.04 upgrade on Toshiba Satellite: Skype

Ubuntu 10.04 upgrade on Toshiba Satellite: Prep and basic install

Previous: Ubuntu 10.04 upgrade on Acer netbook: Instiki migration

The "upgrade" consisted of a fresh install of Ubuntu 10.04. To prepare for the install, I did the following:
  1. Cleaned up files and directories.
  2. Moved Gnome .desktop files for certain apps from /usr/share/applications to ~/.local/share/applications.
  3. Backed up my /home and /usr directories to an external hard drive
I learned a couple of lessons in the past few months of using Ubuntu. First, I learned that it's possible to define .desktop files under one's home directory. I moved some of these so that they could be backed up and restored with my /home directory. I also learned that there's no particular benefit in a separate partition for /usr.

Before committing to the new release, I ran 10.04 from the installation disk without doing the actual install. I was pleased to see that the 5100 AGN wireless adapter was supported. Everything looked okay to go forward with the installation.

Based on lessons learned, I defined partitions as follows:
ext4    30.0 GB    /        /dev/sda1
ext4 362 GB /home /dev/sda6
swap 8 GB /dev/sda5
The installation went smoothly. I restored /home from the backup.

I checked to see if 10.04 might support the integrated Bluetooth adapter in the laptop, but unfortunately it does not.

I opened a presentation file that contains images to see whether the bug related to hardware graphics acceleration had been fixed in OpenOffice 3.2. Yes!

I opened Firefox and saw that it is now branded as Firefox instead of Shiretoko. Good! I went to http://www.xmarks.com and installed the plug-in, then synced my bookmarks.

On the local system, I went to System -> Preferences -> Appearance and changed the Theme to Radiance.

Next: Ubuntu 10.04 upgrade on Acer netbook: Adobe Flash Player

Ubuntu 10.04 upgrade on Acer netbook: Instiki migration

Previous: Ubuntu 10.04 upgrade on Acer netbook: Ruby Version Manager and Ruby 1.9.2

One final check on the Acer before attempting this install on the Toshiba: Will my local Instiki wiki run under ruby 1.9.2?

First, I installed the usual prerequisites:
sudo apt-get install
libxml2-dev
libxslt1-dev
sqlite3
libsqlite3-dev
gem install sqlite3-ruby
Then, I downloaded the latest Instiki from http://instiki.org/ and unpacked the tarball.

When I started Instiki, it complained:
Bundler couldn't find some gems. Did you run 'bundle install'?
This hasn't happened before in my experience, so I assume it has something to do with running ruby under rvm vs. running it native.

I did an Internet search for 'instiki bundle install' and found useful information at http://golem.ph.utexas.edu/wiki/instiki/show/installation. After reading that information, I thought I had everything in place to run the bundle command, so I ran it from the instiki root directory:
ruby bundle
No complaints, so I started Instiki and it came up clean.

I shut down Instiki and copied the 'public' and 'db' directories from my old wiki (still on the Toshiba) to the one just installed on the Acer. This was sort of a risky short-cut, since I didn't follow any of the instructions for migrating the database. When I started Instiki, it came up clean. Apparently there have been no changes to the basic database structure since the last release. (Whew!)

I noticed that they've added a 'Skip the navigation links' link as the first link in the navigation bar of Instiki. That's a nice accessibility feature and a convenience for anyone who prefers the keyboard to the mouse. Kudos.

At this point, it looked as if Ubuntu 10.04 was okay for the Acer.

(Actually, Ubuntu has been more than just 'okay' for the Acer. IMHO it's a very good environment for a netbook. It's functional, simple, clean, relatively safe, and supports all the usual social networking tools. OpenOffice provides the tools I need to make presentations and so forth when on the road. A $200 machine with a free operating system and all the applications I need ... ideal for the purpose.)

Open questions about how 10.04 would run on the 64-bit Toshiba and whether it would support the wireless adapter could only be answered by installing it on that machine. Installing typical development tools should be no different on either machine, and since I don't use the Acer for development there was no value in going any further with those installs.

Next: Ubuntu 10.04 upgrade on Toshiba Satellite: Prep and basic install

Monday, November 1, 2010

Ubuntu 10.04 upgrade on Acer netbook: Ruby Version Manager and Ruby 1.9.2

Previous: Ubuntu 10.04 upgrade on Acer netbook: Adobe Flash Player

The things I had done so far on the Acer did not tell me much about how 10.04 would play on the Toshiba. I was leery of 5100 AGN support, and the Adobe Flash Player for 64-bit Linux was still in a pre-release state.

Installing software development tools ought to be less problematic than all that. I found that many people were singing the praises of Ruby Version Manager (rvm). It gives you the ability to run multiple releases of ruby on the same machine without having to uninstall and install different releases. It sounded useful, and most of the comments online were very positive.

Following advice on http://web2linux.com/installing-rails-3-on-ubuntu-10-04-lucid-lynx/, I began by installing prerequisites to rvm and ruby:
apt-get install
curl
git-core
build-essential
zlib1g-dev
libssl-dev
libreadline5-dev
I then proceeded to make a series of noob mistakes, and after cleaning off various partial and incorrect installs, this is how I got rvm working. The official installation instructions at http://rvm.beginrescueend.com/rvm/install/ are pretty good, but are not exactly right.

The installation instructions mention three options — install as user, install as root, and system-wide install. I wanted to install as user so that everything would be under /home. That makes it easier to upgrade Ubuntu, since I can restore /home from a backup after doing the basic install. That was my plan for the Toshiba, anyway. For the Acer, I just blew everything away and installed fresh.

First step was to use curl to get the latest version of rvm from head:
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
This step appeared to work. The author, Wayne Seguin, kindly included the following advice in the console output: "Be sure to get head often as rvm development happens fast." Sound advice.

They suggest running
rvm notes
to install dependencies, but in fact it only displays a description of dependencies.

They say you must not have any returns in .bashrc. They specifically call out a line in Unbuntu's .bashrc:
[ -z "$PS1" ] && return
and they recommend wrapping this in an if structure so that rvm will work correctly. I found that after completing the rest of the installation steps, rvm never worked. It turned out that this change is required only for the installation process, and once rvm has been installed you should reinstate the original statement. I changed it to
if [[ -n "$PS1" ]] ; then
return
fi
and afterwards changed it back to
[ -z "$PS1" ] & return
The installation instructions also say to put this line at the end of .bashrc:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
They then say you have to run
source ~/.rvm/scripts/rvm
the first time you use rvm. In fact, you have to run this command every time you want to use rvm. I added the source command to the end of .bashrc, and rvm now works properly.

The other thing to be aware of is that the installation instructions say you run
type rvm | head -n1
and it should display
rvm is a function
Then, you run the source command for the first time. In fact, that results in
rvm is hashed (/usr/local/bin/rvm)
You have to run the source command first, and then rvm will be a function.

Finally rvm was working. I used it to install ruby 1.9.2:
rvm install 1.9.2
and then to make 1.9.2 the default version of ruby (as far as rvm was concerned, anyway):
rvm --default 1.9.2
Good news: It installed rubygems automatically.

Now I could install other gems and run ruby to my heart's content, but only when running as 'user'.

Next: Ubuntu 10.04 upgrade on Acer netbook: Instiki migration

Ubuntu 10.04 upgrade on Acer netbook: Adobe Flash Player

Previous: Ubuntu 10.04 upgrade on Acer netbook: Basic install

I went to YouTube and chose a video at random from the default page. As expected, it prompted me to install the Adobe Flash Player. I clicked on the Adobe link and it took me to the Adobe download page, as expected. There was a 32-bit Linux download for APT, so I chose it. It prompted me to enable the 10.04 Partner Channel. This enables downloads of non-free software for Linux. You must enable this to download the Flash Player. After that, it prompted me for my root password.

After a rather long wait, during which the system gave no indication that anything was happening, I was prompted with the Install Additional Software? dialog, asking Do you want to install package 'adobe-flashplugin'? I chose Install, and the installation appeared to work fine. When I tried the YouTube video again, it prompted me again to download the Flash Player, as if it couldn't find the one I had just installed. This time, I clicked on the Install Additional Plugins link instead of the Install Adobe FlashPlayer link.

This time, I got a list of available plugins. I highlighted Adobe Flash Player (installer) and clicked Next. That brought up the Install Additional Software? dialog, asking Do you want to install package 'flashplugin-installer'? I clicked Install. It removed the adobe-flashplugin package I had just installed, and installed flashplugin-installer. This took a long time. The installation appeared to work.

Now I was able to play YouTube videos.

So, the key to success here is to use the Install Additional Plugins link instead of the direct link to Adobe.

Next: Ubuntu 10.04 upgrade on Acer netbook: Ruby Version Manager and 1.9.2

Ubuntu 10.04 upgrade on Acer netbook: Basic install

Previous: Border around images in OpenOfficeImpress

Time for me, a not-on-the-bleeding-edge user, to upgrade to Ubuntu 10.04. I had problems using 9.10 on my Toshiba laptop due to problems in support for the Intel 5100 AGN wireless adapter. Various bugs were reported regarding Linux support for that product. I've been running 9.04 on the Toshiba and 9.10 on the Acer netbook. Oddly, 9.04 supports the 5100 AGN just fine, while later releases do not.

The Toshiba is my main workhorse, and I use the Acer for presentations and meetings as well as a host for a Windows XP instance that I need for two particular applications. Because it's easy to install Ubuntu alongside Windows using Wubi, I decided to approach the upgrade cautiously by installing on the Acer first. My thought was this would minimize the risk of messing up my primary machine. This approach would not tell me whether 10.04 supported the 5100 AGN wireless adapter, or whether it would be possible to get the 64-bit version of Adobe Flash Player working, but it would at least identify any major issues with the new release.

The Wubi install is different from a straight install from an iso disk. I booted into Windows XP, downloaded the Wubi installer, and ran it with
wubi --32bit
The installer recognized that Ubuntu was already installed and offered to remove it. I chose Yes, the installer removed Ubuntu 9.10, and exited. I ran the command a second time, exactly the same way, and this time it downloaded the installation files and proceeded with the installation. This took quite a while, but completed without any problems.

The first thing I noticed was that it was hard for me to read the display and to distinguish the edges of windows. It seems the default desktop theme for 10.04, Ambiance, is based on a color palette of black, dark black, deep black, and pitch black. I changed the desktop theme to Radiance, which has a lighter color palette. The default on 9.04, Human, was not listed as an option. Radiance is similar.

Now that I could read the display, the next order of business was to slow down the mouse a bit. By default, 10.04 ships with the mouse set to very fast and very sensitive; that is, the sliders are about half-way between minimum and maximum. I changed the settings to be more compatible with my slow, old hands, after some difficulty in making the mouse cursor land where I wanted it.

The next thing I noticed was that .bash_aliases is called by default from .bashrc. In 9.04, those lines are commented out by default in .bashrc. I think the 10.04 default makes more sense. I put some of my favorite aliases into .bash_aliases and began to check out the new version of Ubuntu.

Next: Ubuntu 10.04 upgrade on Acer netbook: Adobe Flash Player