Un-denying a Denied Host

A great guy named Nicholas put out an easy to use script to unban an ip address that’s been banned by denyhosts. Here’s me gushing with praise since I could be lazy and not have to write it, along with the script so you can benefit from his contribution as well.

A big thanks to Nicholas Avenell, who solved a problem I’ve been having for a while: How to remove a host that denyhosts has banned. Yes, the FAQ for denyhosts has the manual steps listed, but Nicholas scripted it. And it works great.

Copy Nicholas’s script into a file, give it execute permissions, and run it with root privileges passing in the IP address you’d like to unban:

#/bin/sh
REMOVE=$1
/etc/init.d/denyhosts stop
cd /var/lib/denyhosts
for THISFILE in hosts hosts-restricted hosts-root hosts-valid users-hosts;
do
mv $THISFILE /tmp/;
cat /tmp/$THISFILE | grep -v $REMOVE > $THISFILE;
rm /tmp/$THISFILE;
done;
mv /etc/hosts.deny /tmp/
cat /tmp/hosts.deny | grep -v $REMOVE > /etc/hosts.deny;
rm /tmp/hosts.deny
/etc/init.d/denyhosts start

Nicholas, you rule. Thanks.

Caution – the new Mac App Store just bit me

Be VERY careful when using the Mac App Store — here’s how it purchased an app without my permission, along with THREE simple things Apple could have done to fix the problem.

Admittedly, I had my skepticism about how an App Store was going to fair servicing applications to the desktop.

The majority of Mac users seem to quickly grasp dragging an icon to a folder or double clicking the installer; the “hard” part is unzipping a file or opening a disk image file. But perhaps there is a target audience that still has a hard time of installing apps and keeping them up to date.

The downsides I expected were the less obvious things: Apple wanting a chunk of each sale resulting in trickle down inflated prices (though for the moment quite the opposite seems to have happened), certain established apps getting marketing preference due to historic purchases rather than innovative replacements getting visibility, the fear of embedded application ads becoming mainstream in the Mac culture, etc.

I saw up sides too, with copy protection and serial number issues going away. This of course had other down sides, such as apps having to check in with the Internet. I figured this meant a lot more problems for the publishers than the end consumers.

Seems I was wrong about that. I just got bit by the App Store.

I made my first Mac App Store purchase today, and in order to do so I had to authenticate. And, I’m happy to report, the purchase process works exactly as described — the application was downloaded and installed seamlessly. Go Apple!

I then decided to see if there was an update to Aperture, which I had commercially bought. Sure enough, when I went to its page, it said it was already Installed. Clever. Well done, Apple.

This is where things start to get weird. Non-Apple applications, like Coda, which I had externally bought and purchased a while back correctly showed up as Installed as well. This was nice.

But, then I noticed that a packaged I had already purchased, had a license and receipt for, and was already installed, OmniGraphSketcher, was in the App Store, too. It did not show itself as installed. And, wanting to see if it was a newer version, I clicked on it — and next thing I know, the App store begins to purchase it.

The problematic BUY button.Fundamentally the problem seems to be that the purchase button behaves differently whether or not you’re authenticated. Plus, you’re two pixels away from Copy Link / Tell a Friend from an actual purchase.

For me, it was an unexpected $30.00 hit to the wallet simply because the buttons didn’t behave the same way they had a moment ago. That’s just not right, especially not from Apple who studies user interfaces with the same passion you or I crave oxygen.

While I’m screaming, “No, no, no, NO, NO!!!” at my machine, which doesn’t help by the way, I was taken aback that there was NO CONFIRMATION process, nor was there a CANCEL option, nor was there a RETURN UNOPENED option.

Bad Apple, bad.

Because I had previously authenticated for a prior application, it blindly assumed I authorized this purchase. That’d be like buying one item in a store, and after the cashier touched your credit card, anything else you picked up in the store would get bought too.

I’ve just written to Apple at http://www.apple.com/support/mac/app-store/, and we’ll see where that goes.

UPDATE: Got a very kind email from Apple who credited me the correct amount, but for the wrong line item. I sent them a follow up because I want the right developer to be paid.

If this is an indication of how Apple will deal with application purchases in the future, we can all breath a happy sigh of relief. My own hesitations about exploring the App Store have been lightened. Plus I know never-ever-ever touch anything that looks like a price tag button, instead click the icon which doesn’t look clickable.

Parallels and Ubuntu 10.10 boot issue

Ubuntu’s graphical environment stopped working under Parallels after an upgrade. Turns out the Parallels Tools was incompatible with the newer release. Here’s how I fixed it.

