If you’re using an iPhone or a touch or some other mobile device this could be a very convenient way to retrieve a file from home and view it on your device.
Here’s the scenario: You’re on the bus, you realize your French homework is sitting at home on your Mac. Send yourself a text message with the path to the file. By the time you get to school and log on to a computer your file has been emailed. Problem solved.
Configure Murphy’s script to run every so often using something like launchd. Then send yourself an email. Include the path to the file you want sent in the body, like this:
Mail will create a new message, attach the file, and send it to the address in the script. You can configure the script to run when a certain word is in the email subject, like FileGrab. This is an ideal use for rules in Mail.app. But rules don’t seem to work in Mail as of 10.5.1. Murphy hasn’t tried 10.5.2 yet.
Update: If you leave the file name out the folder’s contents will be zipped and sent.
Instead of using rules, this script is written to run periodically. Maybe every ten minutes or so. If it sees an email with the keyword in the subject it checks for the file and sends it. If the file doesn’t exist the script sends an email that says so.
Security hole? Well, Murphy doesn’t think so. The file will only be mailed to the address you specify in the script, it’s not a reply. (you could alter the script to have it reply, but that doesn’t seem like a good idea.) You can use secure email to send the request and the file. That’s secure.
Getting back to the mobile devices: Your unhacked iPhone and touch don’t let you download files. So you can’t SSH back to the house and grab the file. You could set up your Mac as a web server, but I wouldn’t want to do that.
Using this script the file is emailed to you, so you can view it in Mobile Mail or Gmail depending on what kind of file it is. You can easily view the file later, when you’re offline. The catch? You need to know the path to the file you’re retrieving. Don’t know the path? Here’s some help.
Windows Users: Have a look here.
Note: Script requires use of Mail.app. To schedule this script to run on a schedule you might want to try something like lingon for editing your launchd configuration.
Other Murphy scripts for working with Mail:
Sleep Your Mac by Email
Select a Playlist by Email
Get a List of Your Files by Email
Retrieve Mail.app Messages by Text Message (this post shows how to match emails with Applescript using multiple criteria)
There are a couple things I’ve noticed about Time Machine that are worthy of mentioning. Yes, Time Machine is a great application and the Mac world will be a better place for it. And despite its admirable job of hiding all the nitty gritty from sight, the nitty gritty is still back there, making things happen. You can try to simplify backup — but the fact remains, backup isn’t simple.
Renamed Files and Folders
I’d read some speculation that Time Machine might be very, very smart. That it might somehow tag your files in a way that it knew when you renamed or moved one. The hope here was that Time Machine wouldn’t copy a renamed file to your backup drive and store it twice. Not so. Time Machine does make the copy. Read more »
At some point, you might want to convert your Boot Camp volume to a true VMware virtual machine using the VMware Converter.
Murphy’s first experiment with VMware Fusion was to access his Boot Camp install of XP while running Leopard. Fusion made it easy. After installing Fusion it was a simple task to add Boot Camp to the list of Virtual Machines on Murphy’s Macbook Pro.
VMware suggests getting away from Boot Camp unless you have a compelling reason to boot into Windows at startup, suggesting that Fusion performs better with non-Boot Camp virtual machines. There are other reasons to do this as well.
First, you don’t get all the features of Fusion with your Boot Camp partition. You can’t suspend the virtual machine and resume it later. In other words, if you’ve quit Fusion you need to go through a Windows reboot next time you use it. With a regular virtual machine Windows opens up right where you suspended it after your last session, saving lots of time. Adding this functionality would have caused a conflict between the VMware session and the state of Boot Camp when it was selected at startup.
Second, a regular virtual machine adds flexibility to your system. You can offload the virtual machine to another drive or a different computer when you need to free up disk space. Moving a Boot Camp partition isn’t so simple, nor is it a supported feature.
Murphy’s going to play around with Fusion a little more. Then he’s going to reclaim the space Boot Camp has been taking up by deleting the partition.
The screencast shows how to covert a Boot Camp partition into a regular Fusion virtual machine. Here are the basic steps Murphy followed:
- Enable Windows sharing on your Mac hosting the Boot Camp partition.
- Run your Boot Camp install under Fusion.
- Install the VMware Converter utility under Windows.
- Use the Converter utility to create the new virtual machine in a folder on your Mac, writing it via Windows sharing.
You’ll probably want to make sure everything you do in Windows works well before you delete your Boot Camp volume.
Get a trial version of VMware Fusion.
Download the VMware Converter.
Buy Fusion from Amazon – $41.99 at the time of this post after a $20 rebate.
In today’s installment of Terminal Thursday we’ll be encrypting a single file from the command line courtesy of an excellent tip from the guys over at OSXDaily. The openssl utility ships with your Mac – and it’s pretty easy to use.
An OSXDaily reader posted a comment asking if there was a drag and drop way to encrypt a file. We’ve got a solution – sort of. Murphy sees this as a perfect place to introduce a shell script that prompts the user for input. Just kick off the shell script and you’re prompted for the file you want to encode. You can drag the file onto your Terminal window and hit enter. You’ll be prompted to set a password and you’re done.
You could make a similar shell script for decrypting the files too. And you’re not stuck with Murphy’s method, which dumps the output in a pre-configured folder. You could concatenate an extension onto the encrypted filename instead. Whatever works for you.
The screencast assumes you’ve seen Murphy’s post about making a shell script, so you might want to check that one out before getting started. It also introduces basename – which helps us extract a file name from a full path.
A word of warning from the original post: Don’t forget your password. Chances are you’re not going to find a way to break triple-des security.
UPDATE: Carry out this process with a Widget.
Google updated its calendar application this week and added some critical features. In the past you could only set reminders for your primary calendar. Now you can set them on every calendar.
Furthermore, each calendar under your account can have different notification settings. For example – a calendar called Screencast Schedule might be set to send pop-up notifications while a calendar called Client Dinners might send Email and SMS reminders.
This is a great improvement. The only thing Murphy doesn’t like is having to dig down into an appointment to change the notification behavior if he wants something other than the default. Murphy is a big fan of the Quick Add feature. It’s much easier to set dates and times using Quick Add than with the clunky drop-downs in the edit-appointment form. If Murphy only wants an SMS for certain appointments he has to go into the appointment, click options, and change the settings.
Murphy’s solution to this inconvenience is documented here. He doesn’t turn on the gCal SMS feature for any of his calendars. Instead, he lets gCal send an email reminder. Then his Gmail account filters those emails and sends appointments matching a certain criteria to the phone.
With gCal’s new features you could continue to do it this way. Despite the improvements, the calendar only seems to support Quick Add for the main calendar. Otherwise you might make two calendars for something like “Social Engagements” – one that sends an SMS and one that doesn’t.
Here’s another feature you might not know about in the Google Calendar: When you use Quick Add you can enter an email address on the entry line. That will add that person to the invited guests of the appointment. You can also use Quick Add for recurring events.
What Google Calendar really needs: The ability to specify other things on the Quick Add line. Like which calendar to place the appointment on and what kind of reminder you’d like to receive. It’s much more efficient for keyboard-oriented users who don’t want to click all over the place just to make an appointment.