how to find out the user login name?

Joined
Dec 13, 2006
Messages
13
Reaction score
0
Points
1
Hi All,

I m using qt On my MAC Intel.
I want the detail of the user login through programming that is want to know looged user name and permissions.
Actually I want that the user login as root should be able to run the application other user will not able to do that.

I also want some system information like OS Information and System type whether it is power pc or Intel through programming.

If some one knows how I can do that then plz help me out.

Thanks.
 
Joined
Dec 28, 2003
Messages
911
Reaction score
13
Points
18
Location
Long Island, NY
Your Mac's Specs
15" MacBook Pro & 23" ACD
NSString *shortname = NSUserName();
NSString *fullUsername = NSFullUserName();

You'll have to do a bit of research for the permission and architecture stuff --- need a bit of context before I help you there.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top