Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Mac OS 10.4.10 Login scripts

Thread Tools
 
Search this Thread
 
Old 10 July 2007, 10:43 AM
  #1  
mike1210
Scooby Regular
Thread Starter
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes on 0 Posts
Default 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
Old 10 July 2007, 12:50 PM
  #2  
Markus
Scooby Regular
 
Markus's Avatar
 
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes on 0 Posts
Default

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?

Last edited by Markus; 10 July 2007 at 02:23 PM.
Old 10 July 2007, 01:48 PM
  #3  
mike1210
Scooby Regular
Thread Starter
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by Markus
What files are you trying to delete at login and why?
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
Old 10 July 2007, 02:28 PM
  #4  
Markus
Scooby Regular
 
Markus's Avatar
 
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes on 0 Posts
Default

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.

Last edited by Markus; 10 July 2007 at 02:39 PM.
Old 10 July 2007, 02:48 PM
  #5  
Markus
Scooby Regular
 
Markus's Avatar
 
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes on 0 Posts
Default

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.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
S3LDM
Wales
56
09 December 2015 01:10 PM
S3LDM
ScoobyNet General
32
01 December 2015 09:35 AM
Wish
Computer & Technology Related
3
30 September 2015 10:39 PM
Littleted
Computer & Technology Related
0
25 September 2015 08:44 AM
pimmo2000
Computer & Technology Related
2
21 September 2015 12:04 PM



Quick Reply: Mac OS 10.4.10 Login scripts



All times are GMT +1. The time now is 07:45 PM.