Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-01

Mac OS X - registering login item - to start my application after user's login

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Fred Flinestone

Hello all,

I am trying to execute this from my code to assure autostart of my application, but nothing happens and the item is not added.

ExecuteProcess('/usr/bin/defaults', 'write loginwindow AutoLaunchedApplicationDictionary -array-add
''<dict><key>Hide</key><false/><key>Path</key><string>/Applications/MyApp.app</string></dict>''');

The command is definitely correct, because from terminal does its job. There must be something changed during execution.

Or do you have better idea how to register login item in different way?

Thanks.

ff

Reply by email