Wednesday, January 23, 2008

issue of libgtkembedmoz for Acrobat 8.1 reader

When starting the acrobat reader 8.1, I got an error message that libgtkembedmoz cannot be found.

Fixed this issue by reading the link of http://blogs.adobe.com/acroread/reference/.

In sum, run "ldd `which yelp` | grep libgtkembedmoz" and then put the corresponding directory (/usr/lib/firefox for my situation) in the Edit->Preferences->Internet->libgtkembedmoz folder. This fixed the issue.

Tuesday, January 8, 2008

Man pages for development

Today I met a problem when run "man fopen" on Ubuntu. The error I got is "No manual entry for fopen". This turns out to be caused by the missing of manpages-dev. After installing this package, I can get the manual for system calls and library calls.

Friday, January 4, 2008

sshfs

I used to use sshfs on SuSE. A very handy tool. Here is a HOW-TO on Ubuntu 7.10.
1. install the sshfs package.
sudo apt-get install sshfs
2. add user to the group of fuse to allow the user to mount sshfs file systems.
sudo usermod -a -G fuse $username
3. fix a bug
My Xbuntu os's /etc/mtab is a symbolic link to /proc/mounts, and I met an issue below.
Nabble - Bug#447621: libfuse2: fuse fails if /etc/mtab is a symlink to /proc/mounts

I did the following to fix the issue.
sudo cp /etc/mtab /etc/mtab.bak
sudo rm /etc/mtab
sudo mv /etc/mtab.bak /etc/mtab
4. Now you can try "sshfs $user@remotehost:$location $mountpoint".
5. To mount sshfs easier, you can put an entry in /etc/fstab.
sshfs#user@$remotehost:[$path] $mountpoint fuse user,noauto 0 0
If you want other users to be able to access the directory, you can specify
user_allow_other in /etc/fuse.conf. And then put the option of allow_other or
allow_root into /etc/fstab.
If you want to be able to execute a program in the sshfs mounted, you can specify the mount option of exec in the entry in /etc/fstab.

Login windows fonts too large for Ubuntu 7.10

The system I installed with Ubuntu 7.10 has a problem that the fonts of the login windows is too big such that I cannot see the user name I typed.

To fix this, select the menu of System->Administration->Login Window. A window will be shown for Login Window Preferences. Select the tab of security and click the "Configure X server" at the bottom of the tab. A pop up dialog of "X Server Login Window Preferences" will be shown. Under the topic of "Server settings" there is a field of "Command", append "-dpi 96" to the existing value and reboot the machine. Should be fixed now.

Thursday, January 3, 2008

Using Shared folders feature of VirtualBox

The VirtualBox has a neat feature of "shared folders" between host and guest. Here is description of how to do it on Ubuntu 7.10

The shared folders are folders on the host that can be shared by the guest. First, you need to create shared folders via the GUI by adding the folders on the host and give names for them. I created a shared folder of /home/$myaccount/work and give it a name of work.

The other things to be done is on the guest side.
I created a directory of /home/$myaccount/work on the guest os.
To mount the directory, the following command can be run
sudo mount.vboxsf work /home/$myaccount/work
or
sudo mount.vboxsf work ~/work

It is interesting that the following commands will not work
sudo mount -t vboxsf work /home/$myaccount/work
/sbin/mount.vboxsf: mounting failed with the error: Protocol error
This maybe is because sudo mount -t vboxsf is different from sudo mount .vboxsf.
It is found that after you ran sudo -i to get a shell, the command of
mount -t vboxsf work /home/$myaccount/work will work.

To mount the shared folder easier and writable by the my account, the following line was added to /etc/fstab.
"work /home/$myaccount/work vboxsf rw,gid=$mygid,uid=$myuid,auto 0 0"

In addition, I appended the following in the .bashrc
mount | grep work 1>/dev/null 2>&1
if [ ! $? ]; then
sudo mount.vboxsf work ~/work
fi

This way whenever I logged in the shared folder is accessible.

Wednesday, January 2, 2008

Wireless Support of Host Interface for VirtualBox

