Category: How To

Mar 29 2009

HOWTO: Install Watchtower Library on Ubuntu Linux

Updated for Watchtower Library 2008

Install latest wine.

sudo apt-get install wine

As of this writing, I’m using Wine version 1.0.1

1. Pop in the CDROM and double click on Setup.exe icon when the Nautilus window pops up.

2. Run the install as normal. When finished, there should be two icons on your desktop. You can delete the ugly Watchtower Library XXXX.lnk icon. Keep the colorful one.

Your done!

Updated for Watchtower Library 2007

Install latest wine.

sudo apt-get install wine

As of this writing, I’m using Wine version 0.9.46

1. start from scratch (remove ~/.wine directory)

2. run winecfg. Chose “Windwows XP” as windows version. Close app.

3. Pop in the CDROM and double click on Setup.exe icon when the Nautilus window pops up.

4. Run the install as normal. When finished, there should be two icons on your desktop. You can delete the ugly Watchtower Library XXXX.lnk icon. Keep the colorful one.

At this point you could just launch Watchtower Library and it will work. However, if you want the tooltips to work (the floating yellow boxes) you will need to tell wine to use a version of comctl32.dll from an existing Windows installation. Keep going if you want the tooltip functionality, otherwise your done!

5. Copy comctl32.dll from a Windows XP (license is needed for this) :-(
(Note: The comctl32.dll from Windows 2000 works even better.)

cp comctl32.dll ~/.wine/drive_c/windows/system32/

Newer versions of wine include a file called ~/.wine/drive_c/windows/winsxs/manifests/x86_microsoft.windows.
common-controls_6595b64144ccf1df_6.0.0.0_none_deadbeef.manifest
. This file prevents the comctl32.dll that you just copied from loading. I just rename the file to something else like this:

mv ~/.wine/drive_c/windows/winsxs/manifests/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.0.0_none_deadbeef.manifest ~/.wine/drive_c/windows/winsxs/manifests/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.0.0_none_deadbeef.manifest.bad

6. Run winecfg again.

7. On the “Applications” tab Click “Add Application” and browse to “Program Files\Watchtower\Watchtower Library XXXX\E” and double click on WTLibrary.exe.

8. With WTLibrary.exe highlighted on the “Applications” tab, click on the “Libraries” tab. In the “New Override for Library” box select “comctl32″. In the “Existing Overrides” box select “comctl32″ and click on the edit button. Select “Native then builtin”. Press “OK” until the winecfg box goes away.

9. The “M” and “*” marginal reference special characters do not display in the tooltips. To get this functionality you need to copy these files to the ~/.wine/drive_c/windows/fonts directory. These are fonts released under the GPL (see font information in the ttfs; the fontforge originals are found in the sources subdirectory).

10. Launch Watchtower Library. Everything should be working except that some of the icons will now have a black background. This is an issue with the comctl32.dll. Experiment with other comctl32.dll files from other versions of Windows. If you find one that works better let me know.

Mar 11 2009

HOWTO: Enable Eject button on Dell XPS M1530 in Ubuntu

Simply add this to /etc/sysctl.conf:

# Unlock the CDROM eject button
dev.cdrom.lock=0

You have to restart for it to take effect.

Mar 11 2009

HOWTO: Enable finger print reader on Dell XPS M1530 in Ubuntu

To enable the finger print reader on a Dell XPS M1530 in Ubuntu 8.10 follow these steps:

After installing from the normal repositories coming with Ubuntu 8.10, you would have to press enter after sweeping finger. (This bug: https://bugs.launchpad.net/ubuntu/+source/thinkfinger/+bug/256429) Therefore Jon Oberheide made an update that can be found here: https://launchpad.net/~jon-oberheide/+archive

Add the PPA repositories to your source.list (/etc/apt/source.list):

deb http://ppa.launchpad.net/jon-oberheide/ubuntu intrepid main
deb-src http://ppa.launchpad.net/jon-oberheide/ubuntu intrepid main

Update installer:

$ sudo apt-get update

And install:

$ sudo apt-get install thinkfinger-tools

Now the driver is installed and should be working. You can try it with

tf-tool --acquire
tf-tool --verify

This will ask you to swipe your finger three times and save the fingerprint to ~/.thinkfinger.bir

Now we need to configure PAM to use finger print reader to authenticate.
Open /etc/pam.d/common-auth:

sudo /etc/pam.d/common-auth

On Ubuntu 8.10 - Intrepid Ibex you should just edit the section of the file that contains the pam_unix.so line so it looks like this:

....
# here are the per-package modules (the "Primary" block)
auth	sufficient	pam_thinkfinger.so
auth	[success=1 default=ignore]	pam_unix.so try_first_pass nullok_secure
# here's the fallback if no module succeeds
....

Save the file and reboot. You should now see the option to “Swipe your finger” at login and when issuing sudo commands.

Mar 11 2009

HOWTO: Fix lame touchpad speed on Dell XPS M1530 in Ubuntu

Ubuntu 8.10 Intrepid Ibex

New Xserver in Ubuntu 8.10 requires changing settings via HAL instead of xorg.conf file. To change touchpad’s settings in HAL you have to create new .fdi file:

gksudo gedit /etc/hal/fdi/policy/xps-touchpad.fdi

and fill it with:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
 <device>
  <match key="input.x11_driver" string="synaptics">
   <merge key="input.x11_options.LeftEdge" type="string">120</merge>
   <merge key="input.x11_options.RightEdge" type="string">830</merge>
   <merge key="input.x11_options.TopEdge" type="string">120</merge>
   <merge key="input.x11_options.BottomEdge" type="string">650</merge>
   <merge key="input.x11_options.FingerLow" type="string">14</merge>
   <merge key="input.x11_options.FingerHigh" type="string">15</merge>
   <merge key="input.x11_options.MaxTapTime" type="string">180</merge>
   <merge key="input.x11_options.MaxTapMove" type="string">110</merge>
   <merge key="input.x11_options.ClickTime" type="string">0</merge>
   <merge key="input.x11_options.EmulateMidButtonTime" type="string">75</merge>
   <merge key="input.x11_options.VertScrollDelta" type="string">10</merge>
   <merge key="input.x11_options.HorizScrollDelta" type="string">0</merge>
   <merge key="input.x11_options.MinSpeed" type="string">0.45</merge>
   <merge key="input.x11_options.MaxSpeed" type="string">0.95</merge>
   <merge key="input.x11_options.AccelFactor" type="string">0.06</merge>
   <merge key="input.x11_options.EdgeMotionMinSpeed" type="string">200</merge>
   <merge key="input.x11_options.EdgeMotionMaxSpeed" type="string">200</merge>
   <merge key="input.x11_options.UpDownScrolling" type="string">1</merge>
   <merge key="input.x11_options.CircularScrolling" type="string">0</merge>
   <merge key="input.x11_options.SHMConfig" type="string">true</merge>
  </match>
 </device>
</deviceinfo>

then:

sudo /etc/init.d/hal restart

and restart Xserver (Ctrl+Alt+Backspace)

Mar 11 2009

Installing Ubuntu on a Dell XPS M1530 - Ubuntu Wiki

via Installing Ubuntu on a Dell XPS M1530 - Ubuntu Wiki.

Feb 03 2009

Google Earth 5.0 Crashes on Ubuntu Linux

It installed okay using the shell script but I get this error when I try to run:

/opt/google-earth/googleearth-bin: relocation error: /usr/lib/i686/cmov/libssl.so.0.9.8: symbol BIO_test_flags, version OPENSSL_0.9.8 not defined in file libcrypto.so.0.9.8 with link time reference.

It opens the splash screen, then the main screen and the startup tip window, which is blank, then it crashes.

I fixed it by renaming /opt/google-earth/libcrypto.so.0.9.8 to /opt/google-earth/libcrypto.so.0.9.8.bak. This forces google-earth to use systems libcrypto.

Nov 19 2008

Where’s my /dev/fd0 ?

I just tried to mount a floppy disk on a new Ubuntu Hardy 8.10 installation and found that there was no /dev/fd0 device. The fix was to add the following line to /etc/modules:

floppy

Then reboot. (or type: sudo modprobe floppy)

Nov 10 2008

HOWTO: Get USB working with Virtualbox 2.0 in Ubuntu 8.10

1. Install VirtualBox-2.0

Add repository to /etc/apt/sources.list and install Virtualbox-2.0

echo "deb http://download.virtualbox.org/virtualbox/debian intrepid non-free" | sudo tee -a /etc/apt/sources.list
wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -
sudo apt-get update && sudo apt-get install virtualbox-2.0

2. Configure Ubuntu for VirtualBox-2.0

Add yourself to the vboxusers group

sudo gpasswd -a `whoami` vboxusers

Startup vboxdrv module on boot by appending it to /etc/modules

echo "vboxdrv" | sudo tee -a /etc/modules

3. Usb Filesystem fix

Get the vboxusers group id

cat /etc/group | grep vboxusers

vboxusers:x:128:spirit

Edit /etc/fstab to add these two lines and replace the devgid with the vboxusers group id

#usbfs for virtualbox
none /proc/bus/usb usbfs devgid=128,devmode=664 0 0

4. Kernel usbcore fix

check your current kernel version

uname -r

2.6.27-7-generic

Get the sources for your kernel and fix usb/core/devio.c

sudo apt-get build-dep linux-source-2.6.27
sudo apt-get install linux-source-2.6.27 build-essential
tar -jxvf /usr/src/linux-source-2.6.27.tar.bz2
cd linux-source-2.6.27/drivers/usb/core
perl -pi.bak -e 's/16384/131072/' devio.c
make -C /lib/modules/`uname -r`/build/ M=`pwd` modules
strip --strip-debug usbcore.ko
sudo install -m644 -b usbcore.ko /lib/modules/`uname -r`/kernel/drivers/usb/core
sudo depmod -ae
sudo update-initramfs -u

Reboot your system and check if vboxdrv is running

lsmod | grep vbox

vboxdrv 72472 0

The VirtualBox manager can be found under Applications/System Tools. You should see the USB options in the settings. You can add the devices you want.

Oct 28 2008

HOWTO: Copying a Filesystem between Computers

If you need to transfer an entire filesystem from one machine to another, for example, when you get a new computer, do the following steps.

1) Boot both PCs with any Linux live CD (for example, Knoppix), and make sure they can access each other via the network.

2) On the source machine, mount the partition containing the filesystem to be copied, and start the transfer using netcat and tar:

