remote control with local display

Rick Stevens rstevens at vitalstream.com
Thu Mar 10 18:09:43 UTC 2005


Ted Potter wrote:
> On Wed, 2005-03-09 at 15:39, Rick Stevens wrote:
> 
>>You can also set up X on that machine to include the vncserver module.
>>Then, if you vncviewer it, both users see what's going on.  Make sure
>>you have the /usr/X11R6/modules/extensions/vnc.so module, then edit
>>the /etc/X11/XF86Config and add this line:
>>
>>	Load  "vnc"
>>
>>to the 'Section "Module"' part and add:
>>
>>	Option      "passwordFile" "/root/.vnc/passwd"
>>
>>to the 'Section "Screen"' part (the path must be to the vnc password
>>file of some user).  Samples:
>>
>>	Section "Module"
>>	        Load  "dbe"
>>	        Load  "extmod"
>>	        Load  "fbdevhw"
>>	        Load  "glx"
>>	        Load  "record"
>>	        Load  "freetype"
>>	        Load  "type1"
>>	        Load  "dri"
>>	        Load  "vnc" <<<---!
>>	EndSection
>>	-
>>	-
>>	-
>>	Section "Screen"
>>	        Identifier "Screen0"
>>	        Device     "Videocard0"
>>	        Monitor    "Monitor0"
>>	        DefaultDepth     24
>>	        Option      "passwordFile" "/root/.vnc/passwd" <<<---!
>>	        SubSection "Display"
>>	                Depth     24
>>	                Modes    "1280x1024" "1152x864" "1024x768"
>>			 "800x600" "640x480"
>>	        EndSubSection
>>	EndSection
>>
>>
>>Restart the X server (log out and back in, or give it the old
>>"CTRL-ALT-BACKSPACE") and the main display will now be accessible via
>>both the local screen and vncviewer.  Both are active, too (both local
>>and remote can move the cursor, enter data, run programs, etc.)  Note
>>that the local display may be just a bit slower on refreshes when a
>>remote user is also attached.  It should be pretty normal if no one is
>>"vncviewering" the display.
> 
> 
> and voila ! it works. My RH9 did not have the vnc.so file so
> I got it from:
> http://xf4vnc.sourceforge.net/
> 
> which also includes a modified XF86Config file. My only misunderstanding
> was running the client - use 0 for the display ie
> 
> vncclient 192.168.123.5:0

By default, ":0" is assumed.  I suggest you simply use "vncviewer 
192.168.123.5".  The nice thing about this is also that you can firewall
the heck out of that machine, but leave ssh open (port 22).  Then:

	vncviewer -via 192.168.123.5 192.168.123.5

will tunnel the vnc session over ssh.  The IP address after "-via" is
used as a gateway.  This isn't really an issue for you since you're on a
private network, but for anyone out there where their machine is on the
Internet and they want to do a similar thing, tunneling X over ssh is a
"good thing".  I do it all the time.  Most of my machines deny any
outside access except for ssh.  This lets me "remote control" the whole
thing.  Note that a ssh-tunneled X session is slower, but it's secure.

> Thank you Rick, as well as to the others who responded. Oh goodie now I 
> can sit and munch donuts, no more driving around town to fix things.

Cool!  Glad to help.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-     "Daddy, why doesn't this magnet pick up this floppy disk?"     -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list