Get Growl Notifications on VNC connections, SSH attempts, and HTTP logs [solved]

Use this script to monitor VNC connections with Vine Server:
nice -n 100 tail -n 0 -f /Users/jordan/Library/Logs/VineServer.log | php -r 'while ($m = fgets(STDIN)) shell_exec("growlnotify -p 0 Vine Server -m ". escapeshellarg($m));'

Change “jordan” to your username (home directory), or the whole path of the log if you’re monitoring something else. “Vine Server” is the alert title, which could be anything (“Hello World”).

Save this as a file such as vncnotify.sh. Run
chmod 755 vncnotify.sh
and then you can run the command by typing ./vinenotify.sh.

Duplicate this file and name it vinenotify.command.
Finally, in System Preferences > Accounts > Start up items, add vinenotify.command, and make it hidden, and it will run when you log in.

Things I’m still working on: preventing a string of notifications when you launch VNC; hiding the terminal window when you log in; and grepping for only connect/disconnect/login failures.
Thanks to drewish.com for the growl tail code.

Check for open logs running on OS X, unix or linux [solved]

Use this command to find the log you’re looking for:
lsof | grep -i log

On OS X, typical directories I look in are /var/log/, $HOME/Library/Logs/, and /private/var/log/.

Move Some Common OS X Apps Out of the Dock [solved]

There are some really nifty apps out there that I have set to run all the time, and they’ve been starting to crowd up my dock.

Jungledisk is better than Mozy and is my preferred online backup utility. It’s secure, it uses Amazon S3, it supports versioning, and allows online access. Anyway I noticed their latest version of the app allows you to show the app in the status bar instead of the dock. Update Jungle Disk and then go to Configure > Application Settings > Show application in: Status Bar.

QuickSilver is another great keyboard launcher app I use all the time. It also supports hiding the app from the dock. Go to Preferences > Application and uncheck Show icon in dock. It automatically shows in the status bar when you do this.

Growl is one of my favorite apps, as is HardwareGrowler. However HardwareGrowler has no user interface but still hangs out in the dock. You can fix this by following the instructions on this page. It took me a couple tries (I put the <key>LSUIElement</key><true/> in the wrong place the first time and had to start over…Also you touch the whole HardwareGrowler.app package in the finder), but now it’s hidden from the dock.

Now if only I could get VineServer working with Growl. VineServer does allow you to install a system server, but unlike the app, it does not notify when someone connects, which I prefer to know about. So for now, VineServer sits in my dock as a hidden application.

Back up iPhone SMS messages into an excel database without jailbreaking [solved]

So here’s a somewhat complicated but entirely graphical way of backing up your SMS messages from your iPhone into an excel spreadsheet. I couldn’t get Syphone to work so here is my solution.

The first thing you’ll need is iPhone Backup Extractor. It’s a mac program, but there are other cross platform backup decoders out there such as mobilesync-inspect. You’re looking for the SQLite SMS database (iPhone Backup Extractor calls it SMS.db). iPhone Backup Extractor is not compatible with iPhone OS 3.0 yet but it does work with 2.2.1. Hopefully 3.0 will work soon.

Run iPhone Backup Extractor and select your most recent backup. Scroll down to the bottom of the applications and choose iPhone OS. Choose a folder to save it in.

iPhone Extractor

Then, use an SQLite browser such as SQLite Manager (don’t know why this is a firefox addon, but it rocks) to view the database.


All of the SMSes are stored in the messages table – you can right click on it and export it as a CSV. Alternatively you could export the whole database as an SQL or XML file. But open up the CSV in excel and you’re done! Sweet!

SMSes in excel

Choose a random winner or randomize a list with terminal and PHP [solved]

I wrote this for my class, which needed to have a randomized order of presentations:

php -r '$order = array("person1","person2","person3","person4","person5","person6","person7","person8","person9","person10");shuffle($order);foreach($order as $number=>$name){echo $number+1 . " $name\n";}'

To run it, open up terminal (in OS X) and paste it in.

