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 20 2009

Restricting outbound calls in FreePBX (whitelist)

NOTE: The following information comes from http://freepbx.org/news/2009-03-19/restricting-outbound-calls-in-freepbx-whitelist. It’s being copied here in the event the original post becomes unavailable. Please refer to the above web site for current information.
Read more »

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.

Dec 31 2008

HP OfficeJet 6310 not printing with Ubuntu

I hooked up an HP OfficeJet 6310 printer to my Ubuntu 8.10 desktop but could not find a 6300 series driver. The solution was to use the HP OfficeJet 7110 cups+Gutenprint driver.

Dec 26 2008

Quick way to discover who your computer is talking to

If you have Linux, here is a quick way to determine what programs are listening for incoming network connections as well as who your computer is currently connected to.

sudo netstat -plateu
Dec 13 2008

Wordpess 2.7 and PHP4

I upgraded to Wordpress 2.7 but found that the ‘Press This’ bookmarklet returned this error:

Fatal error: Call to undefined function: htmlspecialchars_decode

It identified line 554 of the ‘wp-admin/press-this.php‘ file. As it turns out, ‘htmlspecialchars_decode‘ is a PHP version 5 function call and I’m running PHP version 4. This fix is to edit wp-admin/press-this.php and change the ‘htmlspecialchars_decode‘ call to the version 4 function call ‘html_entity_decode‘.

Nov 26 2008

Send a test fax for FREE

I recently setup a FAX service for someone and needed a way to test if the system was receiving FAXes OK. I could have tracked down a friend with a FAX machine and have him send a test FAX. How much easier though to plug in the FAX numbher and have an automated system send you a FAX. Follow this link to send a test FAX.

Interpage Network Services Inc.TM Free Web to Fax and EMail OutFax Service.

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 15 2008

Speed Up Multiple SSH Connections to the Same Server

If you run a lot of terminal tabs or scripts that all need to make OpenSSH connections to the same server, you can speed them all up with multiplexing: making the first one act as the master and letting the others share its TCP connection to the server.

If you don’t already have a config file in the .ssh directory in your home directory, create it with permissions 600: readable and writeable only by you.

Then add these lines:

Host *
   ControlMaster auto
   ControlPath ~/.ssh/master-%r@%h:%p

ControlMaster auto tells ssh to try to start a master if none is running, or to use an existing master otherwise.

ControlPath is the location of a socket for the ssh process to communicate among themselves. The %r, %h and %p are replaced with your user name, the host to which you’re connecting and the port number - only ssh sessions from the same user to the same host on the same port can or should share a TCP connection, so each group of multiplexed ssh process needs a separate socket.

To make sure it worked, start one ssh session and keep it running. Then, in another window, open another connection with the -v option:

~ ssh -v example.com echo "hi"

And, instead of the long verbose messages of a normal ssh session, you’ll see a few lines, ending with:

debug1: auto-mux: Trying existing master
hi

Pretty fast. If you have to connect to an old ssh implementation that doesn’t support multiplexed connections, you can make a separate Host section:

Host antique.example.com
   ControlMaster no

For more info, see man ssh and man ssh_config.

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.

Nov 06 2008

DVD Drive stopped working after upgrading to Ubuntu 8.10

I decided to upgrade one of my computers to Ubuntu 8.10 Intrepid Ibex. I downloaded the iso, popped it into my DVD/Burner and rebooted. Halfway through the boot it bombed out. So I tried it again, this time popping the CD in my DVD/Reader. Success. It booted fine and I installed Intrepid onto by hard drive.

But, now after booting Intrepid my DVD/Burner (Panasonic LF-D521) no longer works. When I pop in a CD I get this error in ‘dmesg’: COMMUNICATION CRC ERROR (ULTRA-DMA/32). If I boot the 8.04 Hardy CD everything works again. So It’s an OS problem. True, but read on …

Searching the net on this error showed many Windows users having the same error too. One person said they had an old CD drive attached as a secondary drive on the same cable as their brand new fancy burner. They removed it and the Burner began working again. Well, I have an old DVD Reader attached as a secondary drive. I shut down the computer, disconnected the old drive, rebooted, and guess what? My DVD/Burner is now working again!

