Installing Tomcat 7.0.x on OS X in 12 Seconds!

Yes, you read that right. I installed the newest version of Tomcat in just 12 seconds. Look, no hands:

$ brew install tomcat

that’s it. it even puts in a symlink for me so I can start the server just like: $ catalina start

Well, how did I do that? If you have heard of Homebrew this is probably old news. Homebrew is the best Mac OS X installation package. Give it a try by following the install instruction here.

After you’ve used brew install a bit, you might wonder, how did the magic happen?

The magic is a bunch of installation instructions (called formulae) stored in an internet repository, github https://github.com/mxcl/homebrew/tree/master/Library/Formula/ Because homebrew is an open source project, a lot people keep these formulae current, and if one formula needs modification for a newer version of a released software, anyone can probably do it and submit the code to github so that the next person will benefit from the update. Take a look at what made the above tomcat install happen so easily in the tomcat.rb file from the above link:

require 'formula'

class Tomcat < Formula
homepage 'http://tomcat.apache.org/'
url 'http://www.apache.org/dyn/closer.cgi?path=tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26.tar.gz'
md5 '00d310f2f4e15821951e9d206af45c6b'

skip_clean :all

def install
# Remove Windows scripts
rm_rf Dir['bin/*.bat']

# Install files
prefix.install %w{ NOTICE LICENSE RELEASE-NOTES RUNNING.txt }
libexec.install Dir['*']
bin.install_symlink "#{libexec}/bin/catalina.sh" => "catalina"
end
end

Even if you are no Ruby developer, you can probably figure out the above code without any trouble.

Intrigued? Now try installing mysql. Yes, indeed:

$ brew install mysql

Cool.

Categories: Uncategorized | Tags: , , | Leave a comment

Panama

Photos from my recent trip to Panama. Que linda es la tierra.

Enjoy:

Categories: Uncategorized | Leave a comment

Install Samsung ML-1740 Printer Driver in OS X

I recently bought a MacBook Pro running OS X, and one of the set up tasks for the Mac is to set it up to print to the Samsung ML-1740 laser printer.

ML-1740 is a “GDI” printer. GDI printers are typically inexpensive printers designed specifically for Windows operating system. If you are interested to learn more about GDI, read more about it here

The bottomline is ML-1740 can’t work with a Mac… unless you jump through some hoops.

Luckily, the solution to the problem has been around for a long time, it’s called CUPS, i.e. Common Unix Printing System. Essentially, it’s a print server that can translate a printing command from a Unix-like operating system into specific printer formats.

To print to Ml-1740 from OS X, you need a few pieces of translation software, and they are:

1. a Samsung ML-1740 GDI to PPD driver file which can be used by CUPS. You can download the Samsung ML-1740 CUPS driver from OpenPrinting.org. The direct download link is: http://www.openprinting.org/ppd-o-matic.php?driver=gdi&printer=Samsung-ML-1740&show=0

PPD is the common driver file extension for CUPS. Having this extension does not mean the driver is actually a postscript printer driver.

2. Ghostscript for Snow Leopard. Downloaded from http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/foomatic

Install Ghostscript first, because the foomatic filter depends on it.

3. Foomatic filter for Snow Leopard. Also downloaded from http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/foomatic

After downloading, install the filter.

Now you are ready to set up your printer via the CUPS management console.

Snow Leopard comes with CUPS pre-installed and configured to run. The easiest way access the CUPS server is using your browser. Point the browser at this address: http://localhost:631

You will see the CUPS homepage. From there, click on Add Printers, and log in. The user name and password are your regular ones, unless your user name contains spaces or upper case letters. In that case, type in the user name all in lower cases and without any space. After you log in, you can choose Add Printer from the next screen.

You’ll go through the configuration section for the connection properties to the printer, after that you will see a button to select the driver to use to connect to the printer. Select the PPD file you just downloaded.

Finally click on Add Printer and you are now all set to print from your MacBook to the Samsung ML-1740 printer.

Categories: Samsung ML-1740 | 18 Comments

Transfer iTune libraries to a new computer

This is a common enough scenario, isn’t it?

It’s surprising that when I had to do this for my son’s new PC, I googled and couldn’t find an answer on how to do this without buying a specialty software tool. Don’t know why Apple doesn’t just publish a FAQ topic on it. As I discovered, it’s simple enough to do it yourself; you do need a little bit of computer skills, mainly be comfortable with a text editing tool, like notepad.exe, in order to do a mass search and replace operation on a text file.

