Mac OS 10.4.10 Login scripts
#1
Scooby Regular
Thread Starter
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes
on
0 Posts
Mac OS 10.4.10 Login scripts
Hi all, does anyone know how to get login script working on a Mac that can delete 2 particular files on login if they exist. The script would need to run as any user that logs onto to the Mac, the Mac will be bound into Active Directory so the users will only have “user” rights on the Mac itself
I have found various links on “login hooks” but could never get files to actually delete
Running OS X 10.4.10
I have found various links on “login hooks” but could never get files to actually delete
Running OS X 10.4.10
#2
Scooby Regular
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes
on
0 Posts
This official Apple document details how to create a login hook, so it might be worth trying that and seeing if it works.
Another thing you could look at is Mike Bombich's Login Window Manager which allows you to add login/logout hooks.
If you run the script manually from Terminal does it execute correctly? What files are you trying to delete at login and why?
Another thing you could look at is Mike Bombich's Login Window Manager which allows you to add login/logout hooks.
If you run the script manually from Terminal does it execute correctly? What files are you trying to delete at login and why?
Last edited by Markus; 10 July 2007 at 02:23 PM.
#3
Scooby Regular
Thread Starter
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes
on
0 Posts
Thanks Markus, I cant get the first link to work though, comes up as "this" in the IE page
Im trying to delete two files that parallels makes when it isn't closed down properly. It creates 2 files with .sav and .mem file extentions
my image file is located in users/shared/lab test/
basically if someone closes down parallels just using the red cross (close window) instead of closing the machine down properly, the 2 files are made
Then if the user logs out and someone else logs in the VM won't run without first deleting the .mem and .sav files first.
Mac is bound into Active Direcory using the directory access tool in utilities
Im trying to delete two files that parallels makes when it isn't closed down properly. It creates 2 files with .sav and .mem file extentions
my image file is located in users/shared/lab test/
basically if someone closes down parallels just using the red cross (close window) instead of closing the machine down properly, the 2 files are made
Then if the user logs out and someone else logs in the VM won't run without first deleting the .mem and .sav files first.
Mac is bound into Active Direcory using the directory access tool in utilities
#4
Scooby Regular
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes
on
0 Posts
I've edited the first link as I forgot to actually past the url in, doh!
I don't think you need a login script to do what you want. Closing the VM window will, by default, suspend the VM rather than shutting down, hence why it creates the files, so you can resume the machine the next time.
If you go into Parallels Preferences (not the VM's preferences), on the General tab you'll find a section called "Perform action when virtual machine is running".
The first option is "On application quit" and the default is "Suspend", try changing this to "Shutdown", then click OK. Then launch the VM, and let it boot up to the desktop, then click the close button on the window and see if it still creates the files, I have a feeling it won't as it will shutdown the VM rather than suspending it.
I don't think you need a login script to do what you want. Closing the VM window will, by default, suspend the VM rather than shutting down, hence why it creates the files, so you can resume the machine the next time.
If you go into Parallels Preferences (not the VM's preferences), on the General tab you'll find a section called "Perform action when virtual machine is running".
The first option is "On application quit" and the default is "Suspend", try changing this to "Shutdown", then click OK. Then launch the VM, and let it boot up to the desktop, then click the close button on the window and see if it still creates the files, I have a feeling it won't as it will shutdown the VM rather than suspending it.
Last edited by Markus; 10 July 2007 at 02:39 PM.
#5
Scooby Regular
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes
on
0 Posts
I've just tried the above suggestion and it does appear to work, however I'm not sure how "safe" a shutdown it is, as a message does appear stating that any unsaved changes will be lost, and you don't see this when you do a normal shutdown of the machine. Anyway, the dialog has a "don't show again" option so you can enable that so users won't see this message.
I've asked on the Parallels forum wether this is a safe, ie; normal shutdown, and if not, is it possible to configure this behaviour for the close button.
I've asked on the Parallels forum wether this is a safe, ie; normal shutdown, and if not, is it possible to configure this behaviour for the close button.
Thread
Thread Starter
Forum
Replies
Last Post
pimmo2000
Computer & Technology Related
2
21 September 2015 12:04 PM