Update: 2008-11-06
I swapped out the old Samsung DVD/Reader (SD-612) with a newer Samsung DVD/Reader (NEC DV-5800A) and now both my DVD/Burner and DVD/Reader work.

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 28 2008

Receive FREE calls over the Internet from any phone

I’m running FreePBX and sometimes need a telephone number for a special project. IPKall fits in perfectly.

Free Washington state phone number to your Internet phone.

Welcome to IPKall, the service that lets you receive FREE calls over the Internet from any phone, anywhere, any time!

FREE IP Calling with IPKall.

Here’s how I setup my FreePBX system:
1. Go to www.ipkall.com and sign up for a free number. Select/Use the following on the signup page:

Account type: IAX
User Name: <the 10 digit ipkall telephone number>
Proxy: <the IP or hostname of your freepbx server>/<the 10 digit ipkall telephone number>

Example:
User Name: 3065551212
Proxy: pbx1.mydomain.com/3065551212

2. On your freePBX server, create a new IAX trunk and use the following information. (Everything else can be left alone.)

TRUNK NAME:IPKALL
USER CONTEXT: <the 10 digit ipkall telephone number>
Remove the Secret line from the USER Details area.

3. On your freePBX server, create a new Inbound Route and use the following information. (Everything else can be left alone.)

Description: IPKALL
DID Number: <the 10 digit ipkall telephone number>
Set Destination: <Indicate where this DID should terminate>

4. Save and update the FreePBX configuration.

Oct 25 2008

Everything you Need to Know about Ubuntu 8.10 - Intrepid Ibex

Ubuntu 8.10, named Intrepid Ibex, is scheduled for release next week, so we figured it’s time to run down the checklist of improvements, fixes, and enhancements since Hardy Heron came out earlier this year.

Everything you Need to Know about Ubuntu 8.10 - Intrepid Ibex | Maximum PC.

Oct 20 2008

Google Maps Fastest Roundtrip solver

At times my work requires me to visit many different properties during the course of a day. With the cost of fuel (and my time) I like to plan out the most efficient route to visit all these locations; going from one location to the next - until I’m back home.

geweb.net has developed a google map application that does this. Just keep adding addresses in any order and then click on Calculate Fastest Roundtrip!

Idealroute.com has tapped into the same application but has made the user interface a little more friendly.

Oct 06 2008

Ubuntu 8.10 Beta released

The Ubuntu team is pleased to announce the beta release of Ubuntu 8.10 Desktop and Server. Codenamed “Intrepid Ibex”, 8.10 continues Ubuntu’s proud tradition of integrating the latest and greatest open source technologies into a high-quality, easy-to-use Linux distribution.

The final version of Ubuntu 8.10 is expected to be released in October 2008.

Read more »

Oct 05 2008

A complete zenity dialog examples 1 » Linux by Examples

Have you ever needed to display information or get information from the user from within one of your scripts? There is a slick little utility for Gnome systems called ‘zenity‘ that will do the trick. (zenity for gnome, kdialog for KDE, xmessage for other windows managers) Here is a link to a site that has some zenity examples for you to try.

We have introduce how to make use of GUI dialog box in Using GUI dialog box, where we give an example of how zenity create a question dialog box. Besides question dialog box, zenity can create more than that, such as calendar, entry, error, info, file selection, list, notification, progress, warning, scale and text info. In this tutorial, we would like to illustrate how to create every single zenity dialog by examples.

A complete zenity dialog examples 1 » Linux by Examples.

Oct 04 2008

Canon MF4150 Printer Driver for Linux

I recently setup an Ubuntu desktop at a community center. They had a donated Canon MF4150 multifunction laser printer, scanner, and FAX that they wanted to use as the printer. (I just needed to get the printer portion working; not the scanner or FAX.)

Ubuntu 8.04 did not have a driver for the MF4150. Canon makes a driver for Debian/Ubuntu but does not offer it via their USA web site. However, if you go to their Australian web site you can download the driver. Their are two .deb files in the tar file that you download. Install both of them. You should now have the MF4100 Series driver listed when you go to install printers.

