Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a list of login (startup) items' paths System
Login Items can cause conflicts in OS X just as in earlier Mac systems. You can reorder them, or delete them, in the Accounts System Preferencespane. Unfortunately, there is no way to temporarily turn off a Login Item. What if you turn them all off, then figure who was causing trouble, and want to turn the others back on? If, before you deleted them, you had mouse-overed each item, a yellow box would have appeared, displaying the path. If you were _very_ quick, you could have written down the often-lengthy path before it disappeared. (Some of these paths are complex, with the Login Item buried deeply within an application package.)

But there's an easier way! Simply open a terminal window and type in this command at the prompt, and press Return:
defaults read loginwindow | grep Path
The Terminal will display a list of all the paths to all your Login Items. Simply copy and paste the list in to a word processor, and save it where convenient for later reference. The output will look something like this (varying based on what you have installed, obviously):
$ defaults read loginwindow | grep Path
    Path = "/System/Library/CoreServices/System\ Events.app";
    Path = "/Applications/Utilities/PandoCalendarU0192/PandoCalendar.app";
    Path = "/Applications/Utilities/StuffIt Deluxe9.0/MagicMenu.app";
    ...


The above tip is courtesy of Fred Moore and Doc O'Leary, who sent it to me via email. I've often wondered why OS X didn't give you an easy way to disable individual login items -- holding Shift at login will disable all of them, but there's no selective control. While this tip won't provide that, it at least will give you an easy way to reinstall any that you manually remove. To create your list in a one-step operation, use this variation of the above command:
$ defaults read loginwindow | grep Path > ~/Desktop/login_items.txt
This won't generate any onscreen output, but will dump the output directly into a text file (named login_items.txt in this example) on your Desktop.
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[13,816 views]  

Create a list of login (startup) items' paths | 21 comments | Create New Account
Click here to return to the 'Create a list of login (startup) items' paths' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a list of startup items' paths
Authored by: fniessen on Nov 28, '05 07:28:29AM

Hello,

I can't reorder my Startup Scripts here. It semms that this has stopped with 10.4

G.



