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.

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!

Tags: § § § § § §

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.

Tags: § § §

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…

Tags: § § § § §

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.

Tags: §

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
Tags: §

=> 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
Tags: § §

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
Tags: § §

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.

Tags:

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…

Tags: § §

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.

Tags: § § §

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
Tags: § § §

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.

Tags: § § §

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

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

Ubuntu 8.04 Hardy Heron How-To

Tags: § §

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.

Tags: § § § § § §

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.

Tags: § § §

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.

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

Tags: § § §

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.

Tags: § §

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

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

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

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.

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…

Tags: §

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.

Tags: § § § § §

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.

Tags: § § §

The Wetware Crisis: the Dead Sea effect : Bruce F. Webster

Many large corporate/government IT shops — and not a few small ones — work like the Dead Sea. New hires are brought in as management deems it necessary. Their qualifications talent, education, professionalism, experience, skills — TEPES will tend to vary quite a bit, depending upon current needs, employee departure, the personnel budget, and the general hiring ability of those doing the hiring. All things being equal, the general competency of the IT department should have roughly the same distribution as the incoming hires.

But in my experience, that’s not what happens. Instead, what happens is that the more talented and effective IT engineers are the ones most likely to leave — to evaporate, if you will. They are the ones least likely to put up with the frequent stupidities and workplace problems that plague large organizations; they are also the ones most likely to have other opportunities that they can readily move to.

What tends to remain behind is the ‘residue’ — the least talented and effective IT engineers. They tend to be grateful they have a job and make fewer demands on management; even if they find the workplace unpleasant, they are the least likely to be able to find a job elsewhere. They tend to entrench themselves, becoming maintenance experts on critical systems, assuming responsibilities that no one else wants so that the organization can’t afford to let them go.

I’m painting with pretty broad strokes here, yet I’ve seen this same effect taking place in different companies and different IT shops. Large companies tend to lose the really talented IT engineers and hold onto the less talented ones, when they should been actively seeking to do just the opposite. And the effect tends to be self-reinforcing: the worse an IT shop becomes, the harder it is to get really talented and effective IT engineers to join it and the harder it is to retain them if they do. It can reach a point that the really good talent only comes in as entry-level personnel who don’t know any better — but once they do wise up, they’re gone.

Tags: § §

Garmin: POI Loader

Import customized points of interest created by others with the help of Garmin’s new POI Loader software. In today’s fast-paced world, points of interest are ever-changing. With the help of POI Loader, you can now add your favorite new restaurant, or that supermarket having the grand opening, as points of interest (POIs) to your compatible Garmin GPS. The possibilities are endless — upload safety cameras or school zones, and you will receive a warning if you are traveling too fast. In addition, an optional proximity-alert feature notifies you of upcoming custom POIs. Our free, new POI Loader software lets you personalize your GPS, giving you the freedom and flexibility to literally go anywhere.

Tags: § § §

Do you like to play games on your computer? Linux has a never ending supply. Check out this site.
The Linux Game Tome

Tags: §

Do you learn better by watching something rather than reading? If so, then maybe this site is for you. They provide many HOWTO videos for Ubuntu.
Ubuntu Screencasts

Tags: § § §

There are two candidates for this; FlyBack and TimeVault. Check them out:

flyback - Google Code

Apple’s Time Machine is a great feature in their OS, and Linux has almost all of the required technology already built in to recreate it. This is a simple GUI to make it easy to use.

Website: http://flyback-project.org/

TimeVault - Ubuntu Wiki

TimeVault is a simple front-end for making snapshots of a set of directories. Snapshots are a copy of a directory structure or file at a certain point in time. Restore functionality is integrated into Nautilus - previous versions of a file or directory that has a snapshot can be accessed by examining the properties and selecting the ‘Previous Versions’ tab.

Snapshots are protected from accidental deletion or modification since they are read-only by default. The super-user can delete intermediate snapshots to save space, but files and directories that existed before or after the deletion will still be accessible.

Website: https://launchpad.net/timevault

Tweaking Hidden Ubuntu Settings With Ubuntu Tweak | HowtoForge - Linux Howtos and Tutorials

Ubuntu Tweak is a tool that lets you change hidden Ubuntu settings, for example: hide or change the splash screen, show or hide the Computer, Home, Trash, and Network icons, change Metacity, Nautilus, power management, and security settings, etc. Currently Ubuntu Tweak is available only for the Ubuntu GNOME desktop, i.e., it will not work on Kubuntu or Xubuntu. This short guide shows how to install and use Ubuntu Tweak.

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.

Widgets are now part of WordPress core since version 2.2. You can proceed straight to the WordPress Widgets Blog to find some widgets to try out for your WordPress blog.