cd /mnt/sda1
tar -czpsf - . | pv -b | nc -l 3333

3) On the destination machine, mount the partition to receive the filesystem, and start the process:

cd /mnt/sda1
nc 192.168.10.101 3333 | pv -b | tar -xzpsf -

The nc (netcat) command is used for any kind of TCP connections between two hosts. The pv (progress viewer) command is used to display the progress of the transfer. tar is used to archive the files on the source machine and un-archive them on the destination.

Oct 02 2008

HOWTO: Get Rhapsody plugin to work with Ubuntu and Firefox

The Rhapsody.com plugin for firefox kept bombing out during the install. It appears that the installer file does not work with firefox 3. Here’s how I got it to work:

In a terminal type:

wget http://forms.real.com/real/player/download.html?f=unix/rhapx/RhapsodyPlayerEngine_Inst_Linux.xpi
unzip RhapsodyPlayerEngine_Inst_Linux.xpi
sudo mv nprhapengine.so /usr/lib/firefox-addons/plugins
# This next line removes the .xpi file and other files that were extracted that we do not need.
rm -rf install.js META-INF RhapsodyPlayerEngine_Inst_Linux.xpi

Now restart firefox and it should work.

Sep 25 2008

HOWTO: Shutdown and reboot without sudo password

If you are gnome user, you probably enjoy shutdown with just a click on the dialog. In order to shutdown from the command line, you are requested to be either root or use sudo, such as

sudo shutdown -h now

With sudo, you need to type your password. Sometimes it will be more convenient if we are able to shutdown without sudo. Is it possible?

The answer is yes, there are two ways.

1. Adding suid mode to /sbin/shutdown
2. Modify /etc/sudoers with visudo

1. Adding suid mode to /sbin/shutdown

By adding suid mode to the shutdown command, you are allowing a regular user to run the shutdown command as root.

sudo chmod u+s /sbin/shutdown

Now you can run shutdown without needing sudo.

2. Modify /etc/sudoers with visudo

This seems to be the proper way to allow a command to run as root from specified users without needing to type a password.

sudo visudo

By running visudo, it edits /etc/sudoers.

Adding the line below to that file, assume myuser is the user that you want to allow to run the shutdown command without a password.

myuser ALL = NOPASSWD: /sbin/shutdown

For ubuntu, usually the default user is in the %admin group. Therefore, you can also allow all users from the %admin group to shutdown without a password.

%admin ALL = NOPASSWD: /sbin/shutdown

In fact, you still need sudo to shutdown, but this time you do not need to specify a password.

sudo shutdown -h now

You can also reboot the system by using the shutdown command too.

sudo shutdown -r now
Sep 18 2008

HOWTO: USB Ubuntu 8.04.1 Persistent install from Linux

This tutorial enables you to install, boot and run Ubuntu 8.04.1 (Hardy) from a USB flash drive.
USB Ubuntu 8.04.1 Persistent install from Linux

Read more »

Aug 05 2008

HOWTO: Enable Compiz Fusion with the VIA Chrome9 HC IGP chipset on Ubuntu (Hardy)

I needed to buy a new motherboard on the cheap side the other day. The board that I got has a VIA chipset on board. (Biostar P4M900-M7 SE Motherboard - v7.0) I was hoping to get 3D graphics going on my Ubuntu Linux box without having to buy a new PCIe video card. I finally got it all going. Here’s how:

The first step was to get the latest VIA driver for Ubuntu. Get the driver here.

You will need to extract the files from the tar file. Then run the installation script ./vinstall. Reboot and you should be running on the new via driver.

I could now run glxinfo and had Direct Rendering enabled. glxgears worked fine. However, I still could not enable the Desktop Effects under System/Preferences/Appearance/Visual Effects.

I came accros this script that runs various compiz checks.

Compiz-Check is a script to test if Compiz is able to run on your system/setup and if not, it will tell you the reason why.

Forlong’s Blog - Compiz-Check.

The script indicated the VIA driver was blacklisted. It offered to remove it from the blacklist which I did. Now all of the desktop effects work. Thank you Compiz-Check!

Jul 29 2008

HOWTO: Convert Filenames to Lowercase

