Category: How To

3D Acceleration for VMWare Player

I noticed a message saying that I did not have 3d acceleration in my virtual image with VMWare player. I didn’t really need it as all I was doing was using the PeopleSoft IDE and a web browser, but I wondered if it would improve performance. I will probably never know if it made a difference other than get rid of the message.

The fix was to install driconf and enable “S3TC texture compression even if software support is not available”.

Installing driconf was as easy as:
sudo apt-get install driconf

Run driconf from the command line with the command:
driconf

Go to the “Image Quality” tab, and click “Yes” for “Enable S3TC texture compression even if software support is not available”

driconf

Resources

3D Acceleration on Intel X3100

Olympics in Linux

I went to watch the Olympics on my Linux laptop, and I didn’t have the correct plugin.  I found a post that pointed me to installing the Moonlight plugin.  It pointed to a website with both the download link and the installation instructions.  Now, I already had Mono installed from the repositories, but all I had to do was install the XPI addon for Firefox that I downloaded from the website.

Resources

Installing Office 2007 on Ubuntu

Here is a little script that I put together that installs Office 2007 for me.

Now, this script makes the following assumptions:

  • I already have a directory created called wine in my home directory.
  • I want Office installed in a separate directory/wineprefix
  • I have the Office CD mounted already at /media/cdrom0
  • I have winetricks in my path (which winetricks = /usr/local/bin/winetricks)

Also, just for information, here is my setup

  • Ubuntu 8.10
  • Wine version 1.1.16
  • I believe I installed Wine with apt-get using the repository at http://wine.budgetdedicated.com/apt
export WINEPREFIX=$HOME/wine/office2007

mkdir $WINEPREFIX
winetricks msxml3 dotnet20 gdiplus riched20 riched30 vcrun2005sp1 allfonts ie6
winetricks vista
wine /media/cdrom0/setup.exe
winetricks winxp

I hope it helps.

NavIt

I was having trouble downloading the maps for RoadNav, and I didn’t notice a lot of progress or change on the problem.  So, I checked for alternatives, and I found this.  I tried the first on the list: NavIt.

Installing

I didn’t find NavIt in the Ubuntu repository, and so, I had to install manually.  The Wiki has a getting started section with instructions for installing on Linux.

First, I had to install the dependencies so that I could compile it.  I installed the list from the dependencies section.

sudo apt-get install build-essential pkg-config automake libglib2.0-dev libtiff-dev libtool libxmu-dev libfribidi-dev gettext zlib1g-dev gpsd gpsd-clients libgps-dev libgtk2.0-dev freeglut3-dev glutg3-dev libcegui-mk2-dev libdevil-dev libglc-dev libpcre3-dev libmng-dev libfreeimage-dev

Next, I ran the configure and make.  Instead of installing, I just ran it from the directory where I compiled it.

Configuring

At this point, I had it working as long as I ran it from the directory where the program exists.  But, it didn’t have any maps for my area.  Next, I had to tackle configuring with the XML file.

First, I created a hidden directory and copied the xml file to it:

$ mkdir ~/.navit
$ cp /home/skp/bin/navit-0.1.0/navit/navit.xml  /home/skp/.navit/

Next, I opened the xml file with Gvim (my favorite text editor).  “Gvim ~/.navit/navit.xml”.  You could use any text editor to open it.

The first change I made was to change the default position.  I got my default coordinates from here as suggested in the Wiki.  I found that these coordinates got me close, but not quite the address I had requested.  So, I checked them with Google maps.  If you notice, the URL on the “Link” link in the upper right corner has the coordinates of the map you request.

I tried to run it at this point from my home directory, but it would not work.  It was looking in other directories, and so, I took the easy route and just keep running it from the source directory.  It still read my xml file from my home directory.

Next, I had to setup the maps.  I followed these directions.  I used the maps from CloudMade, which has maps of the United States.  I downloaded the *.navit.bin.zip files and extracted them to ~/.navit/.  For example, I downloaded the Florida map: florida.navit.bin.zip to ~/.navit/florida.navit.bin.  Finally, I added this to the XML file:

<mapset enabled=”yes”>
<map type=”binfile” enabled=”yes” data=”/home/skp/.navit/florida.navit.bin” />
</mapset>

Now, when I started it up, I saw a map with where I wanted it to start!

Creating a Shortcut

The last thing  I did was create a shortcut in my application menu.  This was pretty easy.