Tags: §

TippingPoint | DVLabs | PWN to OWN: Final Day and another winner

So at the end of the last day of the contest, only the Sony VAIO laptop running Ubuntu was left standing.

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…

I successfully got my Garmin GPS connected by using Virtualbox. It took a while because Ubuntu 7.10 Gutsy Gibbon removed support for /proc/bus/usb which Virtualbox depends upon. I got USB support working by tweaking a script and adding a couple of groups. Follow these steps and Virtualbox will be installed with USB support in no time.

Read more…

Tags: § § §

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…

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…

/*
 TOP SECRET Microsoft(c) Project: Longhorn(TM) SP1
 Estimated release date: 2008
*/

#include "win95.h"
#include "win98.h"
 #include "leopard.h"

char chew_up_some_ram[10000000];

void main() {
 while (!CRASHED) {

  if (first_time_install) {
   make_10_gigabyte_swapfile();
   do_nothing_loop();
   search_and_destroy(FIREFOX | OPENOFFICEORG | ANYTHING_GOOGLE);
   hang_system;
  }
  if (still_not_crashed) {
   basically_run_windows_xp();
   do_nothing_loop();
  }
 }
 if (!DX10GPU()) {
  set_graphics(aero, very_slow);
  set_mouse(reaction, sometimes);
 }

 // printf("Welcome to Windows 2000");
 // printf("Welcome to Windows XP");
 printf("Welcome to Windows Vista");

 while (something) {
  sleep(10);
  get_user_input();
  sleep(10);
  act_on_user_input();
  sleep(10);
  flicker_led_promisingly(hard_disk);
 }

 create_general_protection_fault();
}

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!

Arduino is cool. It’s cool because it’s a tiny device - about three inches by two inches - that comes with a USB port and a programmable chip. It’s cool because you can program it using a very simple programming language known as Wiring. But most of all, it’s cool because the entire reference design for the hardware is available under a Creative Commons license, so you’re free to build your own if you want to.

Arduino - HomePage

Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It’s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board.

Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects can be stand-alone, or they can be communicate with software running on your computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free.

The Arduino programming language is an implementation of Wiring, a similar physical computing platform, which is based on the Processing multimedia programming environment.

The Arduino Diecimila is a microcontroller board based on the ATmega168. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.

Here’s a copy of an old item that I’ve kept around for a couple decades… I hope you’ll enjoy it :-)

7.3 Safety Factors
The output of any calculation is only as good as its input. With good data, simple calculations can yield accurate answers that are sometimes quite useful. Don Knuth once wrote a disk sorting package, only to find that it took twice the time predicted by his calculations. Diligent checking uncovered the flaw: due to a software bug, the system’s one-year-old disks had run at only half their advertised speed for their entire lives. When the bug was fixed, Knuth’s sorting package behaved as predicted and every other disk-bound program also ran faster.

Often, though, sloppy input is enough to get into the right ballpark. (The estimation quiz in Appendix 2 may help you to judge the quality of your guesses.) If you guess about twenty percent here and fifty percent there and still find that a design is a hundred times above or below specification, additional accuracy isn’t needed. But before placing too much confidence in a twenty percent margin of error, consider Vic Vyssotsky’s* advice from a talk he has given on several occasions.

“Most of you”, says Vyssotsky, “probably recall pictures of ‘Galloping Gertie’, the Tacoma Narrows Bridge which tore itself apart in a windstorm in 1940. Well, suspension bridges had been ripping themselves apart that way for eighty years or so before Galloping Gertie. It’s an aerodynamic lift phenomenon, and to do a proper engineering calculation of the forces, which involve drastic nonlinearities, you have to use the mathematics and concepts of Kolmogorov to model the eddy spectrum. Nobody really knew how to do this correctly in detail until the 1950’s or thereabouts. So, why hasn’t the Brooklyn Bridge torn itself apart, like Galloping Gertie?

“It’s because John Roebling had sense enough to know what he didn’t know. His notes and letters on the design of the Brooklyn Bridge still exist, and they are a fascinating example of a good engineer recognizing the limits of his knowledge. He knew about aerodynamic lift on suspension bridges; he had watched it. And he knew he didn’t know enough to model it. So he designed the stiffness of the truss on the Brooklyn Bridge roadway to be six times what a normal calculation based on known static and dynamic loads would have called for. And, he specified a network of diagonal stays running down to the roadway, to stiffen the entire bridge structure. Go look at those sometime; they’re almost unique.

“When Roebling was asked whether his proposed bridge wouldn’t collapse like so many others, he said, ‘No, because I designed it six times as strong as it needs to be, to prevent that from happening.’