Back in the good old days, there was an operating system that didn’t seem to think NAME and name were different. The result was that sometimes when you transfered files from a floppy disk (remember them?) created on that Dumb Old System, you would clutter your directory with uppercase filenames. As us UNIX old-timers learned a nifty trick to get directory names to sort before filenames in the output of the ls command (namely, start directory names with an uppercase letter), having filenames with uppercase letters was irritating.
After using the mv command all too many times and typing things like mv FILE.TXT file.txt, I wrote this script. I was thinking I could put a new coat of paint on it but, in reality, it does the job and is easy to understand. (The line numbers are there, of course, just for reference.)

.
    1   #!/bin/sh
    2   # lowerit
    3   # convert all file names in the current directory to lower case
    4   # only operates on plain files--does not change the name of directories
    5   # will ask for verification before overwriting an existing file
    6   for x in `ls`
    7     do
    8     if [ ! -f $x ]; then
    9       continue
   10       fi
   11     lc=`echo $x  | tr '[A-Z]' '[a-z]'`
   12     if [ $lc != $x ]; then
   13       mv -i $x $lc
   14     fi
   15     done

Line 6 starts a loop (which ends with line 15). The ls command returns a list of filenames which are sequentially assigned to the shell variable x. The if test (lines 8 through 10) checks to see if the current filename is that of a plain file. If not, the remainder of the statements in the current loop iteration are skipped.

If line 11 is to be executed we know that we have an ordinary file. Using tr we convert the filename to lowercase and assign the new name to the shell variable lc. Line 12 then checks to see if the lowercase version of the name differs from the original. If it does, line 13 is executed to change the name of the original file to the new lowercase name. The -i option causes the mv to prompt for confirmation if executing the command would overwrite an existing filename.

Jul 21 2008

HOWTO: Enable DHCP and NAT routing on Ubuntu (Hardy) Linux

I had a need to turn my Ubuntu desktop into a NAT router and provide DHCP addresses to my local LAN. The local LAN is on the eth0 interface, and the Internet is on the wlan0 wireless interface.

Here’s how I did it …
Read more »

Jul 04 2008

HOWTO: Install a TFTP server on Ubuntu Linux

=> Default tftp port : 69
=> Default configuration file : /etc/inetd.conf

How do I set up the tftpd daemon to accept connections from another computer?

The configuration of the vsftpd FTP service (read as daemon ) simply requires three steps.

Step # 1: Install tftpd
Type apt-get command to install tftpd

$ sudo apt-get install tftpd

Step # 2: Create the directory tftpd will use to share files
The default directory is /srv/tftp. This directory does not exist so you need to create it.

$ sudo mkdir -p /srv/tftp

Step # 3: Restart tftpd
To restart tftpd type the command :

$ sudo update-inetd --enable tftpd
Jul 04 2008

HOWTO: Install a FTP server (vsftpd) on Ubuntu Linux

I recommend using vsftpd. It is simple and quite secure FTP server. According to vsftpd man page:

vsftpd is the Very Secure File Transfer Protocol Daemon. The server can be launched via a super-server such as inetd or xinetd. Alternatively, vsftpd can be launched in standalone mode, in which case vsftpd itself will listen on the network.

=> Default ftp port : 21
=> Default configuration file : /etc/vsftpd.conf

How do I set up the vsftpd daemon to accept connections from another computer?

The configuration of the vsftpd FTP service (read as daemon ) simply requires three steps.

Step # 1: Install vsftpd
Type apt-get command to install vsftpd

$ sudo apt-get install vsftpd

Step # 2: Configure /etc/vsftpd.conf
The default vsftpd configuration file is /etc/vsftpd.conf. You need to edit this file using text editor such as vi:

$ sudo vi /etc/vsftpd.conf

Add the following line (uncomment line) to the vsftpd configuration file:

local_enable=YES

Above config directive will allow local users to log in via ftp

If you would like to allow users to upload file, add the following to the file:

write_enable=YES

For security you may restrict local users to their home directories. Add the following to the file:

chroot_local_user=YES

Save and close the file.

Step # 3: Restart vsftpd
To restart vsftpd type the command :

$ sudo /etc/init.d/vsftpd restart
Jun 25 2008

Creating chroot sftp Jails with Jailkit | Linux Journal

Here’s a great article on how to create Linux jails.

Creating chroot sftp Jails with Jailkit | Linux Journal

A few months back I was given an assignment to create some chroot jails for a group of customers so that they could securely upload files with sftp. The requirement was that the customers needed to be able to upload file, but in a secure and private way. Customer One should not be able to see Customer Two’s files, for example. And neither customer should be able to browse the filesystem of the server.

Read more »

Jun 10 2008

HOWTO: Configure Sendmail as a backup mail server

Setting up a backup mail server is very easy. It’s also very important since you do not want to be without mail if your primary mail server goes down. To setup a backup mail server, first setup the MX record for the domain in question so that the backup mail server handles mail second (or third…) for the domain. Once your MX record is in place, you need to configure the backup server.

The first step is to make sure that the host name referenced in the MX record is listed as a local host name, either using the Cw option or the /etc/mail/local-host-names file. As an example, if I setup the MX record so that my backup mail server is mail2.domain.com, I should have Cwmail2.domain.com in my sendmail.mc file or have mail2.domain.com listed in my /etc/mail/local-host-names file. If it is not listed, Sendmail may get confused and bounce mail with the message:

553 MX problem? mail loops back to me

You’ll only see this message when your main mail server goes down. This happens presumably because Sendmail tries to relay mail to the backup mail server as listed in the MX record if it cannot reach the primary mail server. Since the MX record points to a host that is not recognized by Sendmail as a local host, it will keep trying to send the mail to the backup server. As it tries, it finds that the address points to itself, which it believes is not right, creating a loop. By letting Sendmail know that this is indeed another alias for this machine, it will handle the mail properly, queuing it for later delivery to the primary mail server.

It is important that you do not include the top level domain for which you are the backup server in the local-host-names file. Otherwise, your mail server will treat that domain as being local and will try to accept mail (as opposed to relay mail) for that domain. For example, if you include domain.com in your local-host-names file (in addition to mail2.domain.com), your mail server will think that IT is the primary mail server for domain.com and try to deliver messages locally.

The next step is to include domains for which you will be a backup server in the /etc/mail/access file and allow relaying for those domains. Continuing with the example above, your access file might have the following lines:

domain.com RELAY
domain2.com RELAY

On my viaVerio server I run these commands after modifying the config files:

cd /etc/mail
make && make install && restart_sendmail
Jun 04 2008

BUG: Ubuntu Hardy fails to boot after kernel upgrade

Here is the bug report
Bug #236021 in initramfs-tools Ubuntu: “There is no vfat module in the 2.6.24-17 initrd”

If you installed Ubuntu on a Windows computer using the Wubi install (Ubuntu is installed as a Windows application) and updated to the -17 or -18 kernel, you’ll find that you are dropped to an initramfs prompt after rebooting. Here’s how to fix it until initramfs is updated:

Reboot, select Ubuntu and press the ESC key.
Select the -16 kernel and boot.
Open a terminal window and edit line 210 of the /usr/share/initramfs-tools/hook-functions file.

sudo vim /usr/share/initramfs-tools/hook-functions

Change line 210 from:

virtio_pci; do

to:

virtio_pci vfat nls_cp437 nls_iso8859-1; do

Then rebuild initramfs like this:

sudo update-initramfs -u

Reboot and you should be running the new kernel without problems.

May 31 2008

Ubuntu How-To