This got the printer working but the scanner still did not work.

Ok after digging around for a while, I’ve managed to get my scanner to work when connected to USB.
Read more »

Oct 02 2008

Helpful Tips

Here are some non IT related tips. I can’t vouch for the validity of any of these - your mileage may vary.

Read more »

Oct 02 2008

Free SSL Certification Authority

Security and encryption is getting ever more important in today’s computer networks, being it SSL secured web sites, encryption of data or mail, secure logon to mention just a few. But security is expensive, right? Not anymore….

StartCom, the vendor and distributor of StartCom Linux Operating Systems, also operates MediaHost™, a hosting company, which offered its clients, SSL secured web sites with certificates signed by StartCom for many years. That’s where the idea originated: Free SSL certificates!

StartCom Free SSL Certification Authority - Home.

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.

Oct 01 2008

Grsync rsync GUI interface frontend

Here’s a nice little program to setup rsync jobs using a GUI. It is also available from the Ubuntu software repository.

Grsync is a GUI (Graphical User Interface) for rsync, the commandline directory synchronization tool. It makes use of the GTK libraries and is released under the GPL license, so it is opensource. It doesn’t support all of rsync features, but can be effectively used to synchronize local directories and supports remote targets in a limited way (read: manual). For example some people use grsync to synchronize their music collection with removable devices or to backup personal files to a networked drive.

OPByte Software: Grsync rsync GUI interface frontend.

Sep 30 2008

My Ubuntu

Here are the packages from Ubuntu’s repositories that I like to install on my Ubuntu box:


Intrepid Ibex

sudo apt-get install amarok audacity beagle beagle-backend-evolution build-essential compizconfig-settings-manager cream exiv2 fdupes festival festvox-kallpc16k gnome-commander gnome-ppp gnucash gparted grsync hplip-gui imagemagick jpilot jpilot-plugins k3b lame libimage-exiftool-perl libk3b2-extracodecs libmp3lame0 libsox-fmt-all libvcdinfo0 libxine1-ffmpeg lm-sensors mail-notification mailutils msttcorefonts nautilus-actions nautilus-gksu nautilus-open-terminal ntfsprogs openssh-server pdfedit sensors-applet secpanel smbfs sox sshmenu-gnome ssmtp thunderbird thunderbird-beagle thunderbird-gnome-support ubuntu-restricted-extras vlc wine wipe

acidrip emerald libvlc0 mozilla-plugin-gnash pitivi seahorse


Hardy

sudo apt-get install acidrip amarok audacity beagle beagle-backend-evolution build-essential compizconfig-settings-manager cream emerald exiv2 fdupes festival festvox-kallpc16k gnome-commander gnome-ppp gnucash gparted grsync hplip-gui imagemagick jpilot jpilot-plugins k3b lame libimage-exiftool-perl libk3b2-extracodecs liblame0 libsox-fmt-all libvcdinfo0 libvlc0 lm-sensors mail-notification mailutils mozilla-plugin-gnash msttcorefonts nautilus-actions nautilus-gksu nautilus-open-terminal ntfsprogs openssh-server pdfedit pitivi seahorse sensors-applet secpanel smbfs sox sshmenu-gnome ssmtp thunderbird thunderbird-gnome-support ubuntu-restricted-extras vlc wine wipe

Here are the programs that I install or build from source on my Ubuntu box:

http://earth.google.com/
http://picasa.google.com/linux/
http://www.virtualbox.org/wiki/Downloads
http://www.aczoom.com/tools/cdinsert/#download
   then build http://sourceforge.net/projects/gtkcdlabel/
http://kornelix.squarespace.com/fotox/

Here are the applets that I enable or add to my gnome panel on my Ubuntu box:

Applications/Accessories/Terminal
Applications/Internet/Pidgin
Applications/Internet/Thunderbird
Applications/Office/GnuCash
Applications/Office/Jpilot
Applications/Office/OpenOffice.org Word Processor
Applications/Sound &amp; Video/Amarok
Custom Launcher: secpanel
Hardware Sensors Applet
System Monitor Applet
Weather Applet
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 »

Sep 13 2008

Premise Wiring Tutorial