“Roebling was a good engineer, and he built a good bridge, by employing a huge safety factor to compensate for his ignorance. Do we do that? I submit to you that in calculating performance of our real-time software systems we ought to derate them by a factor of two, or four, or six, to compensate for our ignorance. In making reliability/availability commitments, we ought to stay back from the objectives we think we can meet by a factor of ten, to compensate for our ignorance. In estimating size and cost and schedule, we should be conservative by a factor of two or four to compensate for our ignorance. We should design the way John Roebling did, and not the way his contemporaries did — so far as I know, none of the suspension bridges built by Roebling’s contemporaries in the United States still stands, and a quarter of all the bridges of any type built in the U.S. in the 1870’s collapsed within ten years of their construction.

“Are we engineers, like John Roebling? I wonder.”

(Section 7.3 of Programming Pearls by Jon Bently)
—–
*Victor A. (Vic) Vyssotsky, worked as a mathematician and computer scientist at Bell Labs and later as the Director of the Cambridge Research Laboratory of the Digital Equipment Corporation. Vic is credited as one of the originators of Core Wars in August 1961 (thought it was called Darwin at the time), which many years later unfortunately indirectly led to computer viruses. Vic was a member of the Triumvirate that managed the creation of MULTICS, a precursor to UNIX and LINUX. Vic coined the term ‘process’ for MULTICS.

I’ve been looking high and low for a good Linux photo program that can stitch together photos to make a panorama image. On the Windows side I had Photostitch which came with my Canon camera. It was quick and easy to use. Now we have Fotox on the Linux side which is even easier to use. I download the source code and typed ‘build’ to make it. Done. Not only does it create panoramas but you can also do many other edits to your photos. Look at the list below.

fotox - kornelix

Fotox is a free open-source Linux program for improving image files made with a digital camera.

The following functions are provided:

* Show thumbnails of image files in a directory, navigate, choose files to view or edit.
* Adjust overexposed or underexposed areas to improve visibility of detail
(change brightness independently for different brightness levels).
* Reduce fog or haze by removing “whiteness” and intensifying colors.
* High dynamic range (HDR) photography: combine an underexposed and overexposed image to improve details visible in both bright and dark areas. Automatic image alignment.
* Photo stitching or panorama: stitch two or more images together to make an ultra-wide image.
Simple image alignment and brightness / color matching.
* Crop an image (choose the area of interest and cut-off the margins).
* Rotate an image by any angle (level a tilted image, or turn in 90 degree steps).
* Resize an image, with convenience buttons for 2/3, 1/2, 1/3 and 1/4 size.
* Red-eye removal.

USB Ubuntu 7.10 Gutsy Gibbon install | USB Pen Drive Linux

This tutorial enables you to install, boot and run Ubuntu 7.10 (Gutsy Gibbon) from a USB flash drive.

Read more…

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.

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!

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.

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.

APT is a front end for the Debian and Ubuntu package manager. If you have used debian for any length of time you probably have run the command ‘apt-get install somepackage’ to install some package. If that is all you have used apt for then look at this list for some of the other things you can do with apt.
Read more…

A=Alfa		N=November

B=Bravo		O=Oscar

C=Charlie	P=Papa

D=Delta		Q=Quebec

E=Echo		R=Romeo

F=Foxtrot	S=Sierra

G=Golf		T=Tango

H=Hotel		U=Uniform

I=India		V=Victor

J=Juliett	W=Whiskey

K=Kilo		X=X-ray

L=Lima		Y=Yankee

M=Mike		Z=Zulu

DS-0, DS-1, T1, DS-3, T3, STS-1, OC-1, STS-3, OC-3, OC-12, OC-48

  Bandwidth Async. Sync. Elec. Opt. Payload
DS-0 64Kbps X   X    
DS-1 1.544Mbps X   X   24 X DS-0s
SDS-3 44.7Mbps X   X   28 X DS-1s
STS-1 51.84Mbps   X X   1 X DS-3
OC-1 51.84Mbps   X   X 1 X DS-3
STS-3 155.520Mbps   X X   3 X DS-3s
OC-3 155.520Mbps   X   X 3 X DS-3s
STS-12 622.08Mbps   X X   12 X DS-3s
OC-12 622Mbps   X   X 12 X DS-3s
OC-48 2488.32Mbps   X   X 48 X DS-3s

Here is a great little program to create CD/DVD inserts for jewel cases and to create CD/DVD envelopes. You will need to compile it from source code but it works great. There is also an online version of cdlabelgen here.

gtkcdlabel

gtkcdlabel is a GUI frontend to cdlabelgen which is a program that can generate a variety of CD tray covers. The code is based on gcombust and gcdlabelgen.

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.

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 <