HostWerks.com Dave's OS X Tips
1 November 2005
Output man Pages to PDF


UNIX man files are very useful, they're a pain to print and they're not very portable. Mac OS X 10.3 aka Panther has a new command available from the terminal, pstopdf. This command takes plain Postscript output and outputs a .pdf file. And you can pipe things to it from the Terminal. To convert a man page to a PDF or to print it later when you have a printer available is a powerful feature indeed.

Structure your command like this:
man -t ls | pstopdf -i -o ls.pdf
The t flag on the man command outputs the manual in Postscript format allowing you to use it as standard output for the pstopdf command. The pstopdf command requires the i flag to use standard input, and the o flag allows you to name the output file, which will automatically save in the present directory from where the user is running the command.
17 January 2004
Screen Capture Tip

If you only want to take a screenshot of a specific window, follow this instruction:

Press Command-Shift-4 on your keyboard
Press the Spacebar, the cursor will change from crosshair to a camera
Click the window you wish to capture with the camera cursor
Done.

This command will also let you capture the Dock or the menubar as a 'window'. You can grab individual icons and labels from the Finder. You can grab just the Desktop. Experiment!
17 December 2003
Booting in Single-user Mode

If you find yourself sitting at the login window staring at a progress indicator, hold down the power button for 5 seconds. Upon restart, hold down Command+S to boot into single-user mode.
  • When prompted, type fsck -y until the system no longer says that it has been modified.
  • Type mount -uw /
  • Type defaults delete com.apple.loginwindow LoginHook
  • Type exit
  • HostWerks.com 25 September 2003
    How to Build OpenSSH 3.7p1 on OS X


    For those who can't make anything work without intervention from on high...
    1. Download the tarball from openssh.org. It's 773K in size.
    2. Let StuffIt Expander do it's thing. For ease of location, move the expanded folder into your home directory /Users/username.
    3. To install OpenSSH with default options:

      cd openssh-3.7p1
      ./configure
      sudo make
      Type in your root password
      sudo make install
    This will install the OpenSSH binaries in /usr/local/bin, configuration files in /usr/local/etc, the server in /usr/local/sbin, etc..

    Note that you must have the Developer Tools installed in order to complete this exercise.
    27 July 2003
    DVD Ripping Guide


    I've posted my two-part DVD ripping guide for Mac OS X.
    12 July 2003
    View Album Cover Art


    Did you you know that if you have album art for any given track in iTunes you can view it full-sized simply by clicking on it? Well I didn't until this morning.
    11 July 2003
    iChat Status

    Found this little iChat add-on that grabs the currently playing song in iTunes and displays it as an iChat status message. iChat Status can be downloaded from here.
    iChat Status

    You can also use Applescript to accomplish the same effect, although it's not as easy to change the message prefix and suffix.
    on idle
    tell application "iTunes"
    if player state is playing then
    set a to artist of current track
    if a is "" then
    set a to "mysterious unknown music"
    end if
    else
    set a to "nothing"
    end if
    end tell
    
    tell application "iChat"
    set status message to "listening to " & a
    end tell
    
    return 20
    end idle 
    	
    Save this in Script Editor as application with "Stay Open" enabled.
    10 July 2003
    Setting an Open Firmware Password


    Download and run this utility. The Knowledgebase article details exactly how to set the password. Setting an Open Firmware password will prevent your Mac from booting without the password being supplied. Period. It will help to secure the contents of your machine and help to keep it safe from prying eyes.
    10 July 2003
    Use Applescript to Grab Lyrics from iTunes

    This is a script based on an article and comments I read at MacOSX Hints. In a nutshell, paste this text into a new Applescript and save it a compiled script in your ~/Library/iTunes/Scripts folder. (note, I had to create the Scripts folder as it was not there.) Restart iTunes. Select a song and start playing it, under the Scripts menu, script menu you'll see your script. Select it, your browser of choice will open and go to a page that has the lyrics on it. The only glitch I've run into is that if the page with the lyrics on it ends in .htm it will simply download the page instead of displaying it. I'll post a solution when and if one becomes available.

    You can grab a copy of the script here.
    9 July 2003
    Reset NVRAM to Lengthen Battery Life

    Here's how to reset your Wallstreet/Pismo/iBook/PowerBook G4's battery circuitry to help give you more time out of your battery.
    	Power down your computer
    	Power back on and press nad hold ⌘ ⌥ O F to activate the Open Firmware prompt.
    	Type reset-nvram and press Return
    	Type reset-all
    The machine should reboot now. Allow your battery to fully recharge. You should notice your battery is now giving you more run time.
    Based on info from Macintouch.
    8 July 2003
    StarfishX

    This a little program I came across yesterday on Macintouch but didn't have a chance to take a look at until this morning. Simply put, StarfishX generates randowm desktop pictures. It utilizes the Alitvec feature found in the G4 processor. It has the capability to save in either JPEG or TIFF format and can change the quality level for either. It is capable of producing some truly amazing desktop pics. StarfishX is free and can be obtained at M Scott Marcy's website.
    6 July 2003
    How to Reset the root Password on Macintosh OS X


    1. Reboot the computer
    2. Hold down ⌘ CTRL S
    3. Type mount -uw /
    4. su (it doesn't ask for a password)
    5. /sbin/systemstarter
    6. passwd
    This will not work if you have set a password in Open Firmware. (⌘ ⌥ O F)
    16 June 2003
    OS X Ideas Page

    Here's a link to an OS X Ideas Page I've been working on.
    16 June 2003
    How to Deal With Common Macintosh OS X Jaguar Problems


    Here's a link to an article on common OS X problems you might run into. It's from the MacAttorney web site.
    16 June 2003
    Apple Knowledgebase Updates

    Mac OS X: May Not Share AirPort Internet Connection

    Internet Sharing may not allow you to share an AirPort Internet connection if AirPort is not set to the highest port priority.

    Mac OS X: Applications Don't Work After Reinstallation
    You may be unable to open an application or its files after reinstalling Mac OS X, including an Archive and Install. Note: You will not encounter this issue if you have a single hard disk volume and you used the Erase & Install option when you performed the reinstallation.

    Mac OS X 10.2: Chart of Available Mac OS Software Updates
    This chart lists Mac OS updates available for Mac OS X 10.2.
    14 June 2003
    OS X Cheat Sheet

    Here's the link to the OS X Cheat Sheet I mentioned during my talk at SMUG's Swap Meet today.
    12 June 2003
    Apple Knowledgebase Updates

    Mac OS X 10.2: "Error 1016", Classic Fails to Start When Managing Applications

    Classic fails to start if you choose to restrict the applications available to a user who does not have an Admin account.
    Mac OS X: Mail - Unable to Quit After Stopping a Message From Being Sent
    You may not be able to quit Mail if you cancel sending a message.
    6 June 2003
    Apple Knowledgebase Updates

    Mac OS X: How to Connect to the Internet With PPPoE

    Many broadband Internet service providers require customers to connect via PPPoE (Point-to-Point Protocol over Ethernet). This document explains how to connect to it.
    Apple Remote Desktop: Mac OS X Clients Can Move the Pointer While Being Controlled
    Mac OS X clients can continue to move the mouse pointer while being controlled by Remote Desktop.
    Mac OS X 10.2: Cannot Connect to File Sharing Over Ethernet When AirPort Is Primary Interface
    You may not be able to make an Apple Filing Protocol (AFP) connection, such as Personal File Sharing, over wired Ethernet if AirPort is your preferred network port.
    Mac OS X 10.2: About Apple Software Restore Command Line Utility (asr)
    This advanced document discusses the Apple Software Restore command line utility introduced with Mac OS X 10.2. A command line utility is a text-only program that runs in Terminal.
    16 May 2003
    Apple Knowledgebase Updates

    Macintosh: Factors That Affect Writing to or Reading From Optical Media

    This document discusses things can affect your computer's ability to write CD and DVD discs, and what can potentially affect their being read by other computers and consumer electronics equipment.
    Mac OS X 10.2: About Compatible Devices and Peripherals
    This document provides links to information about third-party peripherals and devices that are compatible with Mac OS X 10.2. For an overview, see http://www.apple.com/macosx/upgrade/devices.html.
    Mac OS X: How to Reinstall a Prior Version
    This document explains how to correctly reinstall a prior version of Mac OS X in the event that other troubleshooting does not resolve an issue.
    Mac OS X 10.2: Java 1.4.1 Frequently Asked Questions (FAQ)
    This document contains frequently asked questions (FAQ) about Java 1.4.1, with answers to those questions.
    17 March 2003
    Apple Knowledgebase Updates

    Mac OS X: What is Safe Boot, Safe Mode?

    Safe Boot is a special way of starting the computer for troubleshooting startup issues. Safe Mode is the state after a Safe Boot.
    8 March 2003
    Creating Internet-Enabled Disk Images in OS X

    An interesting page that explain how and why to use Internet-enable disk images for sofware distribution.
    7 March 2003
    Keyboard Shortcuts for OS X

    A series of handy, yet little known keyboard shortcuts.
    6 March 2003
    Apple Knowledgebase Updates


    Mac OS X 10.2.4: Unable to Establish or Maintain Dial-Up Connection
    With Mac OS X 10.2.4, a dial-up (PPP) modem connection cannot be established, or is unreliable.

    Mac OS X 10.2: How to Set the MTU Value During Startup
    This procedure describes how to create a startup item script that sets the maximum transmission unit (MTU) value for your network interface(s). This may be required when using certain Internet service providers.

    Mac OS X 10.2: How to Set Ethernet Speed and Duplex During Startup
    Use the procedure below to create a startup item script that sets the Ethernet speed and duplex settings for your network interface(s).
    5 March 2003
    Creating Auto-Enlarging Disk Images

    How to create an encrypted disk image that automatically enlarges as necessary.
    5 March 2003
    Safari Hints

    A cool hint for use with Safari as well as other OS X web browsers.
    2 March 2003
    Keychain Repair Utility

    Apple has released a utility to help alleviate issues stemming from corrupted Keychains.
    28 February 2003
    Building SSH Tuunels

    This brief document explains how to open an SSH tunnel for encrypted communication between points A and B.
    Page maintained by d a v e
    Archive |Cobalt Raq | Home | OS X Tips | Public Key | Resume | Safari Tips | Webmail