From: Paul Nevai on
SOS

I am at home and I can ssh into my mac at work. I want to reboot the mac at
work BUT BUT BUT I want the mac to bypass the login window when rebooting so
that it would immediately go to my account.

If I were sitting in front of my Mac at work, I could easily do it. However,
I am at a different location.

Can you please tell me how I can do it using the command line?

Clearly, I need to edit some system prefs. I have no idea what.

Thanks, PaulN
From: Dave Balderstone on
In article <ek9ueh$8rq$1(a)pascal.math.ohio-state.edu>, Paul Nevai
<2me(a)PaulComputing.com> wrote:

> SOS
>
> I am at home and I can ssh into my mac at work. I want to reboot the mac at
> work BUT BUT BUT I want the mac to bypass the login window when rebooting so
> that it would immediately go to my account.
>
> If I were sitting in front of my Mac at work, I could easily do it. However,
> I am at a different location.
>
> Can you please tell me how I can do it using the command line?
>
> Clearly, I need to edit some system prefs. I have no idea what.

Reboot the Mac (you'll likely need to use "sudo"). Log in again. Then
use "open" to launch what you need.

See "man reboot" and "man open".
From: Warren Oates on
In article <251120061217213376%dave(a)N_O_T_T_H_I_Sbalderstone.ca>,
Dave Balderstone <dave(a)N_O_T_T_H_I_Sbalderstone.ca> wrote:

> Reboot the Mac (you'll likely need to use "sudo"). Log in again. Then
> use "open" to launch what you need.
>
> See "man reboot" and "man open".

I was trying to figure out why he'd need to have a GUI login if he's
accessing the machine via ssh. I guess you're right: he's got some
startup items in his account that he wants to access.
--
W. Oates
Teal'c: He is concealing something.
O'Neil: Like what?
Teal'c: I am unsure, he is concealing it.
From: Paul Nevai on
Warren Oates <warren.oates(a)gmail.com> wrote:
> In article <251120061217213376%dave(a)N_O_T_T_H_I_Sbalderstone.ca>,
> Dave Balderstone <dave(a)N_O_T_T_H_I_Sbalderstone.ca> wrote:

> > Reboot the Mac (you'll likely need to use "sudo"). Log in again. Then
> > use "open" to launch what you need.
> >
> > See "man reboot" and "man open".

> I was trying to figure out why he'd need to have a GUI login if he's
> accessing the machine via ssh. I guess you're right: he's got some
> startup items in his account that he wants to access.

Unfortunately the above advice doesn't work. Yes, I want to run some GUI
applications such as a VNC server. They can't run unless a Window Server is
active.

EXAMPLE. % open Safari.app

kCGErrorRangeCheck : Window Server communications from outside of session
allowed for root and console user only

INIT_Processeses(), could not establish the default connection to the
WindowServer.Abort

I still need help, please. /PaulN
From: Alan Baker on
In article <ek9ueh$8rq$1(a)pascal.math.ohio-state.edu>,
2me(a)PaulComputing.com (Paul Nevai) wrote:

> SOS
>
> I am at home and I can ssh into my mac at work. I want to reboot the mac at
> work BUT BUT BUT I want the mac to bypass the login window when rebooting so
> that it would immediately go to my account.
>
> If I were sitting in front of my Mac at work, I could easily do it. However,
> I am at a different location.
>
> Can you please tell me how I can do it using the command line?
>
> Clearly, I need to edit some system prefs. I have no idea what.
>
> Thanks, PaulN

I'm not sure this will work, but you can give it a try.

Here is the "/Library/Preferences/com.apple.loginwindow.plist" from my
machine (converted to text format with plutil and with my actual user
name replace with "userid"):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>MCXLaunchOnLogout</key>
<true/>
<key>MCXLaunchOnUserLogout</key>
<dict>
<key>cajan</key>
<true/>
</dict>
<key>PicturePathLW</key>

<string>/Library/Caches/com.apple.user501pictureCache.tiff</string>
<key>RetriesUntilHint</key>
<integer>3</integer>
<key>SHOWFULLNAME</key>
<true/>
<key>autoLoginUser</key>
<string>userid</string>
<key>lastUser</key>
<string>loggedIn</string>
<key>lastUserName</key>
<string>userid</string>
<key>lastUserUID</key>
<integer>501</integer>
<key>lightWeightLogin</key>
<false/>
<key>nameLW</key>
<string>Alan Baker</string>
<key>noPasswordKey</key>
<false/>
<key>uid</key>
<integer>501</integer>
</dict>
</plist>

Note the lines:

<key>autoLoginUser</key>
<string>userid</string>

So I suspect that if you check your "com.apple.loginwindow.plist" file,
you'll find that that key is missing or that the string doesn't contain
a user name. Change that and see what happens...

--
'It is Mac OS X, not BSD.' -- 'From Mac OS to BSD Unix.'
"It's BSD Unix with Apple's APIs and GUI on top of it' -- 'nothing but BSD Unix'
(Edwin on Mac OS X)
'[The IBM PC] could boot multiple OS, such as DOS, C/PM, GEM, etc.' --
'I claimed nothing about GEM other than it was available software for the
IBM PC. (Edwin on GEM)
'Solaris is just a marketing rename of Sun OS.' -- 'Sun OS is not included
on the timeline of Solaris because it's a different OS.' (Edwin on Sun)