Maclochlainn's Weblog

Michael McLaughlin's Old Technical Blog

Archive for the ‘Mac’ Category

Migrating to a new blog site …

with one comment


A number of friends wanted me to do things that weren’t possible while keeping my blog on WordPress.com’s web site. Things like code formatting, downloads for software, et cetera …

You can find the new blog at: http://blog.mclaughlinsoftware.com

So, I’ve migrated it to my own domain. I’m in the process of configuring the rest of the domain. I’ll update you through the blog as I complete the process.

I’ve got grand plans (lets hope there’s time). For example, I’m planning to migrate and update the TechTinker.com domain too. I’ll plan tutorials on Java, PL/SQL, and PHP initially as well as administration tips, techniques and walk through steps for my favorite platforms. As time allows, I’ve got some stuff comparing SQL across platforms – much beyond the trivial Oracle’s SPOOL is MySQL’s tee (not herbal tea).

While my perspective may change over time, I’m quite fond of Mac OS X, Ubuntu, and Red Hat. I won’t exclude Microsoft because we must live with it, but isn’t CrossOver sweet! I’d actually tried to get Oracle to run through it. I may yet, I’m still playing with it.

I’m trilled that Chris Jones and Justin Kestelyn got me blogg’n. I’ve always wanted to contribute more but the forums have mavens with much more time than I have to answer questions. The blog lets me share ideas and concepts as they travel with me on a daily basis.

Stats on the blog pages may not migrate but if time allows maybe I’ll write a plugin if I can’t find one. Generally, I don’t think anybody cares about the stats. It’s the information to solve problems, and I hope that’s what you find useful in my blog.

By the way, it wasn’t just the ability to have my blog pages look cool on my iPhone that drove the change, but it does look nice!!!

Advertisements

Written by maclochlainn

November 1, 2008 at 10:08 pm

Posted in Generic, Mac, Oracle, Ubuntu

That old $TNS_ADMIN environment variable

leave a comment »


Somebody reminded me that I should include the $TNS_ADMIN variable to avoid unnecessary file searches (minor expense) in the Mac configuration instructions. This eliminates additional searches when running sqlplus and tnsping executables. I’ve updated that blog page with those instructions. It’s not necessary to make it work but it does avoid a read to the local and /etc directories on your Mac OS X for a tns_names.ora file before reading it from the $ORACLE_HOME/network/admin directory.

Written by maclochlainn

November 1, 2008 at 3:22 am

VMWare Fusion 2.x causes Ubuntu printing failure

with 3 comments


I’d already upgraded my Windows x86 instances to 2.x on my Mac Book Pro but hadn’t got around to Ubuntu until today. The upgrade went fine, and VMWare Tools compilation succeeded and kernel reports were normal. Unfortunately, CUPS (Common Unix Printing Service) fails to start correctly and there doesn’t appear to be any way to fix it without changing the VMWare Fusion libraries. It appears to be a bug introduced by VMWare Tools. I’ve updated my Ubuntu VMWare printer set up steps to note it. If you’ve got a fix for the problem, let me know.

Written by maclochlainn

October 27, 2008 at 2:22 am

Posted in Mac, VMWare

Tagged with , , ,

Setting up a printer in VMWare Ubuntu instance

with one comment


As I mentioned before, working in the virtual machine is a great solution when you need to work in multiple operating systems. Setting up printing is a step that goes with the operating system. It is very easy to configure in Ubuntu running in VMWare on a Mac OS X machine.

I found that the standard printer in the virtual machine wouldn’t work. I tried it in both VMWare 1.x and 2.x but without any luck. It did work ineffectively in VMWare 2.x but it embedded characters in simple documents that shouldn’t be there. Finally, I pursued this course. It has the benefit of working like you’d expect! It lets you print your native Ubuntu documents when you’ve configured the VMWare machine in NAT or bridged networking mode. The only difference is that a bridged network doesn’t require you to share the printer on the Mac OS because it directly accesses it.

The first step using a NAT network requires that you share you printer setup on the Mac OS. You do that by launching System Preferences, then click on Sharing. In Sharing, you enable print sharing by chosing the network printer …

After you’ve enabled sharing on the Mac OS, you can take the following steps in Ubuntu:

1. Click the System menu choice, choose Administration. and Printing, as shown in screen shot:

2. You’ll then see the following screen but not gray scaled. If you don’t, you’ll also see the following form. a gray scaled version indicates that you’ve run VMWare Tools before updating the Ubuntu OS CUPS service:

As mentioned, this means there’s a problem with a disabled service – typically cups (Common Unix Printing Service). You can click the Help, then Troubleshoot to further diagnose the problem. In the first screen click the Forward button to continue. In this screen, click the Not Listed (because it should be an empty list), and then click the Forward button to continue. You most likely will see the following dialog box, which tells you that the cups service is stopped (a general occurrence when you upgrade from VMWare Fusion 1.x to 2.x).

There’s a temptation to follow the instructions, and I yielded to it without a positive outcome. What you’ll find is that the cups (cupsys) service is enabled but if you use the VMWare Fusion menu, you’ll find that it isn’t, as shown:

