Login Item MCX [Solved]

jarednichols
Honored Contributor

Ok I've solved it. I finally figured out the command to add in an MCX to add the GrowlHelperApp as a login item with the equivalent of "always." Ready for this? It's hot (and super long – I needed a 30" display to see it all on one line):

dscl . -mcxset /Computers/localhost loginwindow AutoLaunchedApplicationDictionary-managed always '( { Hide = 0; Path = "/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app"; }, "Path = "/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app"" )'

Afterwards, an mcxquery produces:

loginwindow AutoLaunchedApplicationDictionary-managed localhost (Computer), ja20766 (User) always ( { Hide = 0; Path = "/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app"; }, "Path = "/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app"" )

And just like that, wham-o GrowlHelperApp is in the login items list and is unremovable. So, I'm just going to tag this in the advanced tab to run as part of the policy to deploy Growl for our notification system as Growl starts itself automatically after install.

Hotness. My command-line hyjinx & shenanigans lives on for another day…

j
--
Jared F. Nichols
Desktop Engineer, Client Services
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436

1 REPLY 1

bse_college
New Contributor III

Modified this to suit the PaperCut Client to run for any logged in user:

dscl . -mcxset /Computers/localhost loginwindow AutoLaunchedApplicationDictionary-managed always '( { Hide = 0; Path = “/Applications/PCClient.app"; }, "Path = "/Applications/PCClient.app"" )'

Credit to Matthew Stosic that corrected the Syntax errors.