| Article: |
Scripting Mac OS X | |
| Subject: | loginhook | |
| Date: | 2004-03-04 13:26:16 | |
| From: | jamesreynolds | |
|
Response to: loginhook
|
||
|
$1 for a shell script is the first variable passed into the script. The Loginwindow passes in the username only, not "/Users/". I don't know why you got the error you did. I got:
|
||
Showing messages 1 through 2 of 2.



Can a solution be found to use relative paths here?
Loginhook script runs as root.. Interestingly this command in the script works. Prefs management in Mac OS X is excellent.
/usr/bin/sudo -u $1 /usr/bin/defaults write com.apple.print.PrintingPrefs DefaultPaperID -string "iso-a4"