Murphy Mac » Posts in 'Mac OS X' category

Access Web Sites Directly

A quick look at simple ways to open frequently visited web sites directly, without your mouse.

Hopefully you don’t click in the address bar and forward-delete and backward-delete to erase what’s there.  But some people do.  Here are Murphy’s tips for opening web pages directly with the keyboard.

1.  Add an alias for the site to the Dock. You can access the Dock with Control+F3, even if you’re in another application.  DockUse the arrow keys to select your site-alias and the Return key to open it.  You can create the alias by dragging the icon from your browser address bar to the Desktop.  Then drag from the Desktop to the right side of the Dock.

2.  Command+L and a Firefox keyword. This is an easy one.  Command+L selects everything in the address bar in Safari and Firefox.  Control+L does it in Internet Explorer.   Now you can start typing - whatever is highlighted  will be deleted.  But don’t type out the url, just type the keyword you’ve assigned to the site, which could be as short as one character.  Keyword?  Read on…

keywordEdit your bookmarks in Firefox and view properties by selecting a bookmark.  There’s a field for keywords.  Go ahead and set a keyword - now you can enter the keyword in the address bar instead of the url.

Safari doesn’t have the bookmark keyword feature - but you can use Command+1 and so forth to access the bookmarks on the bookmark bar.  They’re numbered from left to right automatically.

TextExpander3.  TextExpander. With TextExpander your Mac is always watching for certain text strings.  When you type a configured string the assigned action is carried out.  The action can be an Applescript.  A simple script can open your browser of choice to your destination site.  The great thing about TextExpander:  Your browser needn’t be active to invoke it.  You could also use TextExpander simple text replacement to replicate the Firefox keyword function in Safari. More about TextExpander. $29.95.

1password4.  1Password. You might know about or even use 1Password for storing all your log-on credentials in one secure database.  But it also features a bookmark pop-up that lets you jump to a site and auto-populate your username and password.   1Password lets you assign names to your entries, so you can keep them short.  It’s a way to bring keywording to Safari.
1Password licenses start at $39.95. This post has more information and a screencast about 1Password.

5. Terminal.
Do you always keep a Terminal window open? Set an alias in Terminal to open your favorite browser and pass along the site to enter.  A command like this will store the alias for you:

alias mm=’open -a Firefox http://murphymac.com’

Then open a terminal Window, type mm and hit return.  Your page will open.  See this post for information about making an alias available when you reboot.

6. Use Quicksilver.

Do you have a favorite way to open favorite sites? Let us know in the comments.

Related Post: Murphy shows how to open a set of tabs in Safari with one click.

Share/Save/Bookmark

Web Hosting | Permalink

Tar

tar
I’ve avoided the tar command for some time now, only to find there’s nothing to be afraid of.  My Windows background always led to pkzip for compression and archiving.  Knowing that zip shipped with OS X there wasn’t really a need to look any further.

But sometimes you’re sent things in the tar format.  Or the even more mysterious tar.gz.  If you have no experience with Linux or Unix the tar command and tar.gz files might leave you confused. Before OS X the only experience Murphy had with Linux was hacking a Directv TiVo so he could install a bigger drive.

Anyway - OS X makes tar and tar.gz files simple to work with.  Double-click one in the Finder and its contents are extracted.  But what if you want to create one?  Or see what’s inside before you open it?  We’ll do both of those things in the screencast, but here’s a quick overview of some tar basics.

tar -cvf irl08.tar Pictures/ireland_08

That command will create an archive called irl08.tar in the current directory.  All the files inside the ireland_08 directory will be placed inside, without compression.  The c creates the archive, the v displays progress as files are added, and the f specifies a file as the destination.  (tar stands for tape archive)

tar -zcvf irl08.tar.gz Pictures/ireland_08

This command is almost exactly the same, but the z option compresses the archive so we’ve added the customary gz to the file name.

Here’s how to view the contents of a tar archive:

tar -tvf irl08.tar

The t option lists the files.  If your archive is compressed add a z option too.

How does tar compare to zip?  Murphy isn’t sure what all the differences are.  He compressed a directory with dozens of screencasts in it using both utilities.  The resulting archive was about the same size for each.  The screencasts were already compressed themselves, so they might not be the best test subject.

A little research shows that extracting a single file from a very large archive might be quicker with zip than with tar.  A zip file includes a table of contents that makes locating an included file more direct.  And a zip file compresses the included files individually as they’re added.  A tar.gz file creates the archive first and then compresses the whole thing at once.  That can make single file extraction more time consuming as the entire large archive must be opened up.

There’s also gzip for compressing files.  But gzip deletes your original file, replacing it with the compressed one.   That makes Murphy a little nervous.  tar leaves your original files in place, so you can delete them if you need to.

tar.  One less thing to be afraid of.

You might find these posts interesting:

zip
command line encryption

Share/Save/Bookmark

Watch Now | Permalink

TextExpander