Here is a good site to get you started with Ubuntu 8.04 (Hardy).
Ubuntu How-To

Ubuntu 8.04 Hardy Heron How-To

May 07 2008

Camera Hacks: Turn Your Point-and-Shoot into a Super-Camera

Camera Hacks: Turn Your Point-and-Shoot into a Super-Camera

If youre using a consumer grade point-and-shoot Canon digital camera, youve got hardware in hand that can support advanced features way beyond what shipped in the box. With the help of a free, open source project called CHDK, you can get features like RAW shooting mode, live RGB histograms, motion-detection, time-lapse, and even games on your existing camera. Lets transform your point-and-shoot into a super camera just by adding a little special sauce to its firmware.

Apr 30 2008

HOWTO: Enable Acer 3624WXMi Wireless LAN card in Ubuntu

Updated for Ubuntu Hardy 8.04

This one is really simple once you know what to do. I installed the beta copy of Ubuntu 8.04 (Hardy) on my Acer 3624 laptop which has a builtin wireless lan adapter. The wireless lan would not work. Looking through /var/log/syslog showed that the firmware was not loading. I did a little research and found that the bcm code for the wireless chipset can not be redistributed on the Ubuntu CD which is why it does not work out of the box. However, if you run the following command from the terminal it will download the code for you.

sudo apt-get install b43-fwcutter

Reboot the laptop. Now when you click on the network icon (next to the clock) you should see a list of available wifi access points. You should also see that the amber wifi light is illuminated on the front of your laptop.

Apr 13 2008

DUNDi Tutorial for Asterisk@Home

TheGoldFish.net Blog » Blog Archive » DUNDi Tutorial for Asterisk@Home

Confused by DUNDi? Yeah, so was I. It took me a few weeks of kicking my Asterisk box, but I finally got it working. Here’s a step by step tutorial on how to get DUNDi working with Asterisk@Home. This tutorial was written using an Asterisk@Home 2.5 system with FreePBX 2.1, but should work from Asterisk@Home 2.0 onward.

Mar 31 2008

HOWTO: Rip your DVDs in Ubuntu Linux and play them on your Palm TX

I use AcidRip to convert my DVDs for use on my Palm TX. AcidRip is a Gtk::Perl application for ripping and encoding DVD’s. It neatly wraps MPlayer and MEncoder, which I think is pretty handy, seeing as MPlayer is by far the best bit of video playing kit around for Linux. As well as creating a simple Graphical Interface for those scared of getting down and dirty with MEncoders command line interface, It also automates the process in a number of ways:
Homepage: http://untrepid.com/acidrip/

You can easily install it in Ubuntu like this:

sudo apt-get install acidrip
  • Insert your DVD
  • Launch the app from the Applications/Sound and Video menu
  • AcidRip defaults to /dev/dvd in the Video source Path box. My DVD drive is located at /dev/hdc so I have to manually change this each time. When set correctly go ahead and click the Load button.
  • Select the tracks you want to rip.
  • Click on the Audio Language box and select English. (Even though the default says English don’t believe it. Manually set it to English.)
  • The Palm TX has a 320 x 480 pixel screen. So in AcidRip, on the Video tab, set the video width to 480 and Height to 320.
  • Click Start, sit back, and if all goes well, you should have an AVI file in your Home directory that you can copy to your Palm.

I use TCPMP on my Palm to play video files.

Mar 27 2008

HOWTO: Install Garmin Maps on Ubuntu Gutsy Linux

A good source for free maps for your Garmin GPS can be found at http://mapcenter2.cgpsmapper.com/ Download anyone of the pre-compiled binary maps. These maps will have an .img extension.

Your Gutsy box should automatically see your Garmin when you connect it via a USB cable. A new USB drive will appear on your desktop. Open it. You should see a ‘Garmin” directory.

Rename your downloaded map file to GMAPSUPP.IMG and copy to your Garmin directory.

Unmount your Garmin and power it back on. Once loaded go to the settings tab on the Nuvi and choose Map and then MAP INFO.
Read more »

Mar 19 2008

HOWTO: Mount smbfs/cifs Shares Permanently on Linux

NOTE: Please be aware that smbfs is deprecated in favor of cifs. CIFS Extensions for UNIX is a small set of additions to the SMB protocol which allows the transfer of UNIX style metadata. The specification can be found here. Existing smbfs mounts can easily be converted by changing ’smbfs’ to ‘cifs’ in your /etc/fstab file..

This document provides help on mounting smbfs shares permanently. These can be shares on a Windows computer or on a Linux/UNIX server running Samba.
Read more »

Mar 04 2008

HOWTO: Setup Hamachi VPN on Ubuntu - Updated for GUTSY

This is a How-To for setting up a Hamachi virtual private network on Ubuntu 7.10 (Gutsy).

Hamachi is a zero-config VPN client for Windows and Linux (currently Beta for Mac). It allows you to, very easily, create a virtual private network that can be logged into and accessed for all over the net. It does this by creating IP tunnels to each VPN client, making them directly accessable to all the other clients on the VPN. Hamachi also encrypts the connections it creates to allow for secure access.

Read more »

Feb 06 2008

HOWTO: Play Encrypted (Copyrighted) DVDs in Ubuntu Gutsy

I rented a Disney DVD the other day, popped it into my Linux box to watch it, but could not get the DVD to play. I had previously installed all of the restricted drivers which allowed other DVDs to play, but this one just would not play in anything. Here is a quick HOWTO to get your box to play just about any DVD.

This will add the Medibuntu repository to your repository lists
In a terminal type:

sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list

Then you have to add the GPG Key to authentic the packages
In a terminal type:

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

Now update your system to load the Medibuntu repository into your apt-get sources

sudo apt-get update

Download the DVDs playback packages
In a terminal type:

sudo apt-get install libdvdcss2 libdvdread3

Enjoy!

Dec 06 2007

HOWTO: Create a Linux RAM disk in Ubuntu

Remember the old days of RAM disks? Well. Linux has them too! If you’ve never tried them, a RAM disk is a virtual file system that runs entirely from your PC’s main memory, which means it’s lightning fast to read and write anything you want. How much space you choose to allocate to your RAM disk is down to how much RAM you have and how much you plan to use it - if you have 1GB of RAM, you can easily spare 64MB for a ramdisk; if you have 2GB you can probably spare 256MB, and if your are fortunate enough to have 4GB then you can easily stretch your RAM disk legs with 1GB. Here’s how to setup a 64MB disk - just change the 65536 for the size you want:

sudo mkfs -t ext3 -q /dev/ram1 65536
sudo mkdir -p /ramdisk
sudo mount /dev/ram1 /ramdisk -o defaults,rw

Remember: If your PC gets switched off accidentally it all gets wiped!

Dec 06 2007

HOWTO: Stop disk thrashing in Linux

If you want your disks to run at their full potential, make sure and enable the noatime option in /etc/fstab.

Every time your disk does a read (eg reading a file), it also does a write, to store the information pertaining to when the file was last read. This process is incredibly slow, and you can get a sizable speed boost - usually around 10 percent - with just one simple tweak.

Switch to root, then open up /etc/fstab in your favorite text editor. Look for where your root file system is, and make sure that it uses defaults,noatime for its settings, then save, reboot and let your poor overworked PC perform to its full potential.

Dec 06 2007

HOWTO: Add more functions to Nautilus