I’ve also had to choose a random winner for gift certificates before:
php -r '$order = array("person1","person2","person3","person4","person5","person6","person7","person8","person9","person10");shuffle($order);echo "$order[0]\n";'

‘No access’ greyed out for user Everyone in Leopard File Sharing [unsolved]

This is a follow up to my previous post about locking the system out of itself by trying to set “Everyone”‘s priveledges to “no access” via get info and locking Leopard out of its own system.
I recently discovered that my file sharing is not behaving like it is supposed to. “Everyone” having “read only” access indeed SHARES ALL OF MY FILES with read only access and no password required. If you try and set “Everyone” to “no access” via get info like I previously described, when you reboot Leopard fails to launch and the Leopard install disk cannot repair the permissions. (See my previous post for my fix).
But when I try and change the read only access for Everyone, “no access” is greyed out:
Leopard does not let you choose no access for Everyone
This is a huge bug apple!! Leopard has downgraded the ability to share files with a password.

iTunes for windows can’t see shared mac library [solved]

For several months I have been trying to stream my iTunes library from my iMac to my wireless laptop in the living room on the same network. I’ve streamed iTunes with various software to other devices (other PCs, Windows Mobile phone, iPhone) using SlimServer, Simplify Media and Mojo, but for some reason it would not stream over the network.
I tried updating iTunes on both machines but had no luck. I tried using Simplify Media to share instead but that didn’t work either. I double checked the preferences on both machines. I disabled the firewall and AVG antivirus. Still no luck.
Finally, I solved it: I opened up Apple Software Update and installed the Bonjour update for Windows. So it was Apple’s fault but I couldn’t find any documentation anywhere. Oh well, it’s fixed now. Hurray!

iPhone 2.1 cannot be synced – unknown error with iTunes 8.0 [solved]

For a while I was getting a maddening “The iPhone cannot be synced. An unknown error occurred (13213)” error every time I would try and sync my iPhone. No amount of iphone resetting or iTunes restarting would solve my problem. Finally this apple disccusion solved my problem – I had to turn off iTunes Genius and then it worked fine.
But that sucks, I liked Genius, and iTunes stupidly got rid of the mini store so now I can’t see any reviews or album information of the tracks I’m listening to. (Genius isn’t much better actually, it shows you artists’ top albums by default instead of information on the one you’re listening to. Bring back the mini store!)
Anyway, the solution was to upgrade quicktime, which I had been avoiding because it requires a reboot. Actually my 10.5.5 update crashed and almost hosed my machine so I had to use the 10.5.5 Combo Update (which I highly recommend, as you still have Finder and activity monitor control as it works) to upgrade and then upgrade quicktime.
Anyway, after I installed the quicktime update and reinstalled Genius, my iPhone sync worked fine.

Run Parallels in Coherence Mode with Two Monitors [solved]

I’ve used parallels for years and never noticed the “Use Multiple Displays” option of Coherence mode. It’s accessible via the Edit > Virtual Machine settings when you shut down your VM, but it’s also hidden away in View > Customize… which you can access during runtime.

Now I can finally drag that word requirements doc or release note onto my second monitor while I code in the first. Sweet! It’s something I’ve missed without realizing I was missing it.

There are some bugs though. My second monitor is taller than the first because I have it rotated 90 degrees; that means the task bar mounts to the bottom of the second monitor and doesn’t display on the first, so I can’t see the start menu. I can click on the parallels icon in the dock to see the start menu, but I still can’t see quick launch. I can turn on “Exclude Dock” for usable work area, but then the task bar floats across the middle of my second monitor and applications cannot be resized past it. My solution in the mean time is to relocate my task bar and start menu to the top of the screen, where it more or less runs along the top of both of my monitors. This is a strange new workflow but I think I like it!

Stop external hard drives from spinning down on OS X [Solved]

I have my iTunes music library, samples, video files, and more on an external drive, and the 5 second delay of my drive spinning up is annoying at best and prevents me from working at worst. I finally just found the menu that disables the external drive from spinning down. I don’t know how this affects the drive life but it’s worth it for me.

System Preferences > Energy Saver > uncheck Put the hard disk(s) to sleep when possible

Next »