Re: Log out
Re: Log out
- Subject: Re: Log out
- From: Simon Forster <email@hidden>
- Date: Fri, 19 Apr 2002 10:27:56 +0100
On Thursday, April 18, 2002, at 06:21 PM, Joe Kelly wrote:
Wow that's cool. You could implement Logout and Login Items folders
with the
-logouthook/-loginhook. You'd have to come up with the shell script
equivalent of:
if exists folder "~/Logout Items/"
do shell script "open '~/Logout Items/*' "
end if
Anyone? Anyone?
It's easy to do. Modify /etc/ttys as per the instructions at:
<
http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/BootingLogin/
Customization_Techniques.html>
My ttys file's first uncommented line started:
console "/System/Library/CoreServices/loginwindow.app/loginwindow"
vt100...
After making a copy of the existing ttys file, I modified this to read:
console "/System/Library/CoreServices/loginwindow.app/loginwindow
-LogoutHook /Users/myUserName/bin/LogoutScript" vt100...
where "myUserName" is my user directory. In my users directory I have a
directory (folder) called bin in which I've put my (shell) scripts. One
of these is called "LogoutScript". This script does whatever I want at
logout and could be used to invoke an AppleScript Application...
...hmm...
in fact it does now. When I log out I get a beautifully redundant
message which appears on screen saying "Logging out and going to sleep."
This is a simple "display dialog" AppleScript. Works when I shutdown too
(as I'd expect).
The "hmm" was because, when I changed the set-up from my previous
config. on restarting I got a blue screen of death (I must have confused
the poor dear). Anyway, logged in from another machine via SSH and shut
it down from there and everything's hunky dory now.
My question is why Apple doesn't do that already.
Wait for 10.2 is my guess.
ATB
Simon Forster
________________________________________________
LDML Ltd, 4/5 Hazlitt Mews, London, W14 0JZ, UK
<tel int="+44 20 7602 9370" uk="020 7602 9370">
<fax int="+44 20 7371 6662" uk="020 7371 6662">
<
mailto:email@hidden>
________________________________________________
_______________________________________________
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.
References: | |
| >RE: Log out (From: Joe Kelly <email@hidden>) |