Nautilus (file manager in Ubuntu linux) has a surprising amount of power with its extensions, but none are installed by default leaving it looking somewhat bare. That’s easily fixed, though, particularly if you’re using Ubuntu - just apt-get the nautilus-gksu and nautilus-open-terminal extensions, restart Nautilus, enjoy the upgrade.

sudo apt-get install nautilus-gksu nautilus-open-terminal

This will give you a right click option to open a terminal, and if you right click on a file there is an option to open it as an administrator.

Nov 30 2007

HOWTO: Configure OpenVPN on Windows (take 2)

A while back I documented how to setup OpenVPN on windows. I recently found another way that is easier to do. Choose your poison.

The OpenVPN web site is here:
http://www.openvpn.org

and the Windows 2000/XP GUI can be found here.
http://openvpn.se/

If you are talking Windows, you can use the GUI, and a lot is done for you:

  • Download and install it.
  • It will set up a new ‘Network Connection’; go there in the control panel, find it (the description of it will be something like ‘TAP-Win32 Adapter V8′). Rename it to something obvious, like ‘VPN-1′ instead of the default generic name.
  • Go to the OpenVPN menu item under programs and choose ‘Generate new OpenVPN static key’. It will do this and put it in the ‘config’ directory (c:\Program Files\OpenVPN\config\key.txt).
  • Choose ‘OpenVPN configuration file directory’. You’ll get a folder with ‘key.txt’ and (I think) a readme file.
  • If you are setting up the SERVER, create a text file called ’server.ovpn’ and put something like the following into it:
#
# server config for web2 server
#
dev tun
dev-node VPN-1
proto udp
ifconfig 192.168.3.1 192.168.3.2
secret key.txt
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
verb 4

6. If you are setting up a CLIENT, copy the key.txt file to the …OpenVPN/config directory on that machine and create another text file, called ‘client.vpn’ with the following complementary setup:

#
# client config for web2 server
#
dev tun
dev-node VPN-1
proto udp
remote <ip address of server>
ifconfig 192.168.3.2 192.168.3.1
secret key.txt
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
verb 4

As long as your ’server’ is at a static IP address (or if you use a DynDNS account) and your firewalls (if any) will pass port 1194 to that machine, you are all ready to go; you can open the link from the server end by right-clicking on the OpenVPN GUI icon in the system tray and choosing the ’server’ configuration and ‘Connect’. Then do the same thing with the client machine, with the ‘client’ configuration file. The first time you use this on an XP SP2 machine, Windows Firewall will pop up and ask you if it’s okay to let OpenVPN do its thing. Different but same general idea for other firewall software/hardware.

Test this in a LAN environment where you know the IP address of the two machines in question and have control over the firewall issues. Also, the docs on both sites above are excellent, as well as the stuff that comes with the OpenVPN package.

To route all your internet traffic (from e-mail and from my web browser) through that home machine when connecting to the internet from a wifi hot spot location, just add the ‘push “redirect-gateway def1″‘ option to the OpenVPN server configuration and set it (the server) to use the BRIDGING mode.

Nov 30 2007

HOWTO: Enable ENUM lookups in Asterisk

If you run an Asterisk PBX you can easily perform ENUM lookups to make direct peer-to-peer calls with other ENUM users. The way this works is a user dials a public telephone number (i.e. 1-718-555-1234). Your Asterisk box queries one or more e164 name servers for that number. If the number is listed, the lookup will return the dial string to connect directly over the Internet instead of going through the Public Switched Telephone Network. Can you say free? If the number is not listed, then go and process the call as usual with your telephone carrier.

Put these lines into your enum.conf file:

search => e164.org
search => e164.arpa

Here are the ENUM lines I insert in my extensions.conf just before my standard call to my telephone carrier.
This is for Asterisk version 1.4

[macro-dial_inet]
;
; Send call to selected Internet providers
;   ${ARG1} - What to dial
;
exten => s,1,noop(macro-dial_inet)
;--- ENUM ---
;try enum first since it's free
exten => s,n,NoOp(Doing Enum lookup)
exten => s,n,Set(registrars=e164.arpa-e164.org-e164.info-enum.org-e164.televolution.net) ; place your registrars to search here
exten => s,n(regloop),Set(registrar=${CUT(registrars,,1)})
exten => s,n,Set(registrars=${CUT(registrars,,2-)})
exten => s,n,Set(protocols=SIP-IAX2) ; place your protocols to search here (i.e. SIP-IAX2-IAX-H323)
exten => s,n(protoloop),Set(protocol=${CUT(protocols,,1)})
exten => s,n,Set(protocols=${CUT(protocols,,2-)})
exten => s,n,Set(enumARG1=${ARG1})
exten => s,n,ExecIf($[ ${ARG1:0:3} = "011"],Set,enumARG1=${ARG1:3})
exten => s,n,Set(count=${ENUMLOOKUP(+${enumARG1},${protocol},c,,${registrar})})
exten => s,n,Set(counter=0)
exten => s,n(resultloop),GotoIf($[$["x${counter}"="x"]|$["${counter}" >= "${count}"]]?resultend)
exten => s,n,Set(counter=$[${counter}+1])
exten => s,n,Set(ENUM=${ENUMLOOKUP(+${enumARG1},${protocol},,${counter},${registrar})})
exten => s,n,GotoIf($["${LEN(${ENUM})}" = "0" ]?continue)
exten => s,n,Set(DIALSTR=${protocol}/${ENUM})
exten => s,n,Dial(${DIALSTR}|120)
exten => s,n,GotoIf($[$["${DIALSTATUS}"="CHANUNAVAIL"]|$["${DIALSTATUS}"="CONGESTION"]]?continue:hangup)
exten => s,n(continue),Goto(resultloop)
exten => s,n(resultend),GotoIf($["${protocols}"=""]?regend:protoloop)
exten => s,n(regend),GotoIf($["${registrars}"=""]?fallthrough:regloop)
exten => s,n(hangup),NoOp(Dial failed due to ${DIALSTATUS})
exten => s,n,Hangup
exten => s,n(fallthrough),NoOp(Found No Enum Entry)
;--- CONTINUE WITH TELEPHONE CARRIER ---

That’s all you need to check for and use ENUM records. Now you might want to return the favor by listing your own telephone number(s) in one of the e164 databases. If you are not a telephone carrier then the easiest way is to create an account on www.e164.org. Then add this to your iax.conf file so that anonymous connections can be made to your Asterisk PBX.

[guest]
type=user
context=anonymous

Then in your extensions.conf file, add an [anonymous] context that allows connections to your receptionist. Here is an example:

[anonymous]
exten => _X.,1,Dial(SIP/0)     ;send the call to the receptionist
exten => _X.,n,Hangup
Nov 29 2007

HOWTO: Get a D-Link DWL-G122 D1 USB WiFi Adapter to work on Linux (Ubuntu Gutsy 7.10)

First, you need to install ndiswrapper.

sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9

Locate the USB55N5x.inf and USB55N51.sys files on the D-Link CDROM and change to that directory on the CD. If you don’t have the CD, you can download the drives from here. Install the Windows driver with

sudo ndiswrapper -i USB55N5x.inf

Your version numbers may be different from mine. Adjust the above command accordingly.

This installs the .inf file and required .sys files. Now see if the installation of the Windows driver is “valid” with

ndiswrapper -l

This should report

"driver present, hardware present"

if the driver is installed and if the USB WiFi device is plugged in. If the device is not plugged in then it should report

"driver present"

Now load the ndiswrapper module with

