Running aqua from the commandline.

unic@dds.nl

Registered
Does anyone know how to start aqua from the commandline ( without the loginwindow )?

I have came as far as I know how to start the system in commandline mode ( setting verbose mode in open firmware and enable console in ttys ). I know how to reach the aqua environment through the loginwindow ( starting WindowServer and loginwindow as root ). I also have been able to start aqua without the loginwindow but only as root.

What I want is to start aqua in the same way as you usually run startx for X11. That is bring up the windowserver and finder as the current user.

Does anyone have any ideas?
 
That is quite easy. All you have to do is start WindowServer and then the applications you need. Such as:

/System/Library/CoreServices/pbs
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
/System/Library/CoreServices/Dock.app/Contents/MacOS/Dock
/System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer

There might be a better way to find out which applications to start but this works for me.

You can't do this as a normal user. Not even as a wheel user :( All you get is:

kCGErrorIllegalArgument : initCGDisplayState: cannot map display interlocks.
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
kCGErrorInvalidConnection : CGSGetEventPort: Invalid connection

If you run 'ps' before and after the login it seems as if the loginwindow changes the owner of the process WindowServer aswell as the process loginwindow.
 
Okay, but why don't you just start the login window and ... login? If you're trying to accomplish this from a remote location, you could use Apple Remote Desktop instead.
 
Yeah .. well.. Sure that is a way to do it. But then you would have to logon at least twice. First at console and then gui.

The thing is I am not the only one using this computer. And I do not want to distribute my root passwd. I could make the aquascript sudoable.

But it would be much nicer if some people got the gui at login and some got the console.
 
First off all I use X11 a lot more than i use Aqua. Second Agua consumes a lot more power than console/X11. It is very usefull when I'm on the train or any other situation when I do not have a poweroutlet.

Besides that I like the console mode. A computer booting in graphic mode looks like a toy. It feels more hardcore to boot in textmode :)

Ok. I know I'm silly but the point is I can't find a reason why I shouldn't be able to start aqua from the commandline.


Fryke:Why would I want to use Apple Remote Desktop when I can use VNC? VNC is free.
 
You have to do two thing.

First of all you set verbosemode in openfirmware. This can be done both in the firmware directly or from the commandprompt. Try chapter 11 of the following manual http://www.starbsd.org/MacOS-X/macosx-tips.pdf.

Second you need to disable the graphic loginwindow. This is done by disable the following line in '/etc/ttys':
console "/System/Library/CoreServices/loginwindow.app/loginwindow" vt100 on secure window=/System/Library/CoreServices/WindowServer onoption="/usr/libexec/getty std.9600"

and enable this line instead:
console "/usr/libexec/getty std.9600" vt100 on secure

.. I think that is it. Correct me if I am wrong. My memory is not what it used to be :)
 
Back
Top