Here is a nice simple document to get you acquainted with telecommunication/network premise wiring. (PDF)
premise_wiring_tutorial

Sep 12 2008

Share a Keyboard/Mouse Between Multiple Computers With x2x

Here is a great article from Linux Journal.

If you have multiple computers on your desktop there are a number of scenarios for using them:

* The brute force way: get a big desk and a swivel chair and spin back and forth between keyboards/mice
* Use VNC or rdesktop to control secondary computers from your primary computer. The main problem with this is that you lose all the screen real estate on your secondary computers and end up with their desktops showing in a window on your primary computer.
* Get a KVM to allow you to switch one keyboard/mouse between multiple computers.
The normal usage of a KVM is to switch your monitor as well as your keyboard and mouse, but that’s not required. KVM’s often seem like a great solution for many peripheral sharing problems, but they’re a bit of a hit-or-miss. They often have switching problems, system boot problems, video quality problems, and if you use multiple monitors a KVM to switch multiple monitors between systems gets pretty expensive.
* Use x2x, the solution we’ll examine here, to share the keyboard and mouse between systems.

There are two ways to run x2x on Linux, the easiest is to use ssh with X forwarding enabled and ssh from the primary system to the secondary system and run x2x on the secondary system:

primary $ ssh -X secondary x2x -east -to :0

The -X option tells ssh to enable X forwarding. The “x2x …” tells ssh to run x2x on the remote system (secondary) rather than running the shell. The “-east” option tells x2x where one system is relative to the other: to the east or west (-west).

The primary system is the system whose keyboard and mouse you are actually using. The secondary system is the one that is going to share the primary system’s keyboard and mouse.

Now, if you move the mouse on the primary system over to the edge where the secondary system is the mouse pointer should move from the primary screen to the secondary screen and from now on any mouse movement should be passed to the secondary system and anything you type on the keyboard should be sent to the secondary system. If this doesn’t work try moving the mouse to the other side of the screen, if that works then restart the command using “-west” rather than “-east”.

The other method of running x2x on a Linux system is to run it directly on the primary system and tell it to connect to the X server on the secondary system:

primary $ x2x -to secondary:0.0 -east

The reason this is not the easy method is that you also need to enable remote X access on the secondary system using xhost:

secondary $ xhost primary

and you also need to open TCP port 6000 on both systems. The easiest way of doing this is going to depend on your distro.

The main advantage of the second method is that copy/paste will now work between systems.

Getting x2x to work on a Windoze system takes a bit more work, mostly because first you have to install Cygwin. Although, if you’re a Linux fan you should already have it installed, it’s the only way to make Windoze bearable. When you’re installing Cygwin make sure x2x is selected in the list of available packages.

Using x2x with Cygwin has a couple of restrictions/problems:

* You can’t use the ssh connection method.
* You have to use the Windoze system as the primary system (i.e. you have to use the keyboard and mouse on the Windoze system).
* If you have multiple displays on your Windoze system you’ll probably experience mouse problems when you return the mouse from a secondary display. The only workaround is to move the mouse very very slowly when you’re about to move off a secondary display onto the primary display.

When using x2x on Windoze run the following command from a shell prompt:

windoze $ x2x -fromwin -to secondary:0.0 -east

Generally speaking x2x works very well both on Linux and on Windoze. Every once in a while you may get a bit of mouse flakiness when you move a window on a secondary display. Also once in a while, when using the shift key you may get the unshifted character on the secondary system if you type too fast. But in most instances you won’t notice any difference between typing/mousing on the primary system and on the secondary system.

p.s. If you have a problem where you get a “>” when you type “< " you need to find a newer version of x2x. This is long-standing bug that was recently fixed.

Aug 21 2008

FreeNX - Next Generation Remote Display

Optimize remote X sessions with NX. NX will also let you run remote X sessions from a Windows machine.

Next Generation Remote Display

NX is an exciting new technology for remote display. It provides near local speed application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by NoMachine under the GPL. FreeNX is a GPL implementation of the NX Server.

FreeNX - the free NX.

Video: http://www.youtube.com/watch?v=EUWMdgN51oQ

Aug 20 2008