If you stop here and check in a terminal session, you’ll see that life isn’t rosy after the upgrade. Even if you check it and restart the VM, the printing problem won’t resolve. This appears to be a part of the recompilation of cups by the VMWare Tools. It appears to happen when you opt to compile Ubuntu CUPS while running the VMWare Tools. You’re only prompted to compile these if you’re not on the most current CUPS release by Ubuntu.

You use the following command to check the status of the printer service:

# sudo /etc/init.d/cupsys status

You will most likely get something like this if you have a problem:

Status of Common Unix Printing System: cupsd is not running but /var/run/cups/cupsd.pid exists.

This is where it becomes obvious that the VMWare Fusion 2.x upgrade can introduce the problem. It is simple to avoid the problem by ensuring that the Ubuntu OS is patched to the most current CUPs version before running the VMWare Tools. I fixed the problem by reinstalling Ubuntu from scratch, and patching it to the current level. Then, you won’t have a failure of the CUPS process.

When you fix any errors from the upgrade or provided you’re on VMWare Fusion 2.x, you should click the Show printers shared by other systems check box, then click the Refresh button to display any network printers if they don’t refresh automatically.

3. You click on the desired network printer, which displays the following screen. Click the Make Default button after you click the Print Test Page button.

If you caught my post on doing this in a Microsoft Windows environment, isn’t it stuning how easy Ubuntu is compared to the “user-friendly” Windows interface (unless you’re upgrading). If you need the Windows instructions, you can find them here.

Is this the look of the new Mac Book Pro?

leave a comment »


It’s amazing what my students discover on the Internet. Not wanting to spoil Apple’s Christmas next week, don’t click through to the full entry or you’ll see a photo and its source URL.

You can find where I found it here, and according to the web page this is what the new Mac Book Pro supposedly will look like:

Written by maclochlainn

October 10, 2008 at 6:30 pm

Posted in Mac

Tagged with ,

Setting up a printer in VMWare Windows instance

with 7 comments


Sometimes there are products that run in Windows that don’t have a clone on the Mac, like Microsoft Visio. Working in the virtual machine is the solution but printing is tedious to setup when you’re using a NAT network model. The following instructions show you how to setup a networked printer inside a VMWare instance that uses NAT networking. You can also use it when configuring it in a bridged network configuration. It is more or less the ordinary way for the Windows XP platform.

I found that the standard printer in the virtual machine wouldn’t work. I tried it in both VMWare 1.x and 2.x but without any luck. It did work ineffectively in VMWare 2.x but it embedded characters in simple documents that shouldn’t be there. Finally, I pursued this course. It has the benefit of working like you’d expect! It lets you print your native Windows documents when you’ve configured the VMWare machine in NAT. The same steps work when you’re using a bridged networking. In a bridged network, you don’t have to share the printer on the Mac OS because it directly accesses it.

The first step requires that you share you printer setup on the Mac OS. You do that by launching System Preferences, then click on Sharing. In Sharing, you enable print sharing by chosing the network printer …

After you’ve enabled sharing on the Mac OS, you can take the following steps in Windows:

1. Click the Start button, then choose Printers and Faxes. You’ll get the following screen where you should click the link to Add a printer. It will launch the Add Print Wizard.

2. You should install the printer drivers if they’re not already installed before launching the Add Print Wizard. You click Next In the first screen.

3. The default radio button is for a locally attached printer. Click the network printer radio button before clicking the Next button.

4. Click the Next button because the default browses for a network connected printer.

5. You shuold see the Microsoft Windows Network, and the default workgroup, Click on the Workgroup to display the possible machine names.

6. Click the appropriate machine that represents the hosting Mac OS (your machine that’s running VMWare). After you click it, you’ll see the target printers that are available through the external Mac OS connectivity and sharing. Click the Next button to proceed.

7. The last activity triggers a warning error. It asks you to confirm that you can trust your Mac. Click the Yes button to proceed (it’s a boring message but click on it if you want to read it).

8. Choose the printer as a default printer by clicking the Yes button. You can choose the No button if you’ve got more than one network printer.

There are problems when you forget to install the hardware first, so make sure you get the hardware installed first.

Mac printer purgatory brought to you by HP …

with 3 comments


If you’ve ever run into this error trying to install an HP Printer on a Mac, let me tell you how to fix it:

Some of the software for the printer is missing.

There’s actually a discussion on Apple’s forum without an answer. The answer is beware of HP Printer downloads. Not all are compatible with the current Leopard (10.5.x). A number are only current for Tiger (10.4.x). If you download them and install them, you should consider using a time machine recovery of the Operating System.

If you haven’t installed them, don’t do it until you back up the /Library/printers/hp directory (typically about ~650 MB). It will enable you to recover without a full backup of the operating system. Open a terminal and run the following command:

# mv hp hpbackup

If the HP drivers apply and things don’t work you can recover. You can simply do the following two command from a terminal session:

# rm -r hp
# mv hpbackup hp

If the HP drivers apply and things work you’re fine. You can delete the backup directory and its contents by using the following command in a terminal session:

# rm -r hpbackup