[ Reply to This | # ]
Create a list of startup items' paths
Authored by: wallybear on Nov 28, '05 07:54:55AM

I can confirm. If I try to reorder them, it simply removes them from list.
I think it's an unresolved 10.4 bug, anyway, as such a behaviour is really strange.



[ Reply to This | # ]
Maybe no bug, since launchd starts them all up at once?
Authored by: PopMcGee on Nov 28, '05 09:23:41AM
Since 10.4, launchd is used to start any task, and launchd improves speed by figuring out what to start together / what to start in which order. Maybe that's why you can't order the elements anymore?

[ Reply to This | # ]
Create a list of startup items' paths
Authored by: noel_gomez on Nov 28, '05 08:01:08AM

Anyone know how to find other items that are starting up,but are not listed in the login items?

I have some app that keeps putting an icon on the dock on startup, but I dont know how it is starting.



[ Reply to This | # ]
Create a list of startup items' paths
Authored by: mark hunte on Nov 28, '05 08:33:14AM

Whats the app, usually the option for this is the the prefs of the app.

---
mh



[ Reply to This | # ]
Create a list of startup items' paths
Authored by: noel_gomez on Nov 28, '05 09:10:57AM

It's HP Director (Scanner) software. There is an app in the application's folder called "Director Docker" which is the one which adds the icon to the dock. However, I dont know how it is starting and I havent seen an option in the preferences to disable it.



[ Reply to This | # ]
Create a list of startup items' paths
Authored by: tc_nyc on Nov 28, '05 09:31:24AM
HP's isntallers are beyond evil. They litter your drive with junk like the startup items you're referring to.

The item you're searching for is located in the file /Library/Preferences/com.apple.loginwindow.plist

Unfortunately, if you are running 10.4.x this file is now binary-encoded to make it even more difficult to remove the offending line item. You may want to try Pref Setter to edit the com.apple.loginwindow file. The key you're looking for is 'AutoLaunchedApplicationDictionary'. I don't have the HP stuff installed on my machine so I can't say for sure if Pref Setter will get the job done.

My explaination is a bit terse this morning, but I think you'll be able to find the HP junk and remove it using that app. I usually fix it in the terminal using pico.

[ Reply to This | # ]
Create a list of startup items' paths
Authored by: noel_gomez on Nov 28, '05 09:48:43AM

I got pref Setter and I just see these values

"com.apple.loginwindow.plist" :

defaults string:

defaults write com.apple.loginwindow "dv com.apple.soundmgr._DV Sound Output Settings" -data 7d000000

Pref Setter string:

prefSetter**dv com.apple.soundmgr._DV Sound Output Settings**data**<7d000000 >
"com.apple.loginwindow.plist" :

defaults string:

defaults write com.apple.loginwindow "NSWindow Frame About This Mac" -string "469 365 307 379 0 0 1280 832 "

Pref Setter string:

prefSetter**NSWindow Frame About This Mac**string**469 365 307 379 0 0 1280 832
"com.apple.loginwindow.plist" :

defaults string:

defaults write com.apple.loginwindow "NSWindow Frame ProcessPanel" -string "316 263 346 284 0 0 1024 746 "

Pref Setter string:

prefSetter**NSWindow Frame ProcessPanel**string**316 263 346 284 0 0 1024 746
"com.apple.loginwindow.plist" :

defaults string:

defaults write com.apple.loginwindow "NSWindow Frame shutdown" -string "268 420 455 154 0 0 1024 746 "

Pref Setter string:

prefSetter**NSWindow Frame shutdown**string**268 420 455 154 0 0 1024 746



[ Reply to This | # ]
using Prefs Setter
Authored by: tc_nyc on Nov 28, '05 10:10:22AM

In Pref Setter, for whatever reason, the /Library/Preferences/com.apple.loginwindow.plist file is listed as "loginwindow" in the Open Domain Quickly menu.



[ Reply to This | # ]
maybe NOT prefs setter
Authored by: tc_nyc on Nov 28, '05 10:25:36AM
OK, since I don't have a faulty file to work on I can't seem to confirm whether Prefs Setter is even looking at the correct file (I suspect the correct file is the one listed under System Preferences). You may need to edit the file by hand in the terminal.

First, you will need to convert the binary com.apple.loginwindow.plist back into an ASCII file. See this hint on how to use the plutil command to achieve this. You don't necessarily need to convert the file back to binary.
Then, use your favorite command line editor to open the file and remove the lines that contain the HP applications. You will want to remove everything between and for each instance of the HP application. I have done this on several occasions, so I know it works.

Also, you may be able to manually open the preference file in Prefs Setter to edit the plist, but you may also need to run Prefs Setter as root to save the changes.

[ Reply to This | # ]
maybe NOT prefs setter
Authored by: adrianm on Nov 29, '05 07:35:41AM

Why does everyone complain about the .plist file being binary?

Just open it in PropertyList editor and remove the offending entries from there.



[ Reply to This | # ]
maybe NOT prefs setter
Authored by: tc_nyc on Nov 29, '05 08:33:03AM

Because some people don't have the developer tools installed, and installing developer tools to get at that one app is a bit of overkill.



[ Reply to This | # ]
maybe NOT prefs setter
Authored by: adrianm on Nov 30, '05 12:34:38AM

Ah, OK. Didn't realise that was a dev tool.
It's always been on my Macs, but then I've always had the dev tools installed :)



[ Reply to This | # ]
maybe NOT prefs setter
Authored by: Darkshadow on Dec 04, '05 07:49:18PM

Hi, I'm the developer of Pref Setter, I can clear up this issue.

There are actually three preference files with loginwindow in them. /Library/Preferences/com.apple.loginwindow.plist (which is listed under the "System Preferences" part of the Open Domain Quickly window), HOME/Library/Preferences/com.apple.loginwindow.plist, and HOME/Library/Preferences/loginwindow.plist.

It's that last file (just listed as loginwindow in the Open Domain Quickly window) that holds the Login Items.

Hope that helps clear this up



[ Reply to This | # ]
Create a list of startup items' paths
Authored by: murali1080 on Nov 28, '05 05:05:18PM

The file you should be looking for in Tiger with HP software installed is loginwindow.plist in /Library/Preferences folder.



[ Reply to This | # ]
Create a list of startup items' paths
Authored by: azraq27 on Nov 28, '05 02:22:44PM

Yeah, I hate HP.

My temporary solution was to delete a program that was named something like "Dock Starter" (something pretty obvious). It's hidden inside some package somewhere in the Director directory. Deleting it didn't seem to affect anything besides HP adding itself to the dock.

I can't give you the details now, because I have implemented my permanent solution: Buy a Brother scanner. I got a Brother MFC-5440CN at OfficeDepot on clearance and I love it! Works much smoother than my old HP, and the software is totally behind-the-scenes. I scan something in, and it pops up in Preview.



[ Reply to This | # ]
Create a list of startup items' paths
Authored by: skapplin on Nov 28, '05 08:32:35AM

There's an excellent freeware preference pane called Diablotin that provides an Extension Manager type of interface for managing numerous add-on items for OS X including preference panes, CMMs, login items, startup items, etc.

Another similar shareware utility is called Alfred, and it adds even more management features than Diablotin.

You can find both at www.versiontracker.com or www.macupdate.com



[ Reply to This | # ]
Create a list of login (startup) items' paths
Authored by: boredzo on Nov 28, '05 02:50:11PM

when searching for a plain string (rather than a regular expression), you should use fgrep instead of grep ('f' standing for 'fixed string'). fgrep, or grep -F, does none of the regular-expression magic that grep does, making it slightly faster and sometimes eliminating the need to escape things (like if you want to search for '[fooString length]' in some source code).



[ Reply to This | # ]
grep vs. fgrep
Authored by: MJCube on Nov 30, '05 08:01:54AM
Excellent advice, although grep is so blazingly fast that the time saved on typically tiny search operations like these is probably less than the time it takes to type the letter f!

[ Reply to This | # ]
Create a list of login (startup) items' paths
Authored by: robJ on Nov 28, '05 03:12:29PM
Here's a simple AppleScript script that will also generate a text file (login_items.txt) on the desktop.
 set paths_ to ""
 tell application "System Events"
  set loi to properties of login items
  repeat with i in loi
   set paths_ to paths_ & ("Path = " & (quoted form of path of i) & return)
  end repeat
 end tell

 write_to_file(paths_, (path to desktop as text) & "login_items.txt", false)

 to write_to_file(this_data, target_file, append_data)
  try
   set the target_file to the target_file as text
   set the open_target_file to ¬
    open for access file target_file with write permission
   if append_data is false then ¬
    set eof of the open_target_file to 0
   write this_data to the open_target_file starting at eof
   close access the open_target_file
   return true
  on error
   try
    close access file target_file
   end try
   return false
  end try
 end write_to_file


[ Reply to This | # ]
Create a list of login (startup) items' paths
Authored by: efge on Nov 28, '05 05:34:37PM

Yeah and here's a one-line shell script that does the same thing:

#!/bin/sh
defaults read loginwindow | fgrep 'Path =' | sed -E 's/.*"(.*)".*/\1/' > ~/Desktop/login_items.txt

(assuming this forum doesn't bork the backslash before the 1 -- stupid forum code)



[ Reply to This | # ]