Vnc Tunnel User Login Via Terminal, Not Console

dm2243

Registered
This sounds like a convoluted problem, but hopefully an interesting one.

I'm trying to figure out how to change users on a remote server via VNC. The VNC connection and the tunnel are working ok - except for this tiny problem of being unable to change users on the remote server.

Let's call the remote server "remote box" and the machine that i'm connecting from "my box". Sitting in front of my box, I log out of a user on the remote box inside my tunnelled VNC window. But that causes my VNC connection to drop and I can't reconnect. I try quiting my VNC client and running "ssh -Nfn -L 5901:127.0.0.1:5900 myname@rebotebox" again but then i get "channel 2: open failed: connect failed: Connection refused". I try rebooting my local box, but I get the same error. The only way I can reconnect to my remote box is by physically restarting it and having it automatically log in. of course, given that i'm not in front of remote box, restarting it is not an easy thing to do. (I aslo tried fast user switching but no joy.)

I'm running 10.4.2 on both machines and my VNC client is Chicken of the VNC.

TIA
 
How is VNC launched on the remote box?

Sounds like it may be tied in with your login, and thus doesn't run once you log out.
 
thanks kilowatt - i'm running OSXvnc 1.61, which i guess starts on user login and not system startup...so i suppose the solution is a different VNC server, right?
 
Well,

the problem is that most VNC servers are built to support the X Window System, rather than the window server we have in Mac OS X.

I'm not at my mac at the moment, but you should try this:
Log out of the GUI.
Shell into the computer.
Try and manually launch the VNC server from the shell - probably as root.

All at your own risk, of course. My guess is the LoginWindow will prevent other apps from launching, so maybe try modifying the files listed at this link:
http://www.opendarwin.org/en/faq/ch02.html#loginwindow
so that they load more than one thing up.
 
Back
Top