I recently ran into a problem upgrading to Ubuntu 10.10 in Parallels. The graphical interface (runlevel 5) wasn’t coming up after the reboot, instead I was getting the command line version (runlevel 3).

When I booted Ubuntu, I got a message stating that /media/psf could not be mounted.

Here’s how I solved it.
This tip gave me insight that the problem was an old Parallels Tool that was incompatible with the newer Ubuntu.

Ubuntu gave a preference for skipping the mount (S) or booting manually (M) to fix it. I booted manually, went to the /etc/init.d directory, and moved the prltoolsd to another directory to get it out of the way, and then rebooted.

# mv /etc/init.d/prltoolsd ~myaccount
# reboot

Parallels then let me boot in safe graphical mode. On the desktop was a virtual Parallels Tools volume, already mounted.

I opened up the terminal to a bash prompt, changed to the directory with the Parallels install script, and ran it with the remove option, then rebooted again:

$ cd ‘/media/Parallels Tools’
$ sudo ./install -r
$ sudo reboot

GNU Grub came up and I booted back to the generic kernel. Things were back to normal.

WIth the latest version of Parallels installed, and the old Parallels Tools uninstalled, I was able to open a Terminal, sudo to root, and install the new version of Parallel’s tool. Apparently the incompatibility has been resolved.

WordPress FTPS is not SFTP

Is WordPress giving you server errors when you try to update or upload themes? Are your only two options FTP and FTPS (which is not SFTP)? Here’s how to fix that, make WordPress work with SSH, giving you an SSH2 option for updating. And it works.

A major shout of thanks goes to Jon for his WordPress post entitled Enabling SSH/SFTP Updates.

I’d been struggling with making WordPress updates work properly for the longest time, setting up file ownerships and permissions. Things always seemed to be mostly right. If I tried to do an update of any form, I’d see this:

Error: There was an error connecting to the server

WordPress offers FTP and FTPS (SSL).

I’d try the secure option and things just would not work. Then I’d go examine my SFTP connections and my SSH, and it’d all be working fine.

It took bdawson‘s post on FTPS vs. SFTP to make me realize I was so falling into the habit of typing STFP that I didn’t realize that wasn’t what WordPress was offering!

With Jon’s post, enabling SFTP in WordPress becomes trivial.

  1. # apt-get install libssh2-php
  2. # /etc/init.d/apache2 restart

The SSH2 option then presents itself, and all is right in the world. Thanks guys!

Where’s my JDK?

Caught in the Java depreciation battle under OS 10.6 and can’t find where the Java Development Kit (JDK) now resides? Here’s a command that will tell you, allowing you to still use InteliJ and other IDEs on OS X.

There’s a lot going on with Java at the moment. Oracle acquires Sun, putting the language in squarely in hands that don’t inspire trust; the same thing happened with MySQL. Meanwhile, the Apache Software Foundation quits the Java SE/EE Executive Committee. And now Apple deprecates Java, and the reason doesn’t appear to be what you’d think.

Starting with OS X 10.6.3 update, developers got caught in the back lash. Things moved on the file system.

Upgrading IntelliJ, the IDE was asking me where my JDK was, as it certainly wasn’t where the software, or I, thought it should be.

You won’t find the location using /Applications/Utilities/Java Preferences.app.

But you can find it with some digging. Thanks to this developer release note from Apple, the following command from Terminal will spew out some XML.

$ /usr/libexec/java_home –xml

Find the dictionary section that has ‘x86_64’ in it, and you’ll find an entry that has a ‘JVMHomePath’ with something like:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

You want to provide this full path to the IDE as where the JDK lives.

It’s worth pointing out that Apple recommends that if you install any 3rd party JVMs they should be installed in /Library/Java/JavaVirtualMachines or ~/Library/Java/JavaVirtualMachines.

Updates, please don’t do that…

Using a MySQL DOT-Net Conncetor and getting these error messages? Shared Memory Provider: No Process is on the other end of the pipe. Error 0. Unable to find the request .NET Framework Data Provider. It may not be installed. Or your login not working, but your password is right? Try this solution.

Using Visual Studio 2010, it’s possible to use MySQL databases. The trick is to use the MySQL DotNET Connector.

Everything was going swimmingly until for what appeared to be no reason, until one day I went to work on my project and I started getting a strange error message for what appeared to be no reason.

Shared Memory Provider: No Process is on the other end of the pipe.
Error 0.
Unable to find the request .NET Framework Data Provider. It may not be installed.

Exploring the exception shows that a connection to the database is made, but the login has failed for the username. However, the username and password work when logging in using the MySQL client. No drivers have changed, and MySQL works with all other applications just fine, just not the Microsoft development IDE. The connection string validated in a test environment, as did a raw connection with the MySqlConnection. EntityFrameworks, not so much.