sudo modprobe ndiswrapper

If everything worked properly, this should initialize the ‘wlan0′ wireless device, which can be configured with System/Administration/Networking or with wireless tools, such as ‘iwconfig’, ‘wpa_supplicant’ etc. Gutsy has a nice wifi interface that appears on your Gnome panel where you can select which network to connect to.

If you prefer a different GUI wireless manager then install one or all of these tools like this:

sudo apt-get install wlassistant
sudo apt-get install wifi-radar

wlassistant is a KDE application.

To get Ubuntu to load this driver every time you boot the computer, you need to add this line to /etc/modules:

ndiswrapper
Nov 26 2007

HOWTO: Mirror the Ubuntu repository via apt-cacher

At work we use the apt-cacher program to cache our access to the Ubuntu repositories. However, if you have a laptop with some free space, it comes in handy to have the repository locally for when you’re not connected to the net. Here is a debmirror command to create a local mirror of the gutsy repository to /media/disk/gutsy/

(If you have any errors, you may need to update your libcompress-zlib-perl package. One of the versions made for gutsy broke this package for use with debmirror.)

In the command below, ubuntu-apt resolves to the IP address of the machine running my apt-cacher program. 3142 is the port that apt-cacher is listening on. Gutsy is the version being mirrored.

debmirror --nosource -m --passive --host=us.archive.ubuntu.com --root=ubuntu/ --method=http --dist=gutsy,gutsy-security,gutsy-updates --section=main,restricted,universe,multiverse --arch=i386,amd64 /media/disk/gutsy/ --proxy=http://ubuntu-apt:3142/ --ignore-release-gpg --ignore-small-errors
Nov 21 2007

HOWTO: Create NTFS partitions in Ubuntu Linux

I recently got an internal SATA drive and put it in an USB 2.0 enclosure so that I could cart around some portable data. I wanted the drive to be NTFS so that I could have one really large partition that can be read by just about any computer (linux or windows). Here is how I did it on my Ubuntu Gutsy box:

sudo apt-get install gparted ntfsprogs

Plug in your drive and start gparted as root.

sudo gparted

My drive connected as /dev/sde. So click the drop down box in the upper right and select your new drive. Click the new button and select ntfs. That’s it.

Oct 27 2007

HOWTO: Securely delete files/folders in Ubuntu

Use the ’shred’ command to securely delete files from the command line like this:

shred -z -u filename

Here is an easy way to securely delete files and folders from within the Ubuntu Nautilus file manager. You first need to download and install two packages; wipe and nautilus-actions like this from a terminal prompt:

sudo apt-get install wipe nautilus-actions
  • Now copy and paste the schema text below into a text file on your desktop.
  • Click on the new preferences menu “/System/Preferences/Nautilus Actions configuration”.
  • Click the Import/Export button.
  • Import the schema file you just created.
  • Log off and back on.

You should now have a “Wipe Selected” option when you right click on a file, folder, or selected files/folders in the Nautilus file manager. Be careful since files that are wiped are not recoverable in any way.

Read more »

Oct 25 2007

HOWTO: Compile 3D Unichrome video driver for Ubuntu linux

Updated 2007/10/25:
I just upgraded to Ubuntu Gutsy. This post in the ubuntu forums has a little script that will download and install everything you need to get unichrome video driver running on your VIA graphics chip.
Read more »

Oct 24 2007

HOWTO: Amarok MP3 Playback on Ubuntu

Ubuntu (Gutsy) makes it easy to install the MP3 drivers native apps. However, if you installed Amarok, then the drivers are not installed. Amarok uses different libraries for MP3 playback. To get them installed just run this command at a shell prompt:

sudo apt-get install libxine1-ffmpeg
Oct 24 2007

Photo Collection - Bringing Order to Chaos

Someone over on the linixformat forums asked this question (below). The forums suggest using the time tool in gThumb. That’s an excellent find. (That’s gold Jerry, gold.) However, the linuxformat magazine had a good reply to this question that is not on the forum. Keep reading for their suggestion.

View topic - Photo Collection :: Linux Format :: The website of the UKs best-selling Linux magazine

I’ve got a photo collection that has got out of hand - several Gigs worth. I need to organize them so I can get a good backup.

Does anybody know of a program that will rename a file based on the EXIF date of the image and change the Modified Date of the file to the same EXIF date? My last attempt at a backup before I wiped my PC last - managed to set all the file dates to when the DVD was burned Sad

Also - Ive managed to get myself several duplicate images spread across my entire collection yep, I really messed up each with different filenames. Any idea how I could sort them maybe with EXIF data again without having to look at a few thousand photos?

If it helps - Im using FC6 64bit and Im not scared of the command line.

Thanks in advance,
NiceBloke

Read more »

Oct 22 2007

HOWTO: Make your Wordpress code highlited

An easy way to make your code (or preformatted text) stand out is to add an entry to your style.css cascading style sheet for your current theme. On this site you will notice little blue boxes wherever I have inserted code or shell commands. To do this, add the <pre> and <code> tags around the text you want highlighted. Don’t forget to close the tags after your text with </code> and </pre> tags. For example:

<pre><code>
 some text here
< /code>< /pre>

Note: I had to insert a space in the code and pre closing tags above to make them appear. In your code the spaces should not be there.

Now edit your /wordpress/wp-content/themes/mytheme/style.css and add a pre section to wherever your theme styles the post. On my theme it is under the .post section. So my style.css looks like this:

.post pre {
        -moz-border-radius: 5px;
        background-color: #F9FBFC;
        border: 1px solid #C3CED9;
        padding: 8px;
        margin-bottom: 5px;
        width: 400px;
        overflow: auto;
        text-align: left;
        }

To clean things up further, download the Code Auto Escape plugin. This will make sure wordpress does not step on your code.

Oct 20 2007

HOWTO: Enable even more Ubuntu Gutsy desktop effects

Ubuntu version 7.10 (Gutsy) comes with CompizFusion 3D graphics. The settings can be controlled from the /System/Preferences/Appearance menu. There is a tab labeled Visual Effects with three settings, None, Normal, Extra. Click on Extra to get the wobbly windows. This is great and all but there is soooooo much more. You can enable so much eye candy by installing the Compiz Congiguration Setttings Manager that you will get nauseous! Here’s how to do it:

In a terminal type:

sudo apt-get install compizconfig-settings-manager emerald subversion

You should now have another option on the Visual Effects tab labeled Custom. (There is also a new menu option on the /System/Preferences menu called Advance Desktop Effects Settings). Launch this and be prepared to loose several hours of your life tweaking these settings. Most of the items have an Action tab that will display what keystrokes / mouse buttons will activate the item.

Here are a list of items that I tweaked in the CompizConfig Settings Manager:

  • Uncheck Desktop Wall and Check Desktop Cube and Rotate Cube. Right click on the workspace applet in the lower right of your screen and change it to four columns.
  • Click on Animations and change the first Close animation from Fold to Burn. Change the second Open animation from Fade to SideKick.
  • Check and then click on Scale and then the Action tab. Double click Initiate Window Picker For All Windows and select Top Right.
  • Check Window Previews.
  • Check Group and Tab Windows.

