Re: Enabling VNC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremy Conlin wrote:
On 2004-10-19 16:32:27 -0400, "Kevin J. Cummings" <cummings@xxxxxxxxxxxxxxxxxx> said:

Jeremy Conlin wrote:

My xstartup looked nearly the same. I uncommented the exec... line earlier and just now uncommented the unset... line. After rebooting (and restarting vncserver) and closing the firewall it came up just the way I expected it to. Now, how can I configure the firewall to accept vnc connections without turning it off? And how can I get vncserver to start on boot?


What has been discussed so far is how to create a VNC connection to a new virtual desktop (thus the :1 in the display name).

I think what you are looking for is how to control your console X11 desktop from a remote machine.

What I need is to see the GUI desktop of my FC2 machine from a remote machine. I would prefer to do this without a client (i.e. using only X11) if possible; if not I can use a VNC client.

Yes, that's what I said! B^)

This can be done with a small change to your X11 config.

In your Section "Module", include the following:

    # Load the REALVnc module
    Load    "vnc"

Then, later on in your Section "Screen", you will need a line like:

Option "passwordFile" "/root/.vnc/passwd"

Where are these sections? I have never changed my X11 config.

Your xorg.conf file (usually found in /etc/X11 directory) is comprised of various "sections".


It begins with a *lot* of comments describing the various copyrights and then a description of the file layout. (You should read it!) B^)

Essentially, you have a "ServerLayout" to start with. This describes which other "Sections" make up your X server. It defines a "Screen" and a number of "InputDevice"s. You can have a number of ServerLayouts, but, I beleive that the first one is the important one unless you invoke your X server with the -layout option.

After this, is the "Files" section which tells the X server where to find some important files it might need (including the path to the various "modules" used by the server).

The "Modules" section tells the server which Modules you want loaded. These are like shared libraries or kernel modules that help provide functionality to the X server. "vnc" is one such module that allows a "vnc client" to be able to connect to your X server and control it remotely. I beleive that the actual name of the module is REAL VNC.

This is what makes it different from the vncserver service that you may or may not start from /etc/init.d. The vncserver service starts a virtual X11 desktop, while the REAL VNC module allows VNC like you are used to seeing on that "other" PC operating system. B^)

There are more "Sections" to your xorg.conf file. I will leave figuring out most of them up to you as an exercise in reading your own xorg.conf file. I wish it was better documented so I knew *what* all the options were everywhere, but for now that is most of what you need to change.

The last part you need to change is in the "Screen" section that your Layout uses. This Screen section includes your videao device name, your monitor type, and has subsections that help configure all of the supported screen sizes (Modes). Here is where you need to specify where the "password" file will reside for your vnc session. The password file is necessary to keep just anyone from attaching to your X11 session and reeking havoc with your machine. Especially if you keep root windows open on your desktop!

I put mine in /root/.vnc/passwd (a similar location to where the vncserver service puts a user's password file, but this is for the root user). I must admit, I cheated. I just copied the password file from my home directory (~/.vnc/passwd) to the root directory. But, it works for me. All you need to know is the "DISPLAY" number of the X11 session you want to connect to, and the password stored in your /root/.vnc/passwd file in order to connect.

You did know that it is possible to run multiple X servers on your machine at any given time, right? I once had 3 different X servers running on an old K6-2/3D 400MHz machine with only 256MB of ram, each server running with a different color depth (8, 16, 24). It was kind of a proof of concept thingy. Each server had a different DISPLAY number. The first was :0.0, the second was :1.0, the third was :2.0. Then I started up a vncserver service, and it was assigned DISPLAY :3.0. (Of course, my machine paged a lot after that, but the point was to see how all of the xservers could run together and be attached to via vnc clients.)


This should allow to to connect to your :0 X11 display and control it via VNC.


Thanks for your help. Someday I will become proficient at Linux (I hope).

Practice make perfect. I've been playing with Linux since kernel release 0.12 on an old 386 25Mhz machine when I found out that my 60MB hard drive was really a 70MB hard drive, and Linux could be installed on the extra 10MB of space without disrupting DOS 3.2 (which needed special disk drivers to access any more than 32MB....)


Jeremy

I hope this make things clearer....

--
Kevin J. Cummings
kjchome@xxxxxxx
cummings@xxxxxxxxxxxxxxxxxx
cummings@xxxxxxxxxxxxxxxxxxxxxxx


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux