Ask a Question related to Mac Programming, Design and Development.
-
Jorge #1
Starting a Carbon application at user login
Hello,
I have recently written some post about how to run daemons in Mac OS
X. I have a Carbon application (using CarbonLib) which tracks
application usage and writes the information to log files. As Eric
Albert told me in a recent post (thank you again Eric), this
application cannot be a daemon because it connects to the window
server ...
Well, I found information in apple website to create a login script
(LoginHook), this is at:
[url]http://developer.apple.com/documentation/MacOSX/Conceptual/SystemOverview/BootingLogin/chapter_4_section_4.html[/url]
I have tried this and finally I was able to create a small script
which launches my Carbon application at user login, and everything
works fine. Now, my question is how can I create an installation
process to install my application? The installation process includes
to login as root, to create folders, to copy files, to modify the
/etc/ttys file, to assign permissions and other steps ...
Any suggestions to install my app? ...
Thanks in advance!
Jorge Guest
-
user and admin login on same login page
Hello, I have a user login page which also doubles as my administrator login. Currently, my method of logging in doesnt seem to be working... -
Help with starting XFce4 from KDM login
I'm trying to get XFce4 working a bit better under the current release of Knoppix, and want to get it going in Debian Woody as well. Problem: I... -
Concept behind ASP.NET user LOGIN application?
im migrating from asp to asp.net. im a bit confused about form authentication in ASP.NET ... in ASP if I wanted to create a login application I... -
Starting a new thread in ASP.NET application
Hello, Some pages in ASP.NET application perform very process-intensive tasks (parsing large flat files, saving data to SQL Server, etc.. ) Some... -
how to write carbon application
hai all I would like to write carbon application on Mac 9.0 . Let me know which software are to be installed on Mac . Where do I get sample... -
Miro Jurisic #2
Re: Starting a Carbon application at user login
In article <4beb34a4.0309191156.24534c00@posting.google.com >,
[email]rgasparini29@yahoo.com[/email] (Jorge) wrote:
That's all wrong. Just add your application to user's login items, after asking> I have tried this and finally I was able to create a small script
> which launches my Carbon application at user login, and everything
> works fine.
the user for permission. You can do so using a simple AppleScript, which I have
previously posted here and don't feel like looking up since you can find it on
groups.google.com
hth
meeroh
--
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Miro Jurisic Guest
-
Eric Albert #3
Re: Starting a Carbon application at user login
In article <4beb34a4.0309191156.24534c00@posting.google.com >,
[email]rgasparini29@yahoo.com[/email] (Jorge) wrote:
Wow...I can't believe that's documented. Please don't do that. It's> Well, I found information in apple website to create a login script
> (LoginHook), this is at:
>
> [url]http://developer.apple.com/documentation/MacOSX/Conceptual/SystemOverview/Boot[/url]
> ingLogin/chapter_4_section_4.html
really not the right way to do what you're trying. Just modify your app
to link against CoreServices instead of Carbon and make it a startup
item, or keep it linking against Carbon and put it in every user's login
items.
-Eric
--
Eric Albert [email]ejalbert@stanford.edu[/email]
[url]http://rescomp.stanford.edu/~ejalbert/[/url]
Eric Albert Guest
-
Sean McBride #4
Re: Starting a Carbon application at user login
In article <ejalbert-F59808.00105920092003@news.stanford.edu>,
Eric Albert <ejalbert@stanford.edu> wrote:
Am I the only one that wishes there was a ~/Library/LoginItems that>> > Well, I found information in apple website to create a login script
> > (LoginHook), this is at:
> >
> > [url]http://developer.apple.com/documentation/MacOSX/Conceptual/SystemOverview/Bo[/url]
> > ot
> > ingLogin/chapter_4_section_4.html
> Wow...I can't believe that's documented. Please don't do that.
could contain aliases of items to run at login? Like the OS 9 startup
items folder.
Sean McBride Guest
-
Miro Jurisic #5
Re: Starting a Carbon application at user login
In article <cwatson-E8CF1E.13301921092003@aeinews.aei.ca>,
Sean McBride <cwatson@cam.org> wrote:
No, but AppleScripting this is easy enough too.> Am I the only one that wishes there was a ~/Library/LoginItems that
> could contain aliases of items to run at login? Like the OS 9 startup
> items folder.
meeroh
--
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Miro Jurisic Guest
-
Eric Albert #6
Re: Starting a Carbon application at user login
In article <cwatson-E8CF1E.13301921092003@aeinews.aei.ca>,
Sean McBride <cwatson@cam.org> wrote:
No, you're not the only one who thinks that. :) That's orthogonal to> In article <ejalbert-F59808.00105920092003@news.stanford.edu>,
> Eric Albert <ejalbert@stanford.edu> wrote:
>>> >> > > Well, I found information in apple website to create a login script
> > > (LoginHook), this is at:
> > >
> > > [url]http://developer.apple.com/documentation/MacOSX/Conceptual/SystemOverview/[/url]
> > > BootingLogin/chapter_4_section_4.html
> > Wow...I can't believe that's documented. Please don't do that.
> Am I the only one that wishes there was a ~/Library/LoginItems that
> could contain aliases of items to run at login? Like the OS 9 startup
> items folder.
this thread, though, since login hooks aren't how login items work.
-Eric
--
Eric Albert [email]ejalbert@stanford.edu[/email]
[url]http://rescomp.stanford.edu/~ejalbert/[/url]
Eric Albert Guest
-
James W. Walker #7
Re: Starting a Carbon application at user login
In article <macdev-9B9464.13585821092003@senator-bedfellow.mit.edu>,
Miro Jurisic <macdev@meeroh.org> wrote:
As far as I know, the AppleScript approach was not documented and will> No, but AppleScripting this is easy enough too.
not work under Panther. As for Jaguar, I ran into a case where the
script didn't work. The case in which it doesn't work is if you have
previously used System Events to set a login item, and System Events is
still running. Then there is no error message, but the new item just
doesn't show up in the Login Items preference panel.
James W. Walker Guest
-
Jim Correia #8
Re: Starting a Carbon application at user login
In article <macdev-9B9464.13585821092003@senator-bedfellow.mit.edu>,
Miro Jurisic <macdev@meeroh.org> wrote:
FWIW, Apple doesn't recommend that approach because of current bugs.> In article <cwatson-E8CF1E.13301921092003@aeinews.aei.ca>,
> Sean McBride <cwatson@cam.org> wrote:
>>> > Am I the only one that wishes there was a ~/Library/LoginItems that
> > could contain aliases of items to run at login? Like the OS 9 startup
> > items folder.
> No, but AppleScripting this is easy enough too.
<[url]http://lists.apple.com/archives/cocoa-dev/2003/Sep/20/loginitems.002.txt[/url]Jim>
Jim Correia Guest
-
Eric Albert #9
Re: Starting a Carbon application at user login
In article <210920031117073337%osxNOSPAM@jwwalker.com.invalid >,
"James W. Walker" <osxNOSPAM@jwwalker.com.invalid> wrote:
Why not? I'd expect a login item that's an AppleScript application that> In article <macdev-9B9464.13585821092003@senator-bedfellow.mit.edu>,
> Miro Jurisic <macdev@meeroh.org> wrote:
>>> > No, but AppleScripting this is easy enough too.
> As far as I know, the AppleScript approach was not documented and will
> not work under Panther.
opens everything in ~/Library/LoginItems to work just fine without extra
documentation and without regard to OS changes. If it doesn't, that
sounds like an important bug....
-Eric
--
Eric Albert [email]ejalbert@stanford.edu[/email]
[url]http://rescomp.stanford.edu/~ejalbert/[/url]
Eric Albert Guest
-
James W. Walker #10
Re: Starting a Carbon application at user login
In article <ejalbert-9D409B.15012721092003@news.stanford.edu>, Eric
Albert <ejalbert@stanford.edu> wrote:
No, I believe that Miro Jurisic was referring to a technique of> In article <210920031117073337%osxNOSPAM@jwwalker.com.invalid >,
> "James W. Walker" <osxNOSPAM@jwwalker.com.invalid> wrote:
>>> > In article <macdev-9B9464.13585821092003@senator-bedfellow.mit.edu>,
> > Miro Jurisic <macdev@meeroh.org> wrote:
> >> >> > > No, but AppleScripting this is easy enough too.
> > As far as I know, the AppleScript approach was not documented and will
> > not work under Panther.
> Why not? I'd expect a login item that's an AppleScript application that
> opens everything in ~/Library/LoginItems to work just fine without extra
> documentation and without regard to OS changes. If it doesn't, that
> sounds like an important bug....
defining a login item that involves using AppleScript to talk to the
System Events application. But I could be mistaken.
James W. Walker Guest
-
Miro Jurisic #11
Re: Starting a Carbon application at user login
In article <210920031823530134%osxNOSPAM@jwwalker.com.invalid >,
"James W. Walker" <osxNOSPAM@jwwalker.com.invalid> wrote:
You are right. Thanks for the heads-up for Panther.> In article <ejalbert-9D409B.15012721092003@news.stanford.edu>, Eric
> Albert <ejalbert@stanford.edu> wrote:
>>> > In article <210920031117073337%osxNOSPAM@jwwalker.com.invalid >,
> > "James W. Walker" <osxNOSPAM@jwwalker.com.invalid> wrote:
> >> >> > > In article <macdev-9B9464.13585821092003@senator-bedfellow.mit.edu>,
> > > Miro Jurisic <macdev@meeroh.org> wrote:
> > >
> > > > No, but AppleScripting this is easy enough too.
> > >
> > > As far as I know, the AppleScript approach was not documented and will
> > > not work under Panther.
> > Why not? I'd expect a login item that's an AppleScript application that
> > opens everything in ~/Library/LoginItems to work just fine without extra
> > documentation and without regard to OS changes. If it doesn't, that
> > sounds like an important bug....
> No, I believe that Miro Jurisic was referring to a technique of
> defining a login item that involves using AppleScript to talk to the
> System Events application. But I could be mistaken.
meeroh
--
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Miro Jurisic Guest
-
James W. Walker #12
Re: Starting a Carbon application at user login
In article <macdev-CFDF11.21384221092003@senator-bedfellow.mit.edu>,
Miro Jurisic <macdev@meeroh.org> wrote:
Actually, looks like I was wrong. Maybe it wasn't in some earlier> You are right. Thanks for the heads-up for Panther.
version of Panther, but it's there now.
James W. Walker Guest
-
Jorge #13
Re: Starting a Carbon application at user login
Thanks to everybody, I'm sorry for the late reply.
Eric, I think you are right, this is not the best approach.
I can't use the Login Items option, because this application will run
in several machines and I can't to install it for each user. Besides,
I can't ask for user permission because the app must to run silently.
Remember that it is a tracking app.
I think I should to consider the CoreServices option. I have just one
doubt, can I catch events when an application brings to front with the
CoreServices framework? Because I'm now using CarbonEvents and
installing the event handlers with the "InstallEventHandler" option
and it is not available with CoreServices.
Regards ...!
Eric Albert <ejalbert@stanford.edu> wrote in message news:<ejalbert-F59808.00105920092003@news.stanford.edu>...> In article <4beb34a4.0309191156.24534c00@posting.google.com >,
> [email]rgasparini29@yahoo.com[/email] (Jorge) wrote:
>>> > Well, I found information in apple website to create a login script
> > (LoginHook), this is at:
> >
> > [url]http://developer.apple.com/documentation/MacOSX/Conceptual/SystemOverview/Boot[/url]
> > ingLogin/chapter_4_section_4.html
> Wow...I can't believe that's documented. Please don't do that. It's
> really not the right way to do what you're trying. Just modify your app
> to link against CoreServices instead of Carbon and make it a startup
> item, or keep it linking against Carbon and put it in every user's login
> items.
>
> -EricJorge Guest



Reply With Quote

