Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Make file a login item via Terminal

Make file a login item via Terminal
Thread Tools
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Mar 4, 2004, 05:42 PM
 
Is there any way to make a file a login item other than the GUI-way: opening System Prefs-Accounts and drag the file into the window.

Is there any way to do this through the Terminal for example ?

In OS 9 there was a folder (Startup Items) where you could just drag files or aliases and the would open at startup. I miss this.


The reason for this, is that I am setting up a computer at school with around 100 users. I need to set a specific file as a login item for each user account. It would take way too long to do by logging into each account seperately. Any ideas ?
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Mar 4, 2004, 06:16 PM
 
The user would have to be logged-in at the time (I think) - but you could use this applescript:

Code:
tell application "System Events" make new login item at the front with properties {path:"pathToItemHere"} end tell
     
Forum Regular
Join Date: Dec 2002
Status: Offline
Reply With Quote
Mar 5, 2004, 11:23 AM
 
The reason for this, is that I am setting up a computer at school with around 100 users. I need to set a specific file as a login item for each user account. It would take way too long to do by logging into each account seperately. Any ideas ?
Is the list of items constant (same for every user)? If so the simplest thing would be to set up the list once and then copy the loginwindow.plist file from the configured user to every other user's Preferences folder (make sure to chown the file to the proper user).

If the list isn't constant there's probably a way to write the login items array using the "defaults write" command, but I don't have a machine handy to figure it out.

Bas
     
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status: Offline
Reply With Quote
Mar 5, 2004, 02:46 PM
 
If you have Mac OS X Server too, you should use Workgroup Manager. It can set login items and lock them too.
Vandelay Industries
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:01 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2