My Computing Stuff

I run several computers using Mac OS X. Here are some useful hints:

Invisible files

To make a file invisible:

$ /Developer/Tools/SetFile -a V file-name

(upper case V)

To make a file visible:

$ /Developer/Tools/SetFile -a v file-name

(lower case v)

Safari Plug-Ins

I installed/updated my Adobe reader, and the next time I used Safari, it asked me if I wanted to install the Adobe plug-in to make Safari use the Adobe reader for PDF files. I said yes at the time, but after a bit of use, found it too slow. Granted, it does have more features, but not the one I wanted, which was to open it up outside the browser. With the standard Preview option, this was just a right-mouse pull down "Open in Preview", very convenient. But how to get back to Preview?

A bit of Googling revealed the answer. In Tiger (10.4) and Leopard (10.5), there is a folder /Library/Internet Plug-Ins/ that contains all the plug-ins. Remove the one called AdobePDFViewer.plugin, restart Safari, and you are back with Preview.

Time Machine Repair

A colleague had difficulties recovering his Time Machine backups when he had his motherboard replaced, and he sent me this URL about a fix. It seemed like good insurance to add it to this page: http://www.macosxhints.com/article.php?story=20080128003716101

OpenOffice recovery documents

When Open Office (version 3) "loses" its recovery files, and keeps asking to recover (non-existent) files, edit the file: /Users/ajh/Library/ApplicationSupport/OpenOffice.org/3/user/registry/data/org/openoffice/Office/Recovery.xcu to delete the element nodes containing the offending file path. Then save this file, and restart OpenOffice.

Finding out the screen resolution

I run a number of different displays, and when starting up various programs I need to know the current screen resolution. This little script does the trick:

        #!/bin/bash
        #
        # screenres      determine screen resolution 'HEIGHTxWIDTH'
        # screenres -w   determine screen resolution 'WIDTH'
        # screenres -h   determine screen resolution 'HEIGHT'
        # 
        res=`xdpyinfo | awk '/dimensions/ {print $2}'`
        if [ "$1" = '-h' ] ; then
          # extract height and print
          expr "$res" : '.*x\([0-9]*\)'
        elif [ "$1" = '-w' ] ; then
          # extract width and print
          expr "$res" : '\([0-9]*\)'
        else
          # print full resolution
          echo $res
        fi
      

This page maintained by John Hurst.
Copyright
500 accesses since
29 Jan 2008
My PhotoMy PhotoTrain Photo

Dynamically generated at 20090705:0021 from an XML file modified on 20090526:1534.
Maintainer use only; not generally accessible: Local Server Home Server Hurst Server Work Server CSSE Server