textexpander
TextExpander is an incredibly useful utility, especially if you prefer to keep your hands on the keyboard and leave the mouse alone. It works by watching your keystrokes and taking action whenever you type a code you’ve set up. For example, I type xmmlink in a text editor and the letters are instantly converted to <a href=”http://murphymac.com”>Murphy Mac</a>.

It works across applications, so you don’t need to set up your codes over and over. TextExpander takes stuff I’ve been doing the easy way and makes it easier.  You can use TextExpander to drop a long path into Terminal, to create tinyurls, or even to run Applescripts.  TextExpander can assign text “snippets” or Applescripts or even pictures to a code, which you define.

TextExpander will convert your code as soon as you type it, unless you prefer to use a delimiter like the tab key or the space bar.  The utility is always watching as you type, so even if you’re in iTunes and enter xomm (x open murphy mac) you’ll be whisked away to the Murphy Mac site in whatever browser you prefer.  Assuming you’ve set a definition for xomm in TextExpander to run an Applescript.  You can also set hotkeys to disable TextExpander if it’s getting in your way.

Coming up with a good code system might be half the fun.  Devise a sound naming strategy and TextExpander shouldn’t get in your way under most circumstances.  The examples I used above start with x.  Some users might use z or q - letters found in few actual words - so the chances of invoking TextExpander by accident are smaller.

The screencast shows some basic examples of what you can do with TextExpander.  I’ll post again soon and show some of the tricky stuff, like creating short URLs and entering date offsets with simple codes.

Share/Save/Bookmark

Watch Now | Permalink

AirSharing

AirSharing - an application for your iPhone or iPod touch, turning the device into a wifi storage drive and file viewer.

It would be nice if Apple would let you copy files directly to your iPhone or touch over the USB cable, but they don’t.  What we can do is copy files over from a Mac or PC using AirSharing.  As a bonus you get a viewer providing support for a variety of file types.   More on that at the end.  First, let’s look at how we copy files onto your device, and how we get them off.

Placing Files on Your Device
connect
To copy files on from your Mac just go to the Go menu in Finder and select Connect to Server.  Or  hit Command-K.  In the box that opens (see image to the right) enter  http://w.x.y.z   — but replace w.x.y.z with the ip address of your device.  Don’t know the ip?  Don’t worry, AirSharing will help with that as we’ll see in a minute.

foldersA Finder window will open displaying whatever folders you’ve created on your iPhone or touch.  You can drag files in or out, delete files or folders, or create new ones.

connectIf you’re on a PC you’ll start with Internet Explorer.  Go to the File menu and click open.  Enter the address of your device just like the steps above - and make sure to check the box.  A window will open displaying the folders on your device.

Getting Files Off Your Device.  

When activated on your device, AirSharing turns it into a pocket web server.  Your friends (on the same wifi network with your device) can access your files by pointing their web browser to http://w.x.y.z:8080. connect Again, replace the w.x.y.z with the ip address of your device.  The 8080 is the port number where the web server is running.  For more on what port numbers are read the end of this post.

Just like any other web page, users can right-click the file links to perform operations like saving the referenced file to disk.

File Viewer
list
As a bonus, AirSharing includes viewers for many file types you might want to open.  iWork, photos, office docs, pdf, web docs - in addition to music and movies.  This really comes in handy.  See the developer site for a list of file formats supported.  Instead of having to use iTunes to copy photos onto your device you can just drag a folder of images over and use the AirSharing viewer to display them.

Notice in the image to the right that the ip address of the device is displayed at the bottom of the screen.  The ip address can be seen elsewhere in the interface of AirSharing too, like the settings page.  You can also turn AirSharing off when you’re not using it, which Murphy would recommend.

If you’ve got a big web page you want to review later you can save it as a web archive in Safari and transfer it to your device using AirSharing.  That way you can read it later offline.

Summary

AirSharing makes ferrying files using your iPhone or touch easy.  Yes, wifi is a little slow, but it’s a pretty simple solution that doesn’t need any third party software on your Mac or PC.

In addition, you can copy content like photos, audio, and movies to your device without going through iTunes.  For some that might be worth the price of admission.  Check out AirSharing at the developers site.  $6.99.

Share/Save/Bookmark

Free Shipping at Amazon | Permalink

Which Weather Widget?

weather
I was looking at my iPod weather forecast and looking forward to some cool days in the sixties next week.  And then I looked at my Macbook’s weather widget - which expects temps closer to 80.  Who should I trust?

weather

I’ve actually noticed this quite a bit over the last few weeks.  My iPod thinks it’s going to be cool.  My Macs are all less optimistic.  The weather on my iPod comes from Yahoo! Weather, which partners with The Weather Channel, aka weather.com.   My Dashboard weather comes from AccuWeather.com.

I’ve got Weather Bug installed on my iPod too.  But I’m not in the habit of checking it.

Where do you get your forecast?

Share/Save/Bookmark

Amazon Prime Free Trial | Permalink