The high level concept is this: moving an itune library is like moving house. Step 1 is to box up your stuff; step 2 is to write down instructions to the movers on where your stuff needs to end up in your new house; step 3 is the physical move to the new house.

Now let’s see how that applies to moving itune libraries.

Step 1. Gather your music files into one location. By default, music files are scattered all over your computer, and that makes moving them cumbersome. Use the Consolidate Library function in itune which copies all your music files into one single folder. Follow this link: http://www.itunes10.org/itunes-10-consolidate-itunes-library/ to perform this step.

2. Next, tell the “movers” where the new library will end up in your new computer.

To do that, you use the “Export library” function in iTune, which produces an XML file containing the references on where the music files reside on your current computer. Let’s assume this file is called library.xml

Now, here comes the technical part. You need to open up the .xml file in a text editor. I use notepad.exe on Windows. But if you prefer to do this in vi, more powers to you. Inside the text editor, do a mass search and replace on the string representing the existing itune music directory to your target itune directory (note the UNC syntax Apple uses for their directory names and follow that). Since all your music files now reside under a single parent directory, you only need to do this operation once.

Step 3. Transfer the music files to the new computer, along with the edited library.xml file, to the new itune directory location on the new computer.

Finally, launch itune on the new computer, and import the library.xml file.

Voila, all your music files along with all the meta data you had kept on them just magically show up in their new home. Now connect whatever iPod or iPhone devices you may have, and you are back in business.

Categories: Uncategorized | Tags: | Leave a comment

Linux Filesystem Viewer for Windows

Linux has long been able to mount both Windows NTFS and FAT file systems, but the reverse is not true in Windows.

To view a ext2 or ext3 file system, I tried a tool called DiskInternals Linux Reader, downloaded from the company’s web site: http://www.diskinternals.com/download.shtml. I installed it on my dual boot Windows XP/Kubuntu server.

I can now see my Linux file systems in Windows XP, but if you need to read the files, you’d have to use the recovery option in the DiskInternals tool and make a copy of the file.

I guess it works for those emergency situations that you need to get a file from the Linux partition, but it is not very convenient.

So I tried a second software, called Ext2 Installable File System For Windows, from http://www.fs-driver.org/download.html. Despite the name of the product, the software works for both Ext2 and Ext3 file systems, and you have the option of disabling the write access to the Linux partition. After the install, you can mount the Linux partitions to their own drive letters, and they show up just like any other NT drives. By the way, the configuration is done through a file, ifsdrives.cpl in Windows XP, which you access through the control panel.

There are some technical issues related to mounting of an Ext3 partition vs. an Ext2 one. The Ext3 file system is the Ext2 file system which has been extended by journaling. It is backward-compatible to Ext2 – an Ext3 volume can be mounted and used as an Ext2 volume. The Ext2 IFS software is smart enough to check the Ext3 file system and will refuse mounting an Ext3 file system which contains data in its journal, just like older Linux kernels which have no Ext3 support. This way, it avoids potentially corrupting the file system in case of a prior system crash in Linux.

All and all, the IFS software is a great tool. Kudos to the folks at fs-driver.org.

Categories: accessing EXT3 in Windows, DiskInternals, fs-driver, linux | Leave a comment

Setting up SAMBA server on Kubuntu and client on XP

So today I decided to set up a SAMBA server on my Kubuntu because this is where my music collection is stored. My son uses the music library to sync up his ipod, and his computer is often running Windows XP.

To install SAMBA, I used the Kubuntu Debian package manager. Very straight forward.

Afterwards, before I did any configuration of the SAMBA server, I checked the SAMBA install from the XP client using \\ip_address, and it’s already there! The printer is shared. Cool.

Step two, add the shared folders. Now, a lot of people will quickly tell you to go edit the /etc/samba/smb.conf file. DON’T. It’s a waste of time for a simple home project like this. SAMBA works fine out of the box by default for a small network, and there is a graphic user interface in Kubuntu to handle the folder sharing.

You get to the configuration via System Settings –> Sharing –> File Sharing. Enter administrator mode and you are ready to roll. I added the My Music folder to the SAMBA share, and next thing I know, it’s showed up nicely on XP.

