Tech Tips

OS X, Tech Tips, Web Development/Programming

Solution to Deployment issue using Netbeans 6.5.1 and Tomcat 6.0.22 on OX 10.5.7

Somehow I always find myself in the middle of a very strange computer problem. This particular issue is a result of my wanting to learn to write JSP applications using Netbeans 6.5.1 with Tomcat 6.0.20. I don’t have time to do a full writeup, so here’s a nutshell version of the problem and my solution:

Problem

When I tried to use the Deploy option to push my Netbeans project to my Tomcat webapps folder, the deployment would fail. I could manually copy the .war file into my Tomcat webapps folder and everything would work fine. But, I thought, “Why should I have to do this if Netbeans is supposed to do it for me?”

Solution

Since I’m running OS X 10.5.7, I opened the Netbeans configuration file at

/Applications/NetBeans/NetBeans6.5.1.app/
Contents/Resources/NetBeans/etc/Netbeans.conf

and added the following to the netbeans_default_options line:

-J-Djava.io.tmpdir=/tmp

Note: This must be added within the double quotes. Also, I didn’t distrub anything that was on the line already but merely added that tidbit of code.

Explaination

I found this piece of advice buried deep in a forum. Apparently, Netbeans puts the deployed files into a temporary folder before deploying them. The temporary folder it tries to use on OS X isn’t accessible (a permissions problem I guess). Adding that snippet of code tells Netbeans to use the OS X default temporary folder tmp for its intermediate work.

Enjoy!

Microsoft Windows, Tech Tips

What to do if Cygwin Does Not Work Properly in Vista

So, I tried to install Cygwin on my Windows Vista Business machine today.  The install, via the setup.exe that downloads what you want to install, launched and completed as it always had in WIndows XP. I was pleasantly surprised considering how Vista has refused to install things normally before. Just when I was about to be happy, I clicked on the Cygwin Bash Shell shortcut, the prompt came up, but no commands worked.  Not ls, not dir, not anything! I let out my usual sigh of annoyance and cursed Vista (for the millonth time).

I then proceeded to Google to find a solution.  Nothing. The forum posts pleading for help were responded to with the usual worthless suggestions (such as “Don’t use Vista“) and RTFM talk. I don’t really want to use Vista, but it has been forced upon me and I have little recourse but to use it.  Anyway, after trying a few things that didn’t work, I finally figured out what to do: Set your system path environment to the Cygwin bin directory and everything works fine!

To do that, all you gotta do is follow these simple steps:

  1. Install Cygwin normally with the setup.exe program, selecting what you want to install.  For the purposes of this walkthrough, I’m going to assume you installed Cygwin in the default C:\cygwin location.
  2. Click on the Start Menu (or Windows Orb, for those of you Vista fanboys).
  3. Right Click on Computer, and choose Properties.
  4. Click Advanced system settings in the left-hand context sidebar (and accept the UAC prompt to go proceed as an Administrator).
  5. Click the Advanced tab
  6. Click the Environmental Variables button at the bottom of the dialog.
  7. In the Environment Variables list box, find the variable Path and double click on it
  8. In the resulting Variable Value box, move your cursor to the end of the line of paths already there and add ;C:\cygwin\bin Do not forget the semicolon before the path!

That’s it! Remember, if you installed Cygwin somewhere other that C:\Cygwin, you’ll have to change your path to be different from my example. I’m hoping that if you did a non-standard install that you can figure out how to adjust the path!  I hope this helps somebody!

Microsoft Windows, Tech Tips

Using MS Server 2003 Admin Tools with Vista

Today I tried running the Windows Server 2003 Admin tools with Vista Business and was a little surprised when I got the error message:

MMC could not create the snap-in.

I guess the only reason I was shocked was that I got no errors whatsoever. The install went just fine. Normally, when you attempt to install an older Microsoft tool that isn’t compatible, Vista will freak out and let you proceed no further.

After a some Googling (and several leads that did not work), I found a fix on the Microsoft Knowledge Base: http://support.microsoft.com/kb/930056

The fix was actually quite easy: Finding the fix was another story!

Linux, Tech Tips, Ubuntu

Compiling Squid in Ubuntu 7.10

Compiling Squid 2.6 in Ubuntu is easy, once you know that there are different command line options you must use aside from the defaults (which are specific to BSD-flavored systems).  Note that I specifically enabled digest authentication with the –enable-auth=digest  switch because our intended application of Squid  needed a more secure password transmission method than Basic Authentication.   Here’s some general steps:

  1. Download and upack the Squid source. I used Squid 2.6 for this.
  2. Open a terminal and change to your Squid source directory.
  3. Type the follwong and press enter:

    sudo ./configure –enable-auth=digest –prefix=/usr –localstatedir=/var –libexecdir=${prefix}/lib/squid –srcdir=. –datadir=${prefix}/share/squid –sysconfdir=/etc/squid

  4. After a hundred lines or so scroll by, enter the following:

    sudo make
  5. After several, even more ugly lines go by, type the following:

    sudo make install

  6. There is no way to set the default location of the log files with Squid using configure, and I couldn’t get the recommended patch to work, so I came up with an easier solution.  Issue the command:

    ln -s /var/log /var/logs

