dfbills.com blog

Editing a crontab

Because I do this so infrequently and always wonder why I haven’t posted it before-

Editing a crontab:

crontab -e

i for insert mode
esc to command mode
ZZ to save and exit

comment on this | posted in: Tips Unix

AppleJack In-Depth

Dan Frakes has a nice writeup on AppleJack 1.5 as part of MacWorld’s Mac Gems series.

comment on this | posted in: Mac News Troubleshooting Unix

Connecting MacOSX’s X11 to a remote host

It’s surprisingly easy to get remote applications up and running in Apple’s X11 environment.  Once installed on your Mac, fire it up and add one additional parameter to your remote SSH connection +X.

ssh -X .(JavaScript must be enabled to view this email address)

image

Once you’re in, just start the application you want from the command line.  Here, I typed “firefox” and now I have firefox 3 running in its full X11 glory on a remote computer.

image

More detailed information can be found on Apple’s Configuring and Running X11 Applications on Mac OS X page.

comment on this | posted in: Mac Tips Unix

AppleJack Released for Leopard

My favorite system maintenance tool, AppleJack, has finally been released for Leopard.

AppleJack down and dirty, but user-friendly troubleshooting tool for Mac OS X.  It runs in Single User Mode and runs as a menu-based app for ease of use.  This allows you to troubleshoot a computer even when the GUI isn’t available and without using a boot CD. 

comment on this | posted in: Mac News Troubleshooting Unix

Terminal tricks

I’ve been spending a large amount of time in the MacOSX terminal lately.  Naturally, I had to install a few fun terminal toys: (yes, I know both been out for a while)

Visor: gives you keyboard shortcut and slick animation to reveal a terminal window, similar to the Quake console

GeekTool: is a PrefPane that can overlay terminal output on your desktop.  Very useful for watching system logs, graphs or any long-running process

comment on this | posted in: Mac Tips Unix

How to run a cron script every 30 minutes

To run a cron script every 30 minutes, specify minute intervals of both on the hour and 30 minutes past the hour separated by a comma.

0,30 * * * * wget http://dfbills.com > /dev/null

And to suppress email notifications:

0,30 * * * * wget http://dfbills.com >> /dev/null 2>&1

The >> /dev/null 2>&1 part sends the standard output to /dev/null and redirects standard error (2) to the same place as standard output (1).

comment on this | posted in: Tips Unix Webdev

Changing iTunes arrows to local

Somehow my iTunes arrows got changed back to default- clicking takes you to an iTunes Music Store search.  I prefer to change the iTunes arrows to point to my local
library.  Of course, you can always hold down “option” to modify this behavior, but I like to just grab my bluetooth mouse and forget the keyboard when navigating from my couch.

To change iTunes arrows to local:

defaults write com.apple.iTunes invertStoreLinks -bool YES

comment on this | posted in: Mac Music Tips Unix

Removing Leopard download quarantine

MacOSX Leopard tags files downloaded from the web with a special metadata bit.  This bit is later referenced to warn about running downloaded apps and scripts. Even archived files maintain this tag through the compression/decompress process.

I needed to update the firmware on my Canon PowerShot SD1000 camera and couldn’t get the camera to recognize the file.  Turns out the com.apple.quarantine xattribute was set.  To fix:

xattr -d com.apple.quarantine *.FIR

xattr does not have a man entry.  Use:

xattr -h

I found most of my information on this helpful post.

(2) comments | posted in: Mac Tips Troubleshooting Unix

Open Apple Remote Desktop selection in SSH

John C. Welch posted a handy AppleScript which grabs selected addresses from Apple Remote Desktop and opens SSH sessions in the terminal for each one.  Hard to believe this isn’t built into ARD.  I’d previously used a hard coded AppleScript to open up these sessions.  Having them opened from the live scan list is very handy!

I took out the hard coded username in the SSH string and added an activate command to the terminal to bring the windows to the front.

set theSSHList to {}
tell application “Remote Desktop”
set theComputers to the selection
repeat with x in theComputers
set the end of theSSHList to Internet address of x
end repeat
end tell

tell application “Terminal”
activate
repeat with x in theSSHList
do script “ssh ” & (contents of x)
end repeat
end tell

comment on this | posted in: Mac News Tips Unix

Expand those print dialog boxes

Here’s how to expand all those pesky minimized print dialog boxes in Leopard:

defaults write /Library/Preferences/.GlobalPreferences PMPrintingExpandedStateForPrint -bool TRUE

ah, that’s better.

comment on this | posted in: Mac Tips Unix
 <  1 2 3 4 >  Last »