Attempting to use EntityFrameworks from VS2010 results in an error dialog box that when dismissed goes back to the database wizard that brings up the dialog box again; the only way out is using Task Manager and violently killing the IDE’s process.

Attempting to use the .MySQL .NET/Connector installer to repair the installation doesn’t help, either. Yes, it updates the .dll files, yes it tweaks the registry, but no, it doesn’t help.

Making a new project and creating a new ADO.NET Data Model reveals something interesting: the MySQL providers are not listed anymore in VS2010.

The solution is to UNINSTALL the DotConnector and then re-INSTALL the same MySQL .NET/Connector.

The full installer indicates that it updates the VS2008 and VS2010 development environments. Trying the IDE again works perfectly. The ADO.NET Data Model shows the MySQL Data Provider, the Entity Frameworks doesn’t get stuck in an endless loop, and my code worked again without change.

What happened to cause all this? Turns out I had installed a minor VS2010 hotfix service pack at the end of the weekend. The result? The update silently uninstalled all non-Microsoft data providers.

Updates, please don’t do that…

Clearly, I’m not happy about that. Especially since it did it silently. If it told me that it was going to, or if it asked me to reinstall after the fact, I could live with it.

Uninstalling Intego Software

I’d rather eat an orange then brush my teeth with peppermint toothpaste than deal with cleaning up my system after using Intego’s software. If anything can bring the Windows reboot experience, coupled with the leaving of software cruft, to the Mac platform, this software does it in my opinion. Here’s how I finally got rid of it all. I hope.

I recently purchased a Mac bundle with software and it included software from Intego, consisting of the Personal Antispam and Personal Backup applications. I installed them, and from that point forward it was an experience I’ve regretted and have been trying to undo. Only now do I think I’ve made some progress toward that goal.

Frankly, I didn’t get what the backup software did for me over many of the free solutions out there, and while the personal antispam look intriguing, it was intrusive as well and I decided to fall back to Apple’s spam filter included in Mail.

Even if a product doesn’t make it into my main line of recommendations, I often will keep it around in the event I suddenly have use for it. This, for example, is how TypeIt4Me eventually won me over.

Intego went out of their way to annoy me straight from the start. How so? Every time I went to install a package from them, they felt the need to do what appeared to be a gratuitous reboot. It was like being on frickin’ Windows. And they had to install their own update manager, which had to take a glory spot in the menu bar. And it had to do updates, which required even more reboots. I was done with them at that point, but don’t even get me started on the subscription scheme that rode on top of the atrocity.

So I wrote to them asking them how to uninstall their software. Here’s the reply I got:

Proper removal of the software package requires using the Installer package located in your software bundle or disc. If you have manually attempted to remove the software, you will need to first, reinstall the software again, then use the same Installer package to properly remove the applications.

If you need to, you can re-download the installer for Internet Security Barrier X6 using the link below:

http://www.integodownload.com/en/isbx6.html

Open the installer and select to uninstall all software. Restart your computer.

Great, another reboot. Lucky for me, I hadn’t tried to go off on my own path, plus I had the original installation utility. I tried it, and it appeared to work.

Notice I said appeared?

One week later, LittleSnitch pops up and reports my system is spontaneously trying to access Intego’s update service for the very set of applications that, for all evidence I could tell, I removed and forgot about. Apparently, no so.

LittleSnitch also reveals it’s TaskManagerDaemon who’s trying to deal with Intego’s NetUpdate buried in /Library/Intego. Thank you LittleSnitch, curse you Intego.

Intego leaves cruft. Running cruft. Seems this isn’t new of them, according to Apple archives.

Part of the Mac culture is being a good citizen. In my opinion, I feel they aren’t.

After uninstalling the software in exactly the manner they prescribe, enter this this command at your terminal:
sudo find / -name Intego -print

I suspect you’ll develop a similar facial tick as it starts returning output after scanning your disk.

Go grab a root shell, you’re gonna wanna also wipe out:

  • /Library/Intego and everything below it.
  • /Library/Application Support/Intego and everything below it.
  • /Library/Preferences/Intego and everything below it.
  • /Users/wls/Library/Application Support/Intego and everything below it.

Oh, and you’ll want to Reboot as well.

…it’s not like I had other applications up or was doing anything important.

After the reboot, you’ll notice tons of console messages from launchd. Now you need to do this.
$ launchctl
launchd% remove com.intego.task.manager.notifier
launchd% remove com.intego.netupdate.agent
launchd% exit

