osascript resets $HOME ?!
osascript resets $HOME ?!
- Subject: osascript resets $HOME ?!
- From: Paul Reilly <email@hidden>
- Date: Mon, 13 Jan 2003 16:00:53 +0000 (GMT)
I'm seeing some odd behavior with using the command line 'osascript'
program to run an applescript as part of the login process:
I've set /etc/ttys to run a /bin/loginhook script upon login...
This script just runs osascript with a scriptname:
#!/usr/bin/osascript /var/scripts/simple3
The applescript "simple3" just opens a file:
tell application "Finder"
open file "HardDisk:Users:testfile"
end tell
If I run this once logged in from the command line it's fine.
If I run it as part of the login process, it also works. But
the problem is as a side effect it messes up the finder!
The Desktop no longer shows the extra icons that should be on it, and when
you click on HOME in the finder windows, it takes you to
/private/var/root ! Which isn't HOME foir the logged in user!
I find that if I "Force Quit" the finder, everything fixes itself.
My Desktop icons come back and the finder HOME goes to the correct
HOME for the logged in user.
I'm using 10.2.3.
Could it something to do with the fact that the login script
runs as root? Is it a bug in osascript?
Incidentally, if the remove the middle line in the applescript it
doesn't cause any problem....
Bewildered,
Paul
+--------------------------------------------------------------------------+
| Paul Reilly email: email@hidden |
| Unix Systems Administrator phone: +(353)-01-608-3641 |
| IS Services, Trinity College Dublin fax: +(353)-01-671-1181 |
| Dublin 2, Ireland web:
http://tcd.ie/People/Paul.Reilly/ |
+--------------------------------------------------------------------------+
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.