Now take them for a test drive:

  • Press CTRL+ALT+LEFT MOUSE BUTTON. Keep them held down and move the mouse.
  • Click on the /Applications/Accessories menu and then click on Calc. Note how the menus rotate into position. Now close the calculator and note how it goes up in flames.
  • Move your mouse to the top right of the screen.
  • Hover your mouse over one of the applications on the bottom Gnome panel.
  • Press and hold the WINDOWS key then press TAB repeatedly. (Make sure you have several windows open on the screen.)
  • Press WINDOWS+S to select multiple windows. Then press WINDOWS+T to group them into one window. Hover the mouse over the title bar and select which window to flip to. WINDOWS+U will ungroup them. Try WINDOWS+G instead of WINDOWS+T to see what happens.

Having fun yet?

The apt-get install line above should have also installed the emerald window manger. You can get these for emerald by installing the .deb package for feisty. Get it here Go into the Advance Desktop Settings, click on Effects, Window Decorator. In the Command field type:

emerald --replace

You can now select themes in Emerald and have the Window Decorator reload them.

On my Gutsy install I noticed that the default theme, Beryl Red, was not listed in Emerald’s theme chooser. So once you choose another theme you can’t go back to Beryl Red. I’ve archived the Beryl Red theme for Emerald here. Just unpack it in your .emerald/themes directory which is in your home directory.

Oct 19 2007

HOWTO: Enable Ubuntu Gutsy desktop effects on an HP DX 2250 with XGL

The HP DX 2250 has a low end ATI Radeon Express 200 graphics chip. This presents a problem when trying to run 3D graphic programs likes the built-in desktop effects on Ubuntu Gutsy. (Note: Compiz & Beryl have merged back together into CompizFusion which comes enabled by default with Gutsy.)

Enable the Restricted Driver for ATI
Go to System/Administration/Restricted Drivers Manager and click on enable.
Reboot.

Check ATI Driver
In a terminal type:

fglrxinfo

You should see this ouputed on your terminal window:

display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon Xpress Series
OpenGL version string: 2.0.6473 (8.37.6)

Install Xgl
In a terminal type:

sudo apt-get install xserver-xgl compizconfig-settings-manager

Now You Just have to Log off and back on.

Click on the System/Preferences/Appearance menu.
Click on the Visual Effects tab.
Click on Extra:

Enjoy.

Now if you want to tweak the living daylights out of everything, click on the System/Preferences/Advanced Desktop Effects Settings.

Oct 15 2007

HOWTO: Install Dialup PPP Client (GNOME PPP) on Ubuntu Linux

Prerequisites: add universe and multiverse repositories.

Open a terminal window and type in:

sudo apt-get install gnome-ppp

After that you can find GNOME PPP in the Gnome menu under Applications -> Internet.

Oct 15 2007

HOWTO: Monitor the status of your hardware

Would you like to know the temperature of your CPU? How about the speed of your fans? Is your hard drive ready to fail? It easy. On an Ubuntu Linux system do this:
Read more »

Sep 18 2007

HOWTO: Enable Beryl in Ubuntu Feisty on an HP DX 2250 with XGL

The HP DX 2250 has a low end ATI Radeon Express 200 graphics chip. This presents a problem when trying to run 3D graphic programs likes Beryl. I found a web site that shows how to get Beryl running on a Radeon Express 200. The trick is to use an older version of Beryl.

This is the guide everyone has been waiting for, enjoy. The trick is that you have to force bery-core to use 0.2.0~0beryl1 because latter versions don’t work with Xgl. This not only works for the Dell Inspiron 1501 but works for any computer running an ATI card using Xgl.

Read more »

Aug 17 2007

Setting DHCP Hostname on CentOS

I recently installed a copy of Trixbox which installs the CentOS linux operating system. However, when it grabbed a DHCP IP address it would not register it’s hostname with the DNS server. On top of that, it had a lames hostname of ‘asterisk1′. Here is what I did to set a proper hostname (that’s remembered on reboot) and to have the DNS server grab the hostname when giving out an IP lease.

Edit the /etc/sysconfig/network file and add the following lines changing them to match your hostname.

HOSTNAME=gumby
DHCP_HOSTNAME=gumby

You will also need to change your /etc/hosts file and add your hostname and domain.

127.0.0.1 gumby.example.org gumby

Reboot.

Jul 22 2007

HOWTO: Tying Rope Knots

Well this HOWTO deviates from the world of Information Technology. I guess you could call it an IT HOWTO from 60 years ago. I found an old 30 page booklet that teaches how to tie various rope knots.
decorative knots

  • Whipping
  • Stopper Knots - overhand, figure eight
  • Binding Knots - square or reef knot, surgeon
  • Loop Knots - bowline (used for mooring, hitching, lifting and joining), double bowline (makes a good seat sling), bowline on bight (to lift an injured man), Spanish bowline (lifts a man or slings a ladder), the man harness (used for hauling and mountain climbing)
  • Noose - Halter hitch (used on a post or ring), running bowline (for retrieving objects overboard or package tying)
  • Lariat
  • Hitches - Half hitch, two half hitch, midshipman’s hitch (mooring and life-saving), clove hitch, cow hitch (tethering, mooring, hoisting), neck halter (for horse or cow), timber hitch (towing and hoisting), blackwall hitch (for a moderate load), catspaw (for heavy loads)
  • Bend (for tying two ropes together) - sheet, carrick, fisherman
  • Sheepshank (to shorten a rope)
  • Splicing - short, eye, long
  • Grommet
  • Selvagee Strap (for slinging cargo)
  • Finally some Decorative and useful knots

The front cover was missing and there was no copyright information. So, for the time being, I’m making it available.
How to tie rope knots

Jul 10 2007

HOWTO: Import iCalendar (ics) Appointments Into JPilot

I use JPilot for syncing my PDA on my Ubuntu Linux desktop and want to be able to import iCalendar appointments into it. Ideally I would just double-click the .ics file that is emailed to me and it would appear on the JPilot calendar. Here’s how I did it using Ubuntu 7.04 (Feisty).

I already had most of the development packages installed on my system. If this is your first time building software from source code then you may need to install the various development libraries beforehand. If you do get an error during compiling then try to find out which package is missing and install it from the package manager then try re-compiling again. As a starter, you will definitely need the build-essential and the subversion packages. Install them like this:

sudo apt-get install build-essential subversion automake libtool

Now you need to grab Jason Day’s source code for jp-icalendar. Note: This is alpha code and is not supported or recommended for a production environment. That being said, it is working fine for me so far. Here’s how to grab the code and install it using subversion:

svn co https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/trunk jp-icalendar
cd jp-calendar
./autogen.sh
./configure
make
make check
sudo make install

I don’t remember having to do this next step on my Ubuntu Feisty box, but on my Ubuntu Gutsy box I had to create a symlink in the /usr/lib directory to the icallib library that got installed in /usr/local/lib like this:

sudo ln -s /usr/local/lib/libical.so.0 /usr/lib/libical.so.0

If everything installed OK you can go ahead and delete the jp-icalendar directory.

If you have an iCalendar .ics file on your desktop, you can right-click on the file, click on ‘open with‘ then ‘open with other application‘. At the bottom of the dialog box, click on ‘Use a custom command‘ and browse to ‘/usr/local/bin/icalendar-import‘. Now whenever someone sends you an icalendar appointment you can double click the .ics attachment and it will appear on your jpilot calendar.

Jun 27 2007

HP DX 2250 sound problems with Ubuntu (7.04 - Feisty)

We got new computers at work so I decided to dual boot the computer with Ubuntu 7.04. Everything worked out of the box except the sound. All the audio players seemed to work normally, but no sound is output. The following fix worked for me.

Add the following line to /etc/modprobe.d/alsa-base:

options snd-hda-intel model=3stack
Jun 07 2007

HOWTO: Mount a remote folder using sshfs (fuse) on Ubuntu Linux

I needed to mount a remote folder on another computer across the net into my local linux filesystem on my Ubuntu 7.04 (Feisty) box. Here’s how I did it.
Read more »

May 30 2007

HOWTO: PDF Typewriter for Linux

Have you ever needed to fill out a PDF form? You could print out the form, roll it into a typewriter (do they still make those things?), and fill out the form. Now you have to FAX it or scan it back into the computer. However, there is a better way! Just type on top of the PDF form using flpsed then print it out to a printer or export it as another PDF. Here’s how to install the software on your Ubuntu desktop:

sudo apt-get install flpsed

Now from a terminal type (or create a launcher):

flpsed

Click on File/Import PDF.
Open your PDF form.
Click on the form and start typing.
When you are done, click on File/Print or File/Export PDF.

Happy flpseding!

May 30 2007

USB Thumb Drive Not Mounting in Ubuntu

I am having a little trouble with my USB thumb drive. When I plug it into my Ubuntu 7.04 (Feisty) computer at work it auto mounts just fine. All of a sudden, my Feisty computer at home won’t auto mount it. When I insert the drive and do a dmesg, it shows the following errors:

usb 4-6: new high speed USB device using ehci_hcd and address 2
usb 4-6: device descriptor read/64, error -71
usb 4-6: new high speed USB device using ehci_hcd and address 3
usb 4-6: device descriptor read/64, error -71
usb 4-6: new high speed USB device using ehci_hcd and address 4
usb 4-6: device descriptor read/64, error -71
usb 4-6: new high speed USB device using ehci_hcd and address 5
usb 4-6: device descriptor read/64, error -71
usb 4-6: device descriptor read/64, error -71
usb 4-6: new high speed USB device using ehci_hcd and address 6
usb 4-6: device descriptor read/64, error -71
usb 4-6: device descriptor read/64, error -71

I found a workaround but its not a permanent solution. Here’s the workaround:

sudo modprobe -r ehci_hcd

I then plug in the USB Thumb drive and it mounts perfectly. You can place the above command (without the ’sudo’) in the /etc/rc.local file just before the ‘exit 0′ line. This will run the modprobe command everytime you restart your computer and your thumb drive will mount properly.

This is still a workaround and not the “real fix”.

May 29 2007

HOWTO: Mount a webdav folder on Ubuntu Linux

I needed to mount a webdav folder from a remote web server into my local linux filesystem on my Ubuntu 7.04 (Feisty) box. Here’s how I did it.

sudo apt-get install davfs2
sudo chmod +s /sbin/mount.davfs
sudo mkdir /mnt/I

Make an entry in your /etc/fstab something like this: (Change the server and path to match your webdav location)

https://server001/user/jgott/ISMTransfer /mnt/I davfs rw,user,noauto 0 0

Add yourself to the ‘users’ group. (System/Administration/Users & Groups)

Then you can manually mount your Internet drive like this:

mount /mnt/I

You need to authenticate each time.

May 25 2007

HOWTO: Configure OpenOffice Database to connect to MySQL

You need to install a special component to connect OpenOffice.org to a MySQL database. Download mysql-connector-java-5.06.tar.gz from www.mysql.com/products/connector/j and save it to your home directory. Don’t download the 3.1 version; it’s too old. At the terminal prompt enter:

sudo tar xfvz mysql-connector-java-5.0.6.tar.fz -C /opt/

This extracts the connector tool into the /opt directory on your filesystem. Now start OpenOffice.org, then go to Tools > Options in the menu. Click on Java under the OpenOffice.org sub-menu on the left, then the Class Path button on the right, and Add Archive. Browse to the /opt/mysql-connector-java-5.0.6 directory, click the mysql-connector-java-5.0.6-bin.jar file, and then Open. Click OK and OK again to dismiss the two dialogs that opened, and you have the connector installed. Finally restart OpenOffice.org

Click through File > New > Database, and when the wizard appears select Connect To An Existing Database and choose MySQL from the drop-down menu. Hit Next and, on the following screen, choose to connect using JDBC. Click Next again. Now you have to fill in the database information. Follow the rest of the prompts and you should be connected to MySQL database.

May 24 2007

HOWTO: Erase CD-RW discs in Ubuntu

I wanted to re-use an old CD-RW disk that had some old data on it. I popped it into my Ubuntu 7.04 desktop but could not find any way to erase the CD to make it blank again. After some googling I found Brasero. It’s a nice little utility for making data and audio CDs. One of the options on the Disc menu is to erase the disk. Works perfectly. Here’s how to install it:

sudo apt-get install brasero

You’ll find it on the /Applications/Sound & Video/ menu after its installed.

May 21 2007

HOWTO: Install Mozilla Thunderbird 2.0 on Ubuntu 7.04 Feisty Fawn

Download Mozilla Thunderbird 2:

wget -c http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/2.0.0.4/linux-i686/en-US/thunderbird-2.0.0.4.tar.gz

Extract it:

sudo tar -C /opt -zxvf thunderbird-2.0.0.4.tar.gz

Make a launcher command available to all users:

sudo dpkg-divert --divert /usr/bin/mozilla-thunderbird.ubuntu --rename /usr/bin/mozilla-thunderbird
sudo ln -s /opt/thunderbird/thunderbird /usr/bin/mozilla-thunderbird
sudo ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird

Now you can launch Thunderbird with the command:

thunderbird

Now make a launcher for Thunderbird.

  • Right click the Application Places System menu bar.
  • Select edit menus.
  • Scroll down to Internet.
  • Select new item (upper right hand corner of window).
  • Fill in the boxes you can put whatever you want in, only the command box matters.
    Type: Application
    Name: Mozilla Thunderbird
    Command: thunderbird
    Comment: Email Client
  • Select an icon.
May 15 2007

HOWTO: Map local Linux drive resource to Windows terminal server

Here is the problem: You are connected to a remote machine via a Windows Terminal Server. You want to copy files from your local Linux machine to the remote machine (or vice versa).

The answer is to map the local disk resource through to the terminal server. This command will take any mounted drive on your local linux box and make it appear in your drive list of Terminal Server…

rdesktop -a 16 -g 85% -r disk:Liunx=/ ts.example.com
  • Where - a (sets the color to 16 bit & -g sets the window to be 85% of your full screen size)
  • Where -r disk: redirects mounted drives
  • Where Linux = is your pick you could say ‘yo momma’ & it would work fine :)
  • Where =/ (directory location you want mounted)
  • Where ts.example.com (location of redirection)

Thanks to Micah J for this tip!

Apr 21 2007

HOWTO: Fix Mozilla Firefox & Thunderbird print margins

Whenever I print a page from Firefox or Thunderbird on an HP Inkjet printer the top and bottom lines get cut off. I found a work around for this but changing the print margins within these two applications. In each application goto File/Print like you were going to print the page. Click the Properties button at the top right of the dialog box next to the printer name. There will be four boxes under ‘Gap from edge of paper to Margin’. I have mine set to the following:

Top: 0.12 Bottom: 0.5 Left 0.25 Right: 0.5

Click OK and then PRINT. Now when you print, nothing should be cut off. If things still get cut off try increasing the gap sizes until it looks right.