That’s it. Squid is installed. Now, I didn’t say Squid is actually configured on Ubuntu at this point.  Getting it all set up is a story for another day! Depending on several factors, you’ll have to do a lot of chmods to make sure the permissions are right! Someday, I will probably post my PHP-CLI scripts that control user authentication and site blocking! Until then, good luck.
OS X, Tech Tips

Xfolders 1.5.1 Crashes in Leopard (and how to fix it!)

I’ve had my MacBook now since September and I really like it.  Apple has a good thing going. That said, some things about OS X are strange, such as you can’t see certain parts of your filesystem with Finder unless you a) resort to some odd Terminal commands that need to be flipped on and off depending on how much of your filesystem you want to see or b) get a wonderful piece of software such as Xfolders to let you see everything when you need to.  Xfolders is great. It was one of the first things I downloaded and installed when my MacBook still smelled new.

Then I did something stupid: I upgraded to OS X 10.5 Leopard.  I haven’t had as much trouble as some who have taken the plunge, but one side effect was that in Leopard, Xfolders would crash anytime I tried to click on the root drive (cheerfully known as Macintosh HD on my MacBook). No matter which pane I clicked on, attempting to access root would bring up the OS X crash log.  Oh the horror! I may as well be running Vista! :)  After much agonizing and digging around, I found the solution to the problem:

  1. Open a new Terminal window
  2. type rm ~/Library/Preferences/com.kai-heitkamp.Xfolders.plist and press Return

That’s it! I’m not sure why, but sometimes, Leopard can corrupt the Xfolders configuration file, which causes Xfolders to crash upon launching.  By simply deleting this configuration file in your home directory, Xfolders can once again give you easy access to viewing 100% of your files whenever you need to.  I hope this helps someone!

Author’s Note (February 18, 2008):  I have some reports that this was a problem with Xfolders on some versions of OS X prior to 10.5.  This fix may work for OS X 10.4 Tiger sometimes, too!

Microsoft Windows, Tech Tips

Use Your ATI TV Wonder USB 2.0 with Windows Vista’s (and Windows 7’s) Media Center

Recent Update (May 30, 2009): According to a poster below, these instructions work for Windows 7 also.  Just keep in mind, these instructions will only work with 32-bit Vista or Windows 7.

Important Note for 64 bit users: This procedure WILL NOT work for Vista 64-bit because the drivers mentioned above are 32-bit. If I were guessing, there will be no 64-bit drivers produced for the device since it is about 4 years old, as of November 18, 2008.

I have an ATI TV Wonder USB 2.0 for about two years and it has worked very well for me. I originally bought it for use with my 1.5Ghz Compaq Presario so I could watch TV or play my PS2 while on the road. I recently bought an HP Pavilion dv2210us with Windows Vista Home Premium. So far, I really like my purchase, but sadly, neither ATI nor Microsoft seem interested in supporting the TV Wonder USB 2.0 in Vista. I really wanted to test out Media Center, but what to do?