The first step was to create a simple shell script to launch the program.  This was necessary because the program has to run from the source folder.  Here is what my script looked like:

#!/bin/sh

cd ~/bin/navit-0.1.0/navit
./navit

Note: change the cd path to the location where you downloaded and compiled the program.

Then, make the script executable with:

chmod +x navit.sh

To add the menu, I used the Menus application by right clicking on the Applications menu and choosing “Edit Menus”.  I clicked on the Accessories menu and clicked the New Item button.  Here are the options that I chose:

  • Type: Application
  • Name: NavIt
  • Command: /home/skp/bin/navit.sh
  • Comment: <blank>

Note: change the Command path to the script that you created to launch the program.

For the icon, I clicked on the little spring icon on the left to choose a different icon.  For the path, I chose: /home/skp/bin/navit-0.1.0/navit/xpm/desktop_icons/128×128.

To troubleshoot, you may want to change the Type from Application to Application in Terminal because the terminal window will show you the output messages from the program.

Bootable ISO to USB Drive

I was trying to boot the Trinity Rescue Kit without having to burn a CD.  I never did get it to work, but I did get the Ubuntu ISO to boot.

Method 1 (didn’t work for me)

Step 1.  Download the ISO File.  Save it to a directory where you can browse to it.

Step 2.  Browse to the downloaded file.  Right click and choose “Open with ‘Archive Manager’.  (This is for linux.  You could use 7-zip in Windows, maybe WinZip).

Step 3.  Insert the USB Drive; notice where it mounts the drive.  For me it was at /media/disk.

Step 4.  Extract the ISO file by clicking the Extract button in Archive Manager.  Enter the path where the USB drive was mounted for the destination path.

This didn’t work for me.  I am assuming there is more to it than just copying the files onto the disk.

Method 2

Step 1.  Download  UNetbootin.

Step 2.  You need to make the file bootable.  I ran chmod +x unetbootin-linux-299.

Step 3.  When I ran it the first time, it told me that it needed mtools installed.  This was easy to install with: sudo apt-get install mtools

Step 4.  Run it from the terminal with ./unetbootin-linux-299

Step 5.  Choose the diskimage and pick the iso file.

Step 6.  Then, click OK

This worked on Ubuntu, but not on TRK.  When it booted into Ubuntu, it gave me a UNetBootin boot menu, and then it booted all the way into Ubuntu 8.10.

Resources

.iso to USB

Ubuntu: Installation from USB Stick

UNetBootIn

WebDav and fstab

We have a webdav enabled web site that I wanted to connect to on a regular basis.  I wanted it to mount on my filesystem as opposed to just using it in nautilus so that I could use meld to copy files to it.

So, I added a line to the end of /etc/fstab   (sudo gvim /etc/fstab):

https://mywebsite/~docs    /dir/to/mount/on    davfs    user,noauto,rw    0    0

Then, I added the following line to /etc/davfs2/secrets:

https://mywebsite/~docs    myusername    mypassword

Originally, I had just the unsecure http:// url.  But, it gave me this error:

/sbin/mount.davfs: Mounting failed.
401 Unauthorized

I fixed it by changing the urls to https://.

When I mounted it as root, it worked fine.  But, when I mounted it as my regular user, I got this message:

/sbin/mount.davfs: program is not setuid root

To fix it, I had to run this command:

sudo chmod u+s /sbin/mount.davfs

Then, I changed the file /etc/davfs2/davfs2.conf.  I changed the dav_group setting.  For me, I found a line that said “dav_group staff”.  I replaced staff with my username, which is my default group.  The thread I read mentioned using the users group.

Resources

Gpsd: Fixing for Ubuntu

I have an LT-20 Delorme Earthmate GPS.  It may not be the best GPS, but it gets the job done.  Getting it to work in Ubuntu was no easy feat.

I had to fix a bug in a cypress module.  I followed the instructions from here.

To get the kernel version, I ran:

uname -r

Then, to install the kernel source, I ran:

sudo apt-get install linux-source-2.6.24

Then, I changed directories into the installation directory and unzipped the source:

cd /usr/src
sudo tar -xvf linux-source-2.6.24.tar.bz2

Then, I copied the two files:

cd linux-source-2.6.24/drivers/usb/serial/
sudo mkdir /usr/src/modules
sudo cp cypress_m8.h cypress_m8.c /usr/src/modules/

Next, I created the make file (note that I have installed gvim.  I saw a note saying that they had problems using the gedit text editor):

