|
|
Remotely starting a VNC connection
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2002
Location: NYC
Status:
Offline
|
|
Here's my situation, hopefully one of you can help. I have a Mac Pro 2.66 that will no longer output video from any of the cards/slots. I've tested my display on another computer, so I know that's not the problem. Running 10.5.1. Seems to boot fine.
I can mount my Mac Pro's boot drive on my MacBook Pro by starting in FireWire Target mode. I'm pretty sure I don't have login access to the Mac Pro over the network. I think I turned it off. Can anyone think of a way to start the VNC server by editing or writing a file to the mounted boot drive? Or any other method? I'm open to all suggestions...
Thanks!
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Jan 2001
Location: Polwaristan
Status:
Offline
|
|
Not sure I understand your question...
You want the Mac Pro to always be available for a VNC connection from another Mac, but can't enable it because of your video issues?
Try this: boot your MBP from your MP's drive. To do this, put your MP drive in firewire target disk mode (like you did before), then reboot your MBP. At startup (the chime), hold down option. You should get a list of two OS X-ready drives: your usual MBP install, and the one on your MP drive. Choose the MP drive. This will boot OS X using the MP drive as if you were sitting at the MP. Make your remote login/VNC changes, then shut down. When you start up the Mac Pro again (not connected to your MBP this time), it should still have all the VNC/remote login changes you made.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
There is a way to startup the VNC server over SSH too. Let me know if you still want these instructions.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Nov 2002
Location: More Cowbell...
Status:
Offline
|
|
Originally Posted by besson3c
There is a way to startup the VNC server over SSH too. Let me know if you still want these instructions.
I'd love to see them. The other day I got home and suddenly wished I had turned the VNC server on my Mac Pro at work on. Was SOL, and couldn't find any way to turn it on via ssh on google.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by MarkLT1
I'd love to see them. The other day I got home and suddenly wished I had turned the VNC server on my Mac Pro at work on. Was SOL, and couldn't find any way to turn it on via ssh on google.
Well, either you can download, compile, and install tightvnc and start it up via the command line by typing "vncserver", or else you can download OSXVnc, cd into the package (cd OSXVnc.app), and do the following:
A: To startup OSXvnc from command line, go inside the Application directory(OSXvnc.app) and launch the OSXvnc-server process. To change parameters you will need to give it arguments (-rfbport to set port, -vncauth to specify a password file, etc). For usage run the command with -help. For example:
/Applications/OSXvnc.app/osxvnc-server -rfbport 5901
If you want to fork this into the background so that you can close your terminal session, add a "&" to the end of this. If you want to connect to this via ARD, change the port to 5900:
/Applications/OSXvnc.app/osxvnc-server -rfbport 5900 &
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2002
Location: NYC
Status:
Offline
|
|
This worked perfectly. If you're ever in New York City, I owe you a beer. Thanks a million.
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Jan 2001
Location: Polwaristan
Status:
Offline
|
|
Originally Posted by Kikaida
This worked perfectly. If you're ever in New York City, I owe you a beer. Thanks a million.
Which solution did you try, mine or besson's?
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2002
Location: NYC
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Nov 2002
Location: More Cowbell...
Status:
Offline
|
|
Originally Posted by besson3c
Well, either you can download, compile, and install tightvnc and start it up via the command line by typing "vncserver", or else you can download OSXVnc, cd into the package (cd OSXVnc.app), and do the following:
If you want to fork this into the background so that you can close your terminal session, add a "&" to the end of this. If you want to connect to this via ARD, change the port to 5900:
Do you know if there is a way to start up the Apple supplied VNC server from the command line?
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
Originally Posted by MarkLT1
Do you know if there is a way to start up the Apple supplied VNC server from the command line?
Yeah, with VNC now being built into the system, it would be silly if we had to download some third party implementation just to remotely enable it.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
I don't see a way to startup Apple's VNC - no launchd control, the binaries that run when you startup VNC in the GUI don't seem to be daemons that can be started up in the command line, this looks like proprietary Apple voodoo.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
pity... there should be some way of turning "screen sharing" (as they call it) on and off, using "defaults write" or some such. Never mind.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
Ah, look at that... it can be done.
The method documented at the above link is very dodgy, but it works (apparently). It implies that it should be possible to do it using "defaults write" commands if you know exactly what arguments to send. Hopefully somebody will be able to work out how to do it that way (would be a much more 'correct' way).
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Wow, dodgy is an understatement... Sounds like it would be much better to keep a copy of OSXVnc around so that you can start that up on port 5901, and use that to start up Screen Sharing on port 5900 (its default) for when/if unique Screen Sharing features are necessary...
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by Brass
Yeah, with VNC now being built into the system, it would be silly if we had to download some third party implementation just to remotely enable it.
Indeed. Fortunately no third-party utilities are needed at all. It's very simple. Just log onto a rmeote Mac through shh and do
To turn VNC on
• sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate
• sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes
• sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvncpw -vncpw abc (where "abc" is the password you want to use)
To turn VNC off
• sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy no
• sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate
There's a ton of options and you can set up users, passwords, etc. all through the CLI. For more information try:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -help
A good approach is to right a little shell script that does the stuff you need and save it with proper permissions. When you need to configure VNC remotely, you just copy your script to a remote machine and run it there. It's as simple as that.
|
•
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Good find Simon! I didn't notice that little Perl kickstart script for some reason...
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Yeah, it's really very handy. I use it all the time. I see no reason to leave more than ssh on when I can turn stuff on and off when it's needed.
|
•
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|