image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old January 7th, 2004, 07:29 AM
3co 3co is offline
Registered User
 
Join Date: Jan 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
3co is on a distinguished road
launch applications as a specified user

I want to launch an application from the terminal as another user without lefting the session. I try "login", "su" , "sudo" before the "open" command but each time I get this error message :

kCGErrorIllegalArgument : initCGDisplayState: cannot map display interlocks.
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
INIT_Processeses(), could not establish the default connection to the WindowServer.Abort trap

What's going on ?
thanks
Reply With Quote
  #2  
Old January 7th, 2004, 11:30 AM
btoneill's Avatar
keeper of the cheese
 
Join Date: Jul 2002
Location: Minneapolis, MN
Posts: 797
Thanks: 0
Thanked 0 Times in 0 Posts
btoneill is on a distinguished road
You're running into something called security

Picture this: You're playing on your computer, a software update window opens up on your desktop. You say "yes, I want to install". You put in your password, the application suddenly quits. You then open up software update yourself, and do it over again? Did software update crash? No, what really poped up was an application someone wrote that looked like software update, and it just got your password. Now, someone who had ssh'd into your computer (or, maybe lap computer at school, etc.) has your password, and you don't even know it, because you just thought software update crashed.

Or...

Picture this: someone tries to run the app as above, but is not allowed to display it to the desktop because they are not logged in to the desktop, they have to be logged in as you to do so.

Which do you want?

Brian
__________________
UNIX is simple and coherent, but it takes a true genius (or a programmer at any rate) to understand and appreciate its simplicity -- Dennis Ritchie
Reply With Quote
  #3  
Old January 7th, 2004, 01:30 PM
3co 3co is offline
Registered User
 
Join Date: Jan 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
3co is on a distinguished road
You know, i didn't plane to hack myself.

I am a poor (french) physicist who just wants to run a software (matlab ) wich needs to be launch from a session with NO admistrator privilege from it's current session wich has the administrator privilege.

If I understand your point, there is no solution, exept an upgrading to MacOs10.3 where the session manager allows a quick change between the different session

thanks
by the way, is it possible with 1O.3 to use virtual desktop, as in all Linux distribution ?
Reply With Quote
  #4  
Old January 7th, 2004, 02:24 PM
btoneill's Avatar
keeper of the cheese
 
Join Date: Jul 2002
Location: Minneapolis, MN
Posts: 797
Thanks: 0
Thanked 0 Times in 0 Posts
btoneill is on a distinguished road
There is no virtual desktop built into 10.3. Virtual desktops are handled by the window manager, not linux itself, you're just used to having window managers that support them, there are window managers on linux that do not support them. You can purchase a virtual desktop package for OS X called Virtual Desktops from CodeTek (http://www.codetek.com). It works in 10.2 and 10.3 (Not sure if 10.1 support is still there, but it used to exist), it's around $30 US.

Brian
__________________
UNIX is simple and coherent, but it takes a true genius (or a programmer at any rate) to understand and appreciate its simplicity -- Dennis Ritchie
Reply With Quote
  #5  
Old January 9th, 2004, 12:19 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montréal
Posts: 2,174
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
Salut 3co. I am slightly familiar with matlab; why do you need to launch it from a session without admin privileges?

As long as you disbale password caching in the keychain manager you'll be prompted for an administrator login every time (presumably, a student) tries to edit any system settings, even if they're logged IN as an administrator.

Or are you worried about the shell?

PS You're launching matlab from the terminal, is this an application with an X11 interface? If so there's a workaround.

What is your situation? Are you in a lab with many people using it? Are you the only user? If so, why are you worried about admin privs.

(Envoyez moi un message privé si vous voulez, nous pourrons l'en disucter...)
__________________
michaelsanford.comBlogTwitterTumblrLinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #6  
Old January 14th, 2004, 01:10 PM
3co 3co is offline
Registered User
 
Join Date: Jan 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
3co is on a distinguished road
the problem was : how to use the administrator privilege

When i get my ibook I just open a session with the administrator rights and used it as the current session :-( . But mathlab works only with a limited rights, so i open another session to use it.
My problem was :I couldn't acces my whole data because one half was from the administrator session and the other half from the "normal rights" session.
The solution was simply to move all my data to the normal session, with the chown -R command and respect the "never use the root/administrator account for current operation"
Well, finaly it was just a bad habits of MacOs9 user ! (I'am affraid there is plenty).
Maybe there should some kind of "how to administrate" MacOSX, written for people who do not know nothing about The UNIX way of computer ?

Thank you guys for help ;-)
Reply With Quote
  #7  
Old January 21st, 2004, 09:29 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montréal
Posts: 2,174
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
3co, the rule you know is slightly different: "never use root for normal operation", you can use an administrator account as much as you want, just make sure you don't cache the admin paraphrase (in the keychain option), ever.

Glad you fixed it, and that's a totally valid solution (along what I was going to suggest actually).
__________________
michaelsanford.comBlogTwitterTumblrLinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 08:37 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.