cd /usr/src/modules
sudo gvim Makefile

And, I pasted these lines into the Makefile:

obj-m := cypress_m8.o
KDIR := /lib/modules/

$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

Then, I edited cypress_m8.c and commented out line 408.  The original instructions have more detail on this.  I thought the line number might be different, but it was the same as the original instructions.

When running make (sudo make) I had trouble with “make: Nothing to be done for `default’.” message.  I just opened the file and deleted and readded the tab in front of the last line.  Then, it ran fine.

Then, I ran the command:

sudo install -m 644 cypress_m8.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/cypress_m8.ko
sudo depmod -a

Resources

Screenlets

From Desklets to Screenlets

I tried to install gDesklets, but I had trouble with them.  I found a post that explained how to do it in Ubuntu.  And, I found a package in the Fedora repository for yum.  But, I had the following problems:

  • I never could get the good weather applet to work.
  • I couldn’t get the shortcut key to work for bringing them to the front.
  • The icon displayed by the clock, but it didn’t seem to do anything when I clicked on it (either left or right click)

So, I decided to try screenlets instead.  Maybe I am a little impatient, but I had had trouble with them in Ubuntu too.  I thought a change of scenery might me nice.

Installing Screenlets

To save you a few steps, you might want to run the following command right now.  That will save you from the errors I got as I went through:

yum install python-devel gnome-python2-gnomekeyring

I found the installation instructions on the FAQ.  I found the latest download on the main page at launch pad. I downloaded it to my Download directory and ran the following in a terminal:

cd ~/Download
tar -xzvf screenlets-0.1.1.tar.gz
cd screenlets
sudo python setup.py install

I did get the following error:

error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile (No such file or directory)

That was easily fixed by using yum to install python-devel (see this post).

At this point, screenlets was installed, but the next step was to configure it.  I ran:

screenlets-manager

That command gave me this error message:

ImportError: No module named gnomekeyring

This was easily fixed by using yum to install gnome-python2-gnomekeyring (see this post).

After fixing that, the Screenlets Manager opened, and that was all that I had to do.  I rebooted at that point, not that I had to, but I wanted to for another reason.  Amazingly enough, the screenlets was already running by the clock.  I didn’t need to do anything to get it to auto start.

Adding Screenlets

I chose to add the following screenlets:

  • Battery: Displays the battery status of my laptop
  • GMail: I added my email address, and it displays how many messages I have unread
  • Weather: I added my zip code, and it shows the weather for my area
  • SysMonitor: Displayed info about my computer
  • DigiClock: A simple digital clock

Displaying/Hiding

When I first added the screenlets, they were on the top all of the time.  But, I found that I could hide them by making them a widget and removing the Keep Above option:

right click > Window > Widget (checked)
right click > Window > Keep above (unchecked)

Then, I had to configure Compiz.  I opened the CompizConfig Settings Manager, and found Widget Layer under Desktop.  I checked this option, and then looked at the settings.  F9 was the shortcut key, and I added the bottom right corner as another option.

Installing More Screenlets

  • Download the screenlet you wish to install (you don’t need to unzip it)
  • Open the Screenlets Manager
  • Click the Install option on the left panel
  • Choose “Install Screenlet”
  • Browse to the location where you saved the screenlet
  • Find the new Screenlet in the list and start it

Here are the additional Screenlets I downloaded:

Gnome Do Issue

I installed Gnome Do and really like it.  Just one problem: the keyboard shortcut would not work!  Here is what I did to fix it:

Start Key (Super Key) Issue

From this thread, I found that I could create this text file —

File Name: $HOME/.xmodmaprc
Put the following two lines in the text file:

keycode 115 = Super_L
add Mod4 = Super_L

Run the following command in a terminal window:

xmodmap ~/.xmodmaprc

The Start key worked right away, but when I rebooted, it asked me if I wanted to load the file.  I put the file in the loaded column and it continued to work after the reboot.

Gnome Do Shortcut

I decided to change the command from Start + Space to Start + R (like Windows Start … Run).  Here is what I did:

I used Yum to install gconf-editor.  You may already have the tool, but I did not.

Then, I opened the Configuration Editor — Applications > System Tools > Configuration Editor.

On the left side, I opened the path: / > apps > gnome-do > preferences.

Then, I changed the key_binding on the right to <Super>r.

Resources

Umm… My Super Key Just Stopped Working…

Shortcut not launching gnome-do