I wasn’t deterred because I have fooled ATI devices before by using drivers I wasn’t supposed to in order to enable features. Follow the steps below and you’ll be watching TV with your TV Wonder USB 2.0 in Vista in no time at all.

  1. Lou (see his post below) says that removing all the installed ATI software before starting this install process is the only way he could get the installation to work. So, your first step is to use Add/Remove programs to uninstall all existing ATI software.  (Thanks Lou for the advice!)
  2. It’s best not to plug in the TV Wonder USB 2.0 until you have installed the software first. If you have done so, Vista won’t properly install anything. Unplug the device, go in to Device Manager (Windows Key + Pause, in case you don’t know how to get there), and delete all the unknown hardware.
  3. Go here, http://ati.amd.com/support/drivers/xp/tvwonderusb2-xp.html , and download the Windows XP drivers for the TV Wonder USB USB 2.0. At the time I’m writing this, the driver version is 5.01.6317. I doubt that’ll change because the drivers were last updated in March 2005.
  4. Then go here, http://ati.amd.com/support/drivers/common/mmc9-16.html , and download only the Encoder Package (which right now is version 6.12). This lovely package contains a transcoder that links to Media Center. You can’t use and won’t need anything else on this page. (Note: The next steps involve actually installing what we just downloaded. Now, neither package has a unified installer that will work with Vista, however, if you simply run the installer as Administrator, you can unpack the files and run the installer for individual components you need to make this work. )
  5. Now, we’re going to run tvw-usb2-5-01-6317.exe, which is the first file you downloaded. (Remember, User Account Control will ask for administrator rights.)  This will unpack the drivers to C:\ATI\SUPPORT\tvw-usb2-5-01-6317. At some point, the installer will start throwing errors and may even tell you to plug in the device. At this point, Ctrl + Alt + Delete, open Task Manager, and terminate the installer. All we needed are the unpacked files.
  6. Plug in the TV Wonder USB 2.0. Vista’s hardware installer should kick into action. Tell it to search in a specific location and point it to C:\ATI\SUPPORT\tvw-usb2-5-01-6317\WDM_XP . Vista will then install about six or seven devices that all have to do with the tuner. Good news: We’re almost there!
  7. Next, run the Encoder Package, 6-12_xcode_38463.exe which will again unpack the files, this time to: C:\ATI\SUPPORT\6-12_xcode_38463 . The installer will choke, just like a minute ago, and you might even have to kill it with Task Manager. As long as the files unpacked, that doesn’t matter anyway.
  8. Run the following setup files that were just unpacked:
    1. C:\ATI\SUPPORT\6-12_xcode_38463\ATIPCE\setup.exe
    2. C:\ATI\SUPPORT\6-12_xcode_38463\ATITrans\setup.exe
    3. C:\ATI\SUPPORT\6-12_xcode_38463\AVIVO\setup.exe
  9. Reboot! (Thanks, Keith, for pointing out this omission.)

At this point, you have all neccessary encoders, decoders, and Media Center hooks to enable your TV Wonder USB 2.0 to talk to Vista’s Media Center with no problem.

When you actually open Media Center for the first time after doing all this, you’ll have to setup the tuner there, but it’s basically a channel search and choosing which input to use. Happy TV surfing.

Proposed Solution to “IR Hardware not detected” error

Poster Zeffrey Rodrigues shared the following exciting piece of information that may help anyone getting the error message “IR Hardware Not Detected.” Thanks Zeffrey!

The solution to ATI TV Wonder USB 2.0 worked perfectly. However, ran into a problem with the Media Center TV tune up. The message was “IR Hardware not detected”. The solution for this is posted on the following website”

http://forums.techarena.in/mediacenter/63056.htm

Thought you may want to add to your solution list just in case someone runs into the same problem.

The Answer

Go back in to Windows Media Center setup

Select: Tasks -> Settings -> TV -> Setup TV Signal

Answer YES to popup questions – are you sure??

Continue normally through TV Signal Setup UNTIL:

Select -> I WILL MANUALLY CONFIGURE MY TV SIGNAL

Select -> ANTENNA – I dont care what you are plugged in to

Select -> ANALOG-ONLY ANTENNA – I dont care what you are plugged in to

Select -> RETURN TO TV SETTINGS – unless you really want Guide Listings

Select -> FINISH

SORRY – You have now by-passed the IR control device. you have to use a cable input and not a S-Video or composite input

But IT WORKS

Cheers from the Cisco Production Support Team

Microsoft Windows, Tech Tips

Open a Command Prompt with Administrator Rights in Vista, Windows 7, and Windows 8

Update for Windows 8: It turns out that Windows 8 has an administrator command prompt just a right-click away!

In Windows Vista, when you open a command prompt using the good ol’ cmd command from the Run box, you get a command prompt just like in XP. This command prompt, however, won’t allow you to do anything that requires administrative rights: User Access Control will commence to giving you plenty of non-graphical text feedback.

Lucky for us, there’s an easy solution to opening a command prompt with administrative rights that doesn’t even require you to use a mouse!

  1. Press the Windows key.
  2. Type cmd (which will appear in the Windows Search box) [Update for Windows 8: In Windows 8, you just start typing cmd at the Start Screen after hitting the Windows Key]
  3. You’ll see cmd show up in the search results. If it is not already highlighted, use the arrow keys to do so.
  4. Press Ctrl + Shift + Enter

That’s it! You’ll have a command prompt with administrative rights. Note: You’ll know you have the admin-enabled prompt because your current working directory will be C:\Windows\System32 instead of the regular default of C:\users\%username%.

Microsoft Windows, Tech Tips

Controlling/Stopping/Disabling Startup Programs in Windows Vista

I’ve been using Windows Vista for three days now. While I’m not sure it’s a must -have upgrade for most people, there are some interesting features in Vista that are very cool and useful (once you find them, that is). One such feature is the new Software Explorer, which is part of Windows Defender. Software Explorer allows you to see several categories of programs, including: Startup Programs, Currently Running Programs, Network Connected Programs, and Winsock Service Providers.