What if you would like to limit the access to the shared folder? That’s where a lot of the problems happened in the past between Windows and SAMBA and if you do a search on the Internet, you’d find numerous postings on this topic, most of them, unfortunately, are NOT helpful.

To add users to a shared folder, you can also use the GUI by selecting “More SAMBA option” then the User tab. Once there, click on the “Expert” button and add the users and assign their access privileges.

Done? Well, not so fast. If you try to access the folder from your XP client now, you’ll see an authentication dialog asking for your user name and password. But it will not authenticate you even if you type in the correct credentials.

You see, Windows XP encrypts the passwords by default. So how is my Kubuntu linux going to understand the passwords being sent from an XP client?

This is where a simple SAMBA utility came into play. The utility is called smbpasswd and can keep track your Linux user names and encrypted passwords in a database on Kubuntu. Run the following command:

sudo smbpasswd -a your_user_name

-a stands for add. The program will prompt you to enter and confirm your password.

Now try again from your Windows client. Voila. All this functionality was accomplished without a single attempt to manually edit the smb.conf file.

Categories: linux, SAMBA, Windows Authentication | 1 Comment

Hub Fans Bid Kid Adieu

Hub Fans Bid Kid Adieu: John Updike on Ted Williams is a commemorative edition of John Updike’s original essay on the last game played by Ted Williams 50 years ago.

I am a rabid fan of both the Red Sox and John Updike. This new edition includes the original essay published in the New Yorker magazine in 1960; an autobiographical preface written by Updike just before his own death; and a new afterword on Williams’s life based on a compilation of Updike’s writings including the Williams eulogy published in the New York Times.

The essay began by describing the setting of Williams’s last game, Fenway Park, calling a “lyric little bandbox” that looks “like the inside of an old-fashioned, peeping-type Easter egg,” . This kind of whimsical praise of the old ballpark may not seem original today, but at the time, there was no Red Sox Nation back then. The club was a bottom-dweller and very few fans were waxing poetic on the club or its ball park.

Hub Fans Bid Kid Adieu was often hailed as one of the best baseball essays of all time. Updike himself humbly admits in the preface that the New Yorker editor praised it as the best baseball writing published by the magazine at the time, but then he added that the New Yorker had also shunned baseball articles and had not published many on the subject.

I enjoyed the book tremendously, and it stands “enshrined” next to my collection of Red Sox Encyclopedia.  On this grey October afternoon after my beloved team was eliminated from post season, there’s hope in the air for next year.  Right?

Categories: Uncategorized | Tags: | Leave a comment

Installing VMWare Server on Kubuntu

The VMWare Server is a free product you can download directly from VMWare. You do need to register to get a serial number to complete the installation.

The installation on Kubuntu is pretty straight forward. You need sudo privilege to run the configuration program, otherwise, the program complains. Also, either xinetd or inetd is requires. I added xinetd to my Kubuntu via adept manager since it wasn’t installed prior.

After the installation, I tried to start the application but got an error. It was complaining about a libgcc_s.so.1 file in usr/lib/vmware/lib. Apparently this is a known problem after a quick search on the internet. Simply move the file out of the way solved the problem.

Voila. That’s it. VMWare server is up and running on my Kubuntu.

Oh, I also created a new partition for use by the VMWare to store the images. Just in case, I figured it couldn’t hurt. I mounted the partition to /vmimages and configured the default path in VMWare to point to the new partition. The setting is under “Host Settings” tab. A sudo privilege is required to make this change.

Next step, install Solaris 10 under VMWare. Fingers crossed…

Categories: linux, vmware linux kubuntu | Leave a comment

Ayasofya

I took this photo at Ayasofya in Istanbul.  I thought it presented a kaleidoscopic view of the museum’s rich past: Ayasofya was a former Orthodox patriarchal basilica, later a mosque and now a museum in Istanbul.

Notes: 4

Another view of the Mihrab in Ayasofya.  Built in the 6th century, it was once the greatest church in Christendom and was the largest cathedral in the world for nearly a thousand years, until Seville Cathedral was completed in 1520.

External view of Ayasofya.  The four minarets were added over the course of its history under the Ottomans.

Categories: Istanbul, Travel, Turkey | Tags: , , | Leave a comment

Memories of Istanbul

A collection of photos from our family summer trip to Istanbul, Turkey.

Click on the photo below to view the collage in its full size:

Categories: Istanbul, Travel, Turkey | Leave a comment