nodoze - prepares websites built using Microsoft Windows for unix servers

This is a slick little perl script to move sites from a Windows web server to a Unix web server.

When websites are built on computers running Microsoft Windows, the case of file and directory names is often ignored. Other “widowsizms” are also introduced such as ending files with .htm instead of .html. This causes BIG problems if the site is served under unix.

nodoze is a “quick and dirty” Perl program to repair these websites so that they will work properly on a unix server.

nodoze - prepares websites built using Microsoft Windows for unix servers

Aug 14 2008

Unix ‘ln’ tip

Links are commonly used to point from one filesystem location to another. They also have a more surprising use: to make a program that does several things, deciding what to do by checking the name it was called with. Here’s an example: a single program in /usr/bin that sets, shows, and removes at jobs:

$ ls -l at*
-rwsr-sr-x 1 ... at
lrwxrwxrwx 1 ... atq -> at
lrwxrwxrwx 1 ... atrm -> at

These are simple to write as shell scripts. The script simply needs to test its name:

myname=${0##*/}  # Program name without path
case "$myname" in
at) ... ;;
atq) ... ;;
atrm) ... ;;
*) echo "$0 ERROR: ..." 1>&2; exit 1 ;;
esac
Aug 14 2008

PNY NVIDIA GeForce 8500 GT

I just picked up a PNY NVIDIA GeForce 8500 GT PCI Express x16 video card for $60 at buy.com. It has 512 MB of memory, a DVI port, and a VGA port and allows you to run two monitors under Ubuntu 8.04 just fine.

You can either download the restricted nvidia driver from the Ubuntu repositories, or manually download the latest driver from Nvidia’s web site.

You can set it up so that both monitors act as one large desktop, or each monitor as its own X-Server screen by running nvidia-settings.

Aug 14 2008

Palo Alto PA-420 provides great visibility into network threats

This is one device to keep an eye on. It will identify applications running on non standard ports and allow you to block/permit them.

In this Clear Choice, we found the Palo Alto Networks PA-4020 to be an innovative turn on the traditional firewall (see Is Palo Alto’s firewall a firewall or not?). By looking at application data streams, rather than TCP/IP port numbers, the PA-4020 is able to provide a finer-grained control over end-user Internet usage than has previously been available in any firewall. The PA-4020 also leverages this application knowledge to provide unprecedented (for a firewall, that is) levels of visibility into network traffic.

Palo Alto provides great visibility into network threats - Network World.

Aug 06 2008

Can Passive Radio Eavesdroppers Listen In On Your Company?

This article from InformationWeek shows why you should avoid cordless phones for sensitive converstations.

Passive radio eavesdropping is a low-budget, relatively safe way for potential attackers to scout out targets. Anyone in your organization using a wireless headset or cord-less phone is potentially broadcasting sensitive material.

Tech Tracker: Can Passive Radio Eavesdroppers Listen In On Your Company? — Wireless.

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 18 2008

WordPress 2.6

Version 2.6 of WordPress.org is now available, almost a month ahead schedule. Version 2.6 “Tyner,” named for jazz pianist McCoy Tyner, contains a number of new features that make WordPress a more powerful CMS: you can now track changes to every post and page and easily post from wherever you are on the web, plus there are dozens of incremental improvements to the features introduced in version 2.5.

A brief video tour of 2.6 has been prepared. If you have 3 minutes and 29 seconds to spare, it’s worth a watch:

WordPress › Blog » WordPress 2.6.

Jul 17 2008

J-Pilot 1.6.0 released

J-Pilot is a desktop organizer application for PalmOS devices

J-Pilot version 1.6.0 released.
The major improvements are Contacts, and Memos support.
As usual, many many bug fixes and improvements, see the ChangeLog for details.

2008-07-17 update:
This version has a bug that prevents the –enable-alarm-shell-danger configuration flag from working. To workaround the problem try the following steps:

1 run ./configure with whatever options you normally include
2 edit the generated file "config.h"
> Search for ENABLE_ALARM_SHELL_DANGER
> Change the commented line to read '#define ENABLE_ALARM_SHELL_DANGER 1'
> Save and close the file
3 run make normally
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
Jul 04 2008

