VNC question
Timothy Brown
macports at tbrown.freeshell.org
Tue Jan 9 03:22:32 PST 2007
On Tue, Jan 09, 2007 at 12:59:06AM -0800, belinda thom wrote:
> I'm in a bit of a bind---I need to get desktop access to a machine
> that I don't have physical access to.
Just a couple of questions...
What kind of "desktop access" do you need? As in do you need X11 or
Aqua[0]? I find X11 is simple to setup[1] and use it all the time as I
work mostly on machines with X11 (if they have any windowing systems).
>
> After some googling, I learned about VNCs, and that macports has both
> a server (osxvnc) and a client (cotvnc).
I have never used osxvnc, sorry. However I do have cotvnc
(Chicken of the VNC), it's very simple to use.
>
> I've never used a VNC and am a bit worried that I won't be able to
> set them up.
You have to start the vnc program on the server (osxvnc or any other
vncserver), then it's just a matter of starting your local vnc client
and point it to the server. A side note, what's in between the server
and client network-wise? Same network without any firewalls?
>
> Presumably, the server is the one that "serves up" the desktop, so
> the remote machine would have to run that. I only have access to that
> machine currently via Terminal and ssh.
Yeap. Having only ssh access might be hard if you want to do non-X11
stuff. If it's X11 you don't really need vnc and just X11 forwarding
will work.
> Has anybody done this type of thing before? Any insight/advice welcome.
Was any of this helpful? Or did I just make no sense at all?
I hope I helped...
Timothy
[0] Am I correct in calling the OS X window system Aqua? You know the
Cocoa stuff....
[1] Steps to use X11 remotely:
- On your local machine (machine with the display) start X11
(Under OS X I think this is an additional package fro the developer
CD. I can't really remember, sorry)
- Make sure you are exporting your DISPLAY environment variable,
this is normally along the lines of localhost:0.0. I have the
following in my .profile:
if [[ -z $DISPLAY && -z $SSH_CONNECTION ]]; then
disp_no=($( ps -awx | grep -F X11.app | awk '{print $NF}' \
| grep -e ":[0-9]" ))
if [[ -n $disp_no ]]; then
export DISPLAY=`hostname`${disp_no}.0
else
export DISPLAY=`hostname`0.0
fi
fi
Yes, I am a bit different.... :)
- When connecting to the remote machine (server without the display),
use ssh with X11 Forwarding enabled (`ssh -Y server`). I have the
following in my .ssh/config:
Host *
Compression yes
CompressionLevel 6
ForwardX11 yes
Protocol 2,1
ServerAliveInterval 300
- On the server you should enable X11 Forwarding too. In
/etc/sshd_config:
X11Forwarding yes
Now when you login to a remote machine you should be able run X11
applcations. Did any of that make sense or even address what you were
asking? :)
More information about the macports-users
mailing list