AMMRL: Re: VNC Viewer setup

From: Fowler, Andrew <andrew-fowler_at_uiowa.edu>
Date: Fri, 2 Dec 2011 20:07:24 +0000

I sent this information to the original poster, but there is a relatively easy way to set up the VNC server. I found most of the first part of this on redhat.com. It works for RHEL 4, and I think it will also work for versions 3 and 5. I've set this up successfully to work with both VNMRJ and Topspin.

What makes this fairly easy is that a VNC server is built into Red Hat's X11. The only "downside" I've found to this server is that there's no trivial way to change it to use a port other than the default (5900). To configure the VNC server:

1. Edit /etc/X11/xorg.conf (or XF86config if you have that instead)

1a. At the end of the “Module” section, add:

            Load “vnc”

The VNC server should now start every time X11 does (i.e. you enter runlevel 5)

            1b. At the very top of the “Screen” section, add the following line:

            Option “passwordFile” “/root/.vnc/passwd”

2. Create the VNC password with the following command:

            vncpasswd /root/.vnc/passwd

You will be prompted for the new password and to confirm. You can say no to the question about a view only password. If you're going to tunnel the VNC connection over SSH (recommended) it doesn't have to be a strong password.

3. Restart the X server. You could reboot or change runlevels, but the easiest way is to make sure you’ve quit any important programs and hit Control-Alt-Backspace.

To connect from a remote computer:

You will need to have a VNC client. For Mac OS X, Chicken of the VNC is a good choice; most recent Linux installs already have program called vncviewer that does the same thing. Under windows I've used TightVNC. All are free and easily found using Google.

1. Most sites prefer to tunnel VNC through an SSH connection for security. Type the following slightly ugly ssh command all on one line (Mac/Linux, feel free to alias this):

     ssh -Y -L 5902:127.0.0.1:5900 {username}_at_{host}

This enables all the necessary port forwarding for the VNC session. Leave this ssh tunnel open until you’re done. If you require SSH on a non-standard port, for example through a firewall, add –p {port}.

For Windows users, you can install OpenSSH (sshwindows.sourceforge.net) and do the same from a command prompt, or you can use PuTTY or another graphical SSH client – after you set up the profile, one of the setting dialogs has options to set up the tunnel.

2. Start the VNC client. You need to connect to localhost (127.0.0.1) on display 2 if you connected as above. Under Linux, type “vncviewer localhost :2”. Enter the VNC password.

3. Depending on the software/OS you're using, you may need to configure a few things. One example would be middle and right mouse buttons from a Mac laptop.

Hope this helps someone,
Andrew

--
C.  Andrew Fowler, Ph.D.          | University of Iowa
Associate Director                | B291 Carver Biomedical Research Building
Medical NMR Facility              | Iowa City, IA 52242
319-384-2937 (office)             | 319-335-7273 (fax)
andrew-fowler_at_uiowa.edu
On 12/1/11 1:14 AM, "Tatiana Agback" <tatiana.agback_at_medivir.com<mailto:tatiana.agback_at_medivir.com>> wrote:
Hi
Would be very nice if somebody can answer for the question  of VNC Viewer setup for all AMMRL members! I have this interest as well.
Tatiana Agback,Ph.D.
Principal Research Scientist NMR
Medivir AB
PO Box 1086, SE-141 22 Huddinge, Sweden
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
Received on Fri Dec 02 2011 - 10:07:32 MST

This archive was generated by hypermail 2.4.0 : Sat Jun 17 2023 - 14:39:13 MST