My favorite is Startup Programs, which allows you to see all programs that load at startup. For the first time ever, Vista allows you to see if the program starts up for all users or just the currently logged in user. The information provided about each program is more thorough than msconfig (which is still present in Vista). Best of all, you can disable or remove a startup program. To get to to Software Explorer, do the following:

  1. Search for or use the start menu to navigate to Windows Defender.
  2. Click on Tools in the Windows Defender menu bar.
  3. Click on Software Explorer.
  4. If you want to ensure that you can Enable/Disable/Remove any of the startup items listed, click the Show for All Users button at the bottom of the Window.
  5. Click continue to give the User Account Control permission to change the registry entries required to disable startup programs.
  6. Click on any program in the list and you’ll have the option to Disable/Remove the startup items.

If nothing else, Microsoft may finally realize how important controlling startup programs can be.

Update (December 28, 2010): Windows 7 does not have the Software Explorer. As a commenter mentioned, going to Start > Run and typing in msconfig, then clicking the Startup tab will allow you to remove startup items with the click of a button.

Personally, I use a program called WinPatrol, which is available in a free and paid edition. I have used the free edition for years and love all the options it provides for changing startup options. It is a bit more complex than the built in offerings, however, if you want lots of control and lots of information regarding what’s starting up, it’s definitely the way to go.

If msconfig and WinPatrol are so great, why did I make mention of the Software Explorer feature? Basically because I like to know as many ways of doing something (such as disabling startup programs) as possible on a computer. You never know when when one method or the other won’t work or be allowed, so it helps to know as many ways to do certain things as possible!

Microsoft Windows, Tech Tips

Show Extended Boot Information when Windows Vista Boots

Note: This article applies to Windows 2000, Windows XP, and Windows Vista.

I stumbled across an interesting Windows feature that you can enable with N-Lite that will show extra boot messages when you login to Windows. I didn’t want to format my computer and do a fresh Windows install just to be able to see a message that says "Playing Logon Sound," so I searched around on Google and found that enabling this feature is an extremely easy registry hack. Do the following:

  1. Go to the Start Menu and click Run…
  2. Type regedit in the box and press Enter. This will open the Registry Editor.
  3. Click on the folder structures on the left (which are known as hives and keys) in the following sequence.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system

  4. In the right hand side of the window, look for a value called named VerboseStatus.
  5. If it exists, double-click on it, type a 1 in the box, and click ok. Once you reboot, you will see extra boot messages.
  6. If it does not exist, right click on white space in the right-hand pane, choose New, then choose DWORD Value. You’ll see a key that says New Value #1. Type VerboseStatus and press Enter.
  7. Double-click on your new VerboseStatus value, type a 1 in the box, and click OK.
  8. Reboot, and you should see new boot status messages.

For some reason, I get a great deal of satisfaction out of seeing Playing Logon Sound before it happens. On a more practical note, these messages can allow you to see at what point your Windows logon becomes slow (if it ever becomes a problem).

Microsoft Windows, Tech Tips, Web Development/Programming

What to do if XAMPP for Windows won’t load anything under localhost

I’ve used XAMPP for Windows on my laptop as a testing server for over a year with no problems. Today, though, I started the Apache and MySQL services as I have many times in the past only to find that both localhost and 127.0.0.1 did not work in my browser. Here’s some of the things I tried that did no good and some notable facts:

  1. I tried localhost:80 and 127.0.0.1:80 with no effect
  2. I disabled the Windows firewall. No dice.
  3. I uninstalled the Apache service. No change.
  4. I uninstalled/reinstalled XAMPP multiple times with multiple versions. No change.
  5. When I would put localhost in the browser, I did not receive a "Page cannot be found" error. Instead, the status bar would indicate "Waiting for localhost." I waited more than ten minutes to see if anything would happen at one point. Nothing did: The screen remained white.
  6. It didn’t matter what browser I used. IE, Firefox, and Opera all sat there and waited while nothing happened.
  7. I have made no system changes since the last time I ran XAMPP except for the regular barrage of Windows Updates.

While I don’t know exactly what broke my XAMPP installation, I can almost guarantee that a Windows Update killed it. I know Microsoft can’t keep every program under the sun from breaking with its updates, it could do a better job of telling you exactly what each update does without having to dig through 500 lines of the KB articles. Anyway…

I managed to fix the problem, as per this article posted in the Apache Friends forums. In the C:\program files\xampp\apache\bin\httpd.conf file, I added the following line:

Win32DisableAcceptEx

From the best I can tell, this has something to do with Apache’s interaction with Windows’ WinSock 2 API. I’d say some security update managed to fix a problem in WinSock but break Apache. It makes me feel really stupid that I don’t know exactly what caused the problem or exactly how the solution actually fixed it. I’m just glad everything is working now. I can actually get to work on the project I needed the server for in the first place.

Scroll to Top