Re: What happens to the AppKit Framework when an user logout ?
Re: What happens to the AppKit Framework when an user logout ?
- Subject: Re: What happens to the AppKit Framework when an user logout ?
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 17 Oct 2001 12:27:40 +0200
On mercredi, octobre 17, 2001, at 09:39 , Georg Tuparev wrote:
IMHO, what you describe below is the right behavior. Can you imagine
the mess if it was not so? In case no one is logged in, where are all
events going? Who (user) sends them? Have you thought about security
issues?
It seems from the answer I was given by Eric P. that the problem is with
the Window Server. If your Background App has some connections with the
Window server, it will get shot at logout. It's not a big problem.
When it comes to security on Mac OS X...
- The name of the last login user is always displayed in the login
window.
- Any user (without admin privilege) can become root as long as he has
an account on the computer and the root account is enabled.
- And in a minor case, a boot process in root can display an application
in the Login phase thus enabling to access System Preferences with a
root account (let's create an admin account, he)...
If you would like to have service app, well no one stops you. Write a
Tool, and run it all the time. You can still use Foundation framework
for this. But you cannot use AppKit. If you must have UI, well, this is
also easy. Split your service app in server tool and UI client, and
when a user is logged in, let the client talk to the tool...
Wrong, wrong wrong...
The problem is that we want to display some GUI without the user needing
to launch the UI client.
One solution would be to launch the UI tool when the user logins. 2 way
to achieve this:
- add the client to every user Login items (where is the API ?) : Big
problem , the user can remove it from the Login items.
- launch the client when the user login:
* When it's working, the Keyboard is set to the root account keyboard
* It's only working the first time an user logins (that's what I'm
seeing at least but it might be a problem with my code).
Another problematic point: boot process can't send Mach Message to UI
tool. You can use Notification, but Notifications can't be used to find
if a tool is running.
Another problematic point: daemon process can't register for System
Configuration Dynamic Store event.
Not as easy as you thought it was, hum ?
One last solution would be to use the CFUserNotification API, but I'm
pretty sure the API can't produce a GUI as complex as the one I'm using.