[Box-Admins] TightVNC on box4

Ken Causey ken at kencausey.com
Sun Feb 23 17:28:54 UTC 2014


On 02/23/2014 10:12 AM, Chris Cunnington wrote:
> I could not figure how Chris Muller was constantly logged in all the time. Every time I logged in I typed who to see if anybody's around.
> The :1 told me that VNC was likely involved, but I didn't realized it was its own process. I was talking to Ken about using Ian's RFB.
> I recall a conversation about six-eight months about where Levente recommended TightVNC (IIRC). I figure I'll switch to that and we can make it the
> standard for box4. I assume that this single process can have another port such as 5902/:2 added to it?
>
> Chris
>

Yes, with external VNC there is an external process that acts as an X 
client that interfaces to the VNC protocol.

Chris is logged in because, well it is in some sense a full X desktop so 
you can have multiple programs running, and he has a terminal open on 
the VNC he started for his source.squeak.org mirror and he is logged in 
in it.

Using external VNC is only slightly more complicated that RFB.

1. Login and stay in your home directory then

mkdir .vnc

2. Using your favorite text editor add a xstartup file to that 
directory, this is a script that is started after the X client is open 
to start X server programs.  Feel free to copy mine at

/home/ken/.vnc/xstartup

as a starting point.

3. Run

vncpasswd

to set your password

4. Run

vncserver

This will report back to you your port number which you would then 
specify on your local VNC client.  If :1 is in use but not :2 then you 
will get :2, and so on.

Not that in ~/.vnc there are a couple of files created that can be of 
some value.  There is a .pid file that stores the process ID of the 
xtightvncserver process.  More usefully there is a .log file that logs 
any stdout/stderr from the processes.  For example if squeak fails to 
start or crashes you can find useful info there.

Finally, when you are done, run

vncserver -kill :<port number>

To stop the VNC server and all the programs that were started under it. 
  <port number> is of course the number reported when you ran vncserver 
before and what you used to connect beyond of course the hostname.

Hopefully this makes it reasonably clear.

Ken


More information about the Box-Admins mailing list