And, you’ll need to remove some .plist files:
$ sudo rm -v /Library/LaunchAgents/*intego*
$ sudo rm -v /Library/LaunchDaemons/*intego*

And preferences, frameworks, keychains, and widgets:
$ sudo rm -vrf /Library/PreferencePanes/NetUpdate.prefPane
$ sudo rm -vrf /Library/Frameworks/IntegoiCalFramework.framework/
$ sudo rm -v /Library/Keychains/Intego.keychain
$ sudo rm -vrf /Library/Widgets/Intego\ Status.wdgt/

Reboot again.

UPDATE (12-Dec-2010): I’ve been in contact with Intego Support, [email protected], and they were kind enough to provide this extra information:

If there is anything left on your computer, you can remove it manually.

Can you please go into the following areas on the computer and delete any traces of Intego or VirusBarrier:

/Macintosh HD/Library/Intego
/Macintosh HD/Library/LaunchDaemons
/Macintosh HD/Library/LaunchAgents
/Macintosh HD/Applications
/Macintosh HD/Library/Preferences
/Macintosh HD/Library/Logs
/Macintosh HD/Library/Receipts
/Macintosh HD/Library/Startupitems
/Macintosh HD/Library/Widgets

Home Folder:

~/Library/Application Support
~/Library/Preferences

They were right, there’s logs, too.
$ sudo rm -rf /Library/Logs/NetUpdate/

Review: Walt gives Intego software installation TWO thumbs down. The reasons are obvious.

Competitors?

An opinion piece: are Apple and Microsoft competitors? This line of reasoning says no.

Who made the spoon that you used to eat your breakfast cereal this morning?

Every once in a while I’ll hear people talking about how Microsoft and Apple are competitors. As someone who’s technology agnostic, I don’t see the world in such shades of black and white. Here’s my reasoning as an outsider comparing the two.

Apple is a hardware company, their goal is selling as many units of whatever as possible, whether it be computers or mp3 players. With a focus on design and user experience, backwards compatibility takes a back seat to form and functionality. They excel at elegance and minimalism. They aim sharply at the home user. Disposability is ok. The next big thing is the future.

Microsoft is an operating system and business application vendor, their goal is to put that software on to as many pieces of hardware as possible. They are an industry leader in office applications and software development environments. They aim sharply at business and government. Backwards compatibility is highly important. They’d run on toasters if they could.

Is there overlap between the two? Sure, some. Is it a make or break difference? Not really, much is a matter of preference and familiarity.

I twitch anytime I hear someone say OS X is more “intuitive” than Windows; the word they’re looking for is consistent. Coarse application design is more similar, meaning once you get over the learning curve, subsequent new challenges have a ring of familiarity.

But more importantly, are the two environments mutually exclusive? Not at all. That’s why platform agnostics run both systems. Some things are just easier to do in some environments than others.

The operating systems wars and the phone wars are about luring people toward purchasing something from that camp. But look closer. MS-Office runs on OS X, and quite nicely. Safari and QuickTime run on Windows, and quite nicely. Once you’ve made the purchase of their crown jewel, the fighting appears to stop.

Users, on the whole, don’t care (and often don’t understand) about the underlying system. They just have a problem they want to solve, learn how to do it once and without change, and any tool that gets the job done will do.

Just like my spoon.

Bang for Buck

Think that extended trial periods hurt sales? Think again.

There’s a wonderful application for the Mac called TypeIt4Me that does instant macro expansions as one types. I first learned about it at a No Fluff Just Stuff technical conference when some of the presenters were using it to give some slick presentations.

I’m a big believer in try-before-you-buy, and have long advocated using the 30/30/30 model for generating sales.

Here’s evidence that my bang-for-buck ratio was pretty low:

Bang for Buck FAIL

The problem? At the time, I just couldn’t find just the right need for it within my own workflow. But you can see, I kept it around.

However, because the software didn’t shutdown and lock me out, which would have gotten it deleted, it was there the moment I had need. And, Ettore Software got a sale.

Camera is in use by another application

Trying to video conference with Skype and getting a message saying the camera is in use by another application with no video feed sent out? Try this.

Blind SkypeRecently I was attempting to use Skype, but it reported that “Your camera is in use by another application” and I couldn’t get any video feed, though the camera turned on.

Then I found this post which suggested removing the file
/Library/QuickTime/CamCamX5.component from the system, although I found it’s possible just to move it out of that directory.

Restarting Skype, the video conference worked perfectly.

Yahoo concurs. Here’s more on CamCamX. And here’s another thread saying to remove it.

Operating System: OS X 10.6 (Snow Leopard)