Skip to main content
Question

Auto launcing an application for all users

  • June 6, 2011
  • 3 replies
  • 16 views

Eyoung
Forum|alt.badge.img+10

I ran across a neat little app via AFP548 for monitoring disk quotas for OD users.

the app works like a charm, but I am having issues with getting it to launch at login. I packaged up the app with a custom LaunchAgent plist... unfortunately my xml authoring is weak at best, so the app never launches. Anyone know of either an alternative casper way to make an app auto launch or see the glaring error in my plist below?

thanks.

{ Label = "org.thayer.QuotaMonitorMenu"; LaunchOnlyOnce = YES; ProgramArguments = ( open, "/Applications/QuotaMonitorMenu.app", ); RunAtLoad = YES; ServiceDescription = QuotaMonitorMenu;
}

------------------------------------------------
Man is the only animal that can remain on friendly terms with the victims he intends to eat until he eats them. - Samuel Butler

Eric Young
eyoung at thayer.org

3 replies

  • June 6, 2011

I don't think launchd is designed to work with the "open" command. Try this instead:

ProgramArguments = ( "/Applications/QuotaMonitorMenu.app/Contents/MacOS/QuotaMonitorMenu",
);

Better yet, make it a login item that applies to all users. I posted a script awhile back that'll let you do that. Let me know if you want me to post it again.


  • June 6, 2011

I don't think launchd is designed to work with the "open" command. Try this instead:

ProgramArguments = ( "/Applications/QuotaMonitorMenu.app/Contents/MacOS/QuotaMonitorMenu",
);

Better yet, make it a login item that applies to all users. I posted a script awhile back that'll let you do that. Let me know if you want me to post it again.


Forum|alt.badge.img+31
  • Honored Contributor
  • June 6, 2011

Try the open command and deploy as a user agent in the user's ~/Library/LaunchAgents

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.startupapp.mycompany</string> <key>ProgramArguments</key> <array> <string>open -a QuotaMonitorMenu</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>