in multiuser mac os x have 2 or more active users can have root privilege sudo command on terminal , switch between user sessions with" su - username " command on terminal.i want know how write program using objective c ?
how can have root privilege , change login session current user active user , new user privilege switched session ,and instance executing other program or launching process , consequently when launch process within specific user's session owner of process must user. want know how write program switches active user session , launch process on session .
thanks
you can fast switch user launching process call following:
/system/library/coreservices/menu\ extras/user.menu/contents/resources/cgsession -switchtouserid $userid
once switch, user have launch application. or application needs in startup.
Comments
Post a Comment