Information Technology Reference
In-Depth Information
DEFAULTS WRITE COM.APPLE.FINDER CREATEDESKTOP -BOOL FALSE;KILLALL FINDER
Note that this will mean you can no longer right-click the desktop or drag
files there. The files there will still be accessible by using Finder to browse to
your DESKTOP folder.
To restore things to normal after your presentation, again open a Terminal
window, but this time type the following:
DEFAULTS DELETE COM.APPLE.FINDER CREATEDESKTOP;KILLALL FINDER
Hey, presto! Everything should be back to normal. If not, log out and back
in again.
Creating a Desktop Hiding App
With the use of a quick AppleScript, this Terminal command can even be
turned into a stand-alone application that you can run before each presenta-
tion, saving the hassle of the command line.
Open AppleScript editor (open Finder, select the Applications list, and then
double-click AppleScript Editor within the UTILITIES folder), and type (or cut and
paste if you're reading the eBook version of this topic, being careful to remove
the line breaks) the following code:
DISPLAY DIALOG "DESKTOP ICONS VISIBLE OR HIDDEN?" BUTTONS {"VISIBLE",
"HIDDEN"} WITH ICON 2 WITH TITLE "SWITCH TO PRESENTATION MODE"
DEFAULT BUTTON 1
SET SWITCH TO BUTTON RETURNED OF RESULT
IF SWITCH IS "HIDDEN" THEN
TELL APPLICATION "TERMINAL"
DO SHELL SCRIPT "DEFAULTS WRITE COM.APPLE.FINDER CREATEDESKTOP -BOOL FALSE;
KILLALL FINDER"
END TELL
ELSE
TELL APPLICATION "TERMINAL"
DO SHELL SCRIPT "DEFAULTS DELETE COM.APPLE.FINDER CREATEDESKTOP;KILLALL
FINDER"
END TELL
END IF
Click the Run button on the toolbar to test your script. You should see a
dialog box appear with two buttons: Visible and Hidden. To make sure the
app works OK, click Hidden to hide the icons; then run the app again, and
click Visible to reveal them.
To save the AppleScript as an application, click File→Save. Type a filename,
and then in the File Format drop-down list, select Application. Save the file
 
 
Search WWH ::




Custom Search