| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

View
 

VNC

Page history last edited by PBworks 17 years, 7 months ago

(1) Use ssh or ssh2 to whatever machine you'd like a VNC session on, medx, app1, app2, ..., app7.

 

(2) In the remote login shell, check whether you already have a VNC server on the machine. Go into the .vnc directory and list the contents.

 

cd .vnc

ls

 

If you see any files that end in .pid, they indicate that you already have a server running on that machine. For example, the presence of the file app1:1.pid indicates that you already have a server running on app1, and the server is named app1:1. If you already have a server, you do not need to create one; skip step (3) and go to step (4).

 

(3) If you don't have a server already running on the desired machine, create a server by running the command vnc16 on the desired Linux machine (the one you ssh'd to in step 1).

 

vncserver -depth 16

 

I found that colors didn't work properly for me unless I specified "-depth 16". Maybe this will work for you, too.

 

You can specify the VNC server to match the resolution of your PC's display. For example, if your PC's desktop is set to 1280x1024 resolution, you can run the following vcnserver command:

 

vncserver -depth 16 -geometry 1280x1024

 

I have set up an alias for the above command, which you can use if you're in a tcsh shell:

 

vnc16

 

It will report back to you the name of the newly created server, e.g. app1:2.

 

(4) On your PC, invoke the VNC viewer/client, and type in the name of the server, determined in step 2 (if you're using a pre-existing server) or step 3 (if you're using a newly created server). Log in using your Linux password.

 

(5) If you ever need to kill a VNC server, run the vncserver command with the -kill option. For example, if you want to kill the VNC server app3:2, ssh to app3 and run the following command:

 

vncserver -kill app3:2

 

Sometimes VNC servers go "bad" and stop working properly if you leave them up for longer than a day or two. In that case, just kill the VNC server, and create a new one (see step 3 above).

Comments (0)

You don't have permission to comment on this page.