It is know from various posts online that simply using bridged networking won't work for a wireless card. I followed the following link to configure host interface for my wireless card on ubuntu 7.10

Bridged Networking with VirtualBox on Linux Hosts

However, there is one important thing missing that makes the networking of the guest os unstable, sometimes connect to the host or internet. I turned on tcpdump and also run netstat and find out the reason why sometimes the networking will fail in the guest. It seems that every time when networking is working, there is a route that tells host to connect to guest to use tap0. Sometimes the route is not there and the guest's networking will fail.

With this information I run "ip route add $guestip dev tap0" and found this makes the networking of the guest very stable and always working.

Here are a couple of approaches to make life more easier.

Google toolbar v5 issue on Ubuntu 7.10

I installed the Google toolbar v5 for firefox on ubuntu 7.10. It doesn't function well, firefox easily freezes and the bookmark doesn't function, hanging with a message of loading bookmarks. After some search online, this problem is solved by the following steps:
1. Uninstall the Google toolbar v5 first, and restart firefox to make it take effective.
2. Install libstd++5 and its dependent packages.
3. Install the Google toolbar v5 again.

After this, everything works fine.

Adobe flash player not working for Ubuntu 7.10

Ubuntu question #19584: “Adobe flash player not working”

Below is a quote from the link:

"This is not your fault. This is a very recent bug, caused by Adobe's update of Flash 9.0 update 3 (9.0.115.0) codename 'Moviestar' on December 4th.

http://www.adobe.com/aboutadobe/pressroom/pressreleases/200712/120407adobemoviestar.html

This caused Ubuntu to not install the flash plugin, detecting a change in the flash plugin installer file (via MD5 checksums). See bug 173890. This bug has been fixed in the next release of Ubuntu (Hardy 8.04) and it should soon come as an update to Ubuntu 7.10.

If you want an immediate fix, do the following.

Using Synaptic Package Manager, remove the package flashplugin-nonfree. For more information on how to do this, see the Ubuntu documentation here: https://help.ubuntu.com/7.10/add-applications/C/advanced.html#synaptic

Alternatively, you can run this command in the Terminal (Applications -> Accessories -> Terminal): sudo apt-get remove flashplugin-nonfree

Then just download this package (32-bit only) and install it (it is identical to the current package in the next release of Ubuntu, Hardy 8.04): http://launchpadlibrarian.net/10761023/flashplugin-nonfree_9.0.115.0ubuntu2_i386.deb

If you have 64-bit Ubuntu (not likely or recommended for a person new to Ubuntu), you currently need to build a binary package from this source package: http://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/9.0.11"

Tuesday, January 1, 2008

Install VirtualBox on Ubuntu 7.10

After downloading the VirtualBox 1.5.4, right click the package and click install. The package will be installed.

After the installation, you can run a command of "sudo usermod -a -G vboxusers $username" to add the current user to the group of vboxusers. This is needed because the user to run VirtualBox needs to access virtualbox device.

Download the iso of Xubuntu Desktop to local. Add a new virtual machine, and use the ISO file as the CDRom image.

Then I met a problem when trying to configure devices for a virtual machine. The error message is "Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer."

This bug is https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/151585.
And to solve the problem
"Please open the following file: /etc/init.d/mountdevsubfs.sh
Find the following lines:
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb
Unmark them".

Reboot the machine. And the error is solved.

Configure the networking, enable one ethernet adapter and use NAT. Start powering the virtual machine and install the Xubuntu as the guest os.

Install the Guest addition:
1. Click the menu of "Device->Install Guest Additions...", then start a terminal in Xubuntu and run "cd /media/cdrom0" and "sudo bash VBoxLinuxAdditions.run" to install the guest addition.
2. Reboot the machine to make the guest addition take effect.

Make the full screen higher resolution:
Need to edit the file of /etc/X11/xorg.conf in the following section
Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Modes "800x600"
EndSubSection
EndSection

Add a mode of 1280x800 in the line of "Modes", the line will became
Modes "1280x800" "800x600"

After this is done, log out and you got a full screen now.