• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask Question


  • Subject: Re: NSTask Question
  • From: "John Cebasek" <email@hidden>
  • Date: Tue, 5 Jul 2005 10:37:13 -0400

Hi All:

Well, I was looking in the wrong log for any error messages, and now that I
opened *the correct one*, I see entries like:

Unable to fast user switch: User must be the current console user or root.

I know who the current console user is, but that means the environment is is
bogus? How do I set a correct environment?

John
----- Original Message -----
From: "John Cebasek" <email@hidden>
To: "Cocoa Dev" <email@hidden>
Sent: Tuesday, July 05, 2005 9:46 AM
Subject: NSTask Question


Hi All:

I'm simulating the "Switch Users..." option in the wake from sleep dialog.
On Panther, my code:

[NSTask launchedTaskWithLaunchPath:CGSESSIONPATH
                            arguments:[NSArray
arrayWithObject:@"-suspend"]];

(where CGSESSIONPATH is :@"/System/Library/CoreServices/Menu
Extras/User.menu/Contents/Resources/CGSession")

works as expected. On Tiger, it appears to execute, but doesn't do the
switch; that is go to the login window.

It's not a privileged operation as if you type in the command in the
terminal, you don't have to be root.

So, how do I find out:

1- What went wrong. Maybe there be a hint on how to fix it.

2 - Get it to work?

Thanks in advance


John Cebasek
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSTask Question (From: "John Cebasek" <email@hidden>)

  • Prev by Date: Re: iMovie-like sliding ready for drag
  • Next by Date: Core Video for Asynchronous Frame Grabbing
  • Previous by thread: NSTask Question
  • Next by thread: Re: Changing startup disk (was: Re: Changing startup desk[sic])
  • Index(es):
    • Date
    • Thread