sshmenu-gnome

Here is a great little gnome panel applet for organizing all your ssh sessions.
Ubuntu — Details of package sshmenu-gnome in hardy

sshmenu-gnome puts all your most frequently used SSH connections on a menu in your GNOME panel. Click on a host name to open a new gnome-terminal window with an ssh connection to the selected host. Set up options for port forwarding, etc. using the preferences dialog.

Here is a nice site that will give you an overview of sshmenu.

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 24 2008

Elastix - The reliable PBX appliance software

I just discovered Elastix, It is an ISO image that installs CentOS, Asterisk, FreePBX, and other goodies to create an instant PBX. Compare it to PBX In A Flash and Trixbox.

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.

Jun 04 2008

Microsoft Free - One year later

Microsoft Free - One year later

All I can say is that for the last year, I have been using Open Source exclusively and I am loving it

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 28 2008

Wizard Boot Camp, Part Six: Daemons & Subshells | Linux Magazine

Wizard Boot Camp, Part Six: Daemons & Subshells | Linux Magazine

Let’s continue our discussion of Linux processes with a look at two unrelated concepts that are both good to understand. First we’ll write a simple daemon process and send signals to it. Then we’ll see how to suspend a child shell — which gives some insight into how shells cope with signals sent to them.

May 28 2008

Sweeten your Vim with Cream

Sweeten your Vim with Cream | Linux Magazine

There has to be some way to ease users into Vim, some way to leverage the power of Vim while accommodating, or even overcoming, the steep learning curve. Fortunately, there is a solution: Cream.

May 28 2008

Grandstream HandyTone ATA “Busy” after sitting for awhile - No dial tone

The Grandstream HandTones have an issue where Asterisk thinks the device is busy after it sits for awhile. Calling the extension programmed for the device will send your call to voicemail. Picking up the handset will result in no dial tone. However if you hangup and pickup the handset again you will get dial tone. Calling the extension will now ring the phone … for awhile, and then the pattern repeats.

Here is a work around for this.
1. Set the Grandstream to NOT register for any extensions (FXS and/or FXO ports)
2. Set the sip.conf entry for the Grandstream to use a ‘host=ip address’ instead of ‘host=dynamic’. (I.e. host=192.168.0.2)

If you are using FreePBX then do not touch the sip.conf file. Instead bring up the extension associated with the Grandstream device and change the “Host” field from dynamic to the IP address of the Grandstream.

Of course you will want to use DHCP reservations for the Grandstream or assign a static IP address so that the IP address does not change.

I can’t explain why Asterisk and Grandstream don’t play nice together when Asterisk is set to use a dynamic address. All that I know is that everything works perfectly when you assign the IP address. Maybe someone else can shed some light on this phenomenon.

May 10 2008

Soft Phones : iaxLite and sipLite

I was looking for a small, lite weight software based phone for my Windows laptop that would connect back to my Asterisk PBX using the IAX protocol. iaxLite is perfect and works great. I haven’t tried sipLite (same phone but uses theSIP protocol) yet. Well worth a look if you are using Windows.
Soft Phone : iaxTalk.com !, VOIP::Asterisk::Phone::ATA::USB

iaxLite is a IAX2 softphone. sipLite is a SIP softphone

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 27 2008

Hands on with Ubuntu 8.04

Desktop Linux for the masses. Who needs Windows anymore?
Hands on with Ubuntu 8.04 :: Linux Format :: The website of the UKs best-selling Linux magazine

Yes, the Hardy Heron is here This is the new Long Term Support LTS release of Ubuntu, and is possibly the most eagerly anticipated distro of all time. Read on for our hands-on look at the new features, with screenshots galore…

Apr 14 2008

Wizard Boot Camp, Part Five: Control Processes Using Signals | Linux Magazine

Here is a good article on processes and signals on a Unix/Linux system. This also shows why sending a ‘kill -9′ to terminate a normal process is a bad idea. It doesn’t give the process a chance to clean up after itself.

Wizard Boot Camp, Part Five: Control Processes Using Signals | Linux Magazine

This month we’ll dig into process control: signals sent to processes and how a shell handles processes, including some details on job control.

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.