Remote X sessions or VNC (was:Re: Headless YellowDog)

yellowdog-general at lists.terrasoftsolutions.com yellowdog-general at lists.terrasoftsolutions.com
Mon Oct 11 18:16:52 MDT 2004


On Monday 11 October 2004 13:18, Geert Janssens wrote:
> Back to VNC with another series of questions:
>  >> Next point: I would like to display the VNC session on my YDL box in
>  >> a separate console (or virtual terminal?), like MOL can be run in a
>  >> separate console. I haven't managed that just yet. I only can have a
>  >> window in my existing X session on my YDL box. What magic should be
>  >> performed here ?
>  >
>  > VNC sessions always run their own X session. But your question here
>  > seems to me to ask, "How do you get access to the VNC server's X
>  > session from the console?"
>
> 1. This goes a bit to fast for me. Apparently, I'm quite confused about
> "console" and "virtual terminal". Maybe you can give some clarification
> on this first ?

The "console" is what you are looking at and typing with.  A monitor and 
keyboard and optionally a mouse.  When you use ctrl-alt-Fx (or alt-Fx) you 
are switching between virtual console.  In the context here virtual terminal 
is the same as a virtual console.

> 2. Then the part about VNC sessions and their own X session: my
> experience here seems to contradict this. Let me explain.
> My setup is:
> aragorn: server machine in the basement, with an active KDE session on
> vt7, in this session, I have started a program called x0rfbserver (which
> gets started by the mandrake's menu option "Virtual Network Connection).
> On g3ydl, I have an active KDE session on vt7 in which I start YDL's
> Remote Desktop Connection. The window I get, is the exact screen of the
> system in the basement, and when I move the mouse, or type something,
> the exact same movements and keys strokes are seen on the screen in the
> basement. So it seems to me the same X session is shared in this case.
> My guess is we're talking about different vnc servers. Is x0rfbserver
> something particular ?

I suspect what KDE is doing is making use of the X VNC module that allows a 
standard X server to also act as a VNC server.

> In any case, this setup is not what I want, since it forces me to first
> start a kde session sitting in front of my aragorn box in the basement,
> starting the Virtual Network Connection menu item, and when this one
> crashes (happens consistently if I dare to use the scroll wheel in the
> vnc client on g3ydl) I have to go to the basement again...

ok.

> 3. So my curiosity goes out to vncserver you are referring to. Is this
> TightVNCserver (the only one I found in my Mandrake setup) ?

Ther are a couple VNCs.  TightVNC is one of them RealVNC is another.  Either 
should be fine.

>  > Well, you can't if you're just using
>  > "vncserver", but if you just start up another X session on the console
>  > that uses the VNC module, you'll be able to do it. Then you'd just VNC
>  > to foomachine:1 instead of foomachine:0.4.
>
> 4. "Another X session that uses the VNC module"... Do you mean then, as
> in your faq, that on the local machine, I type 'X :1' to get a new X
> session on VT8 ? And next, I don't understand about the VNC module part.

The "VNC module" is a reference to making a standard X server also act like a 
VNC server as I mentioned above.  Based on what you said you are looking for 
I think you can saftly ignore that part.

> 5. In the last sentence, how can I tell the vncviewer to use display
> foomachine:1, instead of foomachine:0.4? Is this by starting vncviewer
> on the command line,after having set the DISPLAY variable ?

Depends what you mean by "use".  The viewer always does something with two 
differennt displays.  One being the VNC server to talk to and that is 
specified on the vncviewer command line.  e.g. ":1".  The other is the 
display vncviewer uses to display its own window.  That is usually specified 
via the DISPLAY environment variable.


> Forgive me, if all of these questions seem hopelessly obvious to you. My
> experience with limited to the GUI wrappers that YDL and Mandrake
> provide. And those, of course, don't help at all in undertanding what
> goes on under the hood.

Don't worry, it is not the easiest thing to grasp due to lots of similar 
terms, different ways of using X and VNC, and looking at this from different 
points of view.

> 6. Finally, is there some good reference documentation available for VNC
> ? That way once I got started, I don't have to overload the list here.

http://www.tightvnc.com/
http://www.realvnc.com/


Here is a simple setup for running VNC server on a remote system and 
displaying it locally.

localsystem$ ssh remotesystem
remotesystem$ vncserver

New 'remotesystem:1 (user)' desktop is remotesystem:1

Starting applications specified in /home/user/.vnc/xstartup
Log file is /home/user/.vnc/remotesystem:1.log

remotesystem$ exit
localsystem$ echo $DISPLAY
:0.0
localsystem$ vncviewer remotesystem:1







More information about the yellowdog-general mailing list