VNC under RedHat 8.0 (was RE: Linux VNC Newbie Question)
Wed Dec 11 16:02:00 2002
I actually just got it working, using a clue Michael gave. I logged out of
Gnome, then brought back up a command-line (fail-safe mode) RedHat session.
>From there, I could connect via VNC from my Windows box and everything runs
fine, using Gnome. This appears to avoid the problem of multiple Gnome
sessions running concurrently.
It isn't a big deal to me whether I can run multiple graphical sessions
simultaneously. It would be nice, but not essential. My Linux application is
really pretty moderate at this point. All I'm trying to do is get Linux up
and running on 7 boxes, then install and configure Samba, so I can run them
as Windows-compatible fileservers. My hope is that once they are set up,
they should be pretty stable and low-maintenance.
Where my desire for VNC came in was sheer laziness. Who wants to get up and
walk over to the server room and work on a KVM, when I could do it all from
my desk? In typical IT fashion, I'd rather bang my head against a wall for a
brief while and figure out how to insure my perpetual slackerness
From: Kelly F. Hickel [mailto:firstname.lastname@example.org]
Sent: Wednesday, December 11, 2002 10:04 AM
To: Justin Fields; Michael Milette
Subject: RE: VNC under RedHat 8.0 (was RE: Linux VNC Newbie Question)
You need to make sure that you are properly setting the DISPLAY
environment variable in your shells. I've seen a lot of people write
"export DISPLAY=localhost:0" in their .cshrc/.bash_profile/.profile/etc.
This is fine if you're always logged into the console (:0), but now your
display is :9, so you need to do "export DISPLAY=localhost:9".
Kelly F. Hickel
Senior Software Architect
From: Justin Fields [mailto:JFields@garsonlaw.com]
Sent: Wednesday, December 11, 2002 8:49 AM
To: 'Michael Milette'
Subject: RE: VNC under RedHat 8.0 (was RE: Linux VNC Newbie Question)
When I chose VNC in the initial install, only the viewer was installed.
as you. I went back and added the server component from CD #3 by
the server package and installing it.
I followed your instructions on the file change in .vnc/xstartup. I ran
vncserver, specifying a display number. For example:
vncserver : 9
That will make the display number 9, then I can connect to it from my
Windows machine by connecting to 'IPADDRESS:9'. Specifying the display
number means that you don't have to see what VNCServer made as it
upward. That worked fine, and this time, I got the Gnome desktop.
But.... when I go through the VNC connection and open a file or try to
something with gedit, it comes up on the Linux box, but not via the VNC
Thanks for the help. I'm gradually getting this stuff. The problem is
I'm brand new to Linux, as well as dealing with the VNC issues.
From: Michael Milette [mailto:email@example.com]
Sent: Tuesday, December 10, 2002 5:08 PM
To: Justin Fields; 'Tim Waugh'
Subject: VNC under RedHat 8.0 (was RE: Linux VNC Newbie Question)
I just went though the exact same scenario today. I installed vnc using
Add Remove Packages tool first. After many unsuccessful attempts at
to figure out how to run vncserver from the command line, I gave up and
decided that only vncviewer must have been installed with RH 8.0 and not
necessarily the server. So I un-installed it, downloaded and installed
latest TightVNC rpm instead (yes, I know it is only recommended for RH
Linux versions up to 7.x).
The only way I could get it to work though was to edit the .vnc/xstartup
file and replace the last line:
...with the following two lines:
A few notes:
- I have no idea why xinitrc doesn't work.
- This assumes you want to run the gnome session manager. You need the
unset line because gnome-session doesn't appear to like being run in two
places at the same time. This seems to get around the problem. It's not
pretty but it works. As a result, you will see the occasional error
appear in the log files and in the remote session. This is most likely
to the fact that I obviously am running blind and haven't any clue as to
what I am doing (yet!). However it does work well enough to enable me to
push forward and learn more. Maybe one day I might even have a clue of
I am doing.
- If you prefer KDE, use "startkde &" instead of the gnome-session line.
You might not need the unset line either with KDE. Of course you should
install KDE first as it doesn't come installed by default in RH 8.0.
- The xstartup file appears to be read or run (not sure) when you run
vncserver from the command line. So if you make a change to the file,
will need to stop your vncserver and then restart it again for the
to take effect. This by itself had me going for a while. It seemed that
matter what I did, it never had any effect.
- The display number seems to always start at 1, unlike the Windows
which starts at 0 by default. So you will need to add the :1 when
the vncviewer. Actually, it is probably best to take note of the
number when you start up the vncserver.
- I am assuming you have figured out that you need to run
vncserver -kill :displaynumber
...to stop a vncserver. If not, now you do.
- I haven't figured out how to do remote screen takeover of the
running gnome console session. The above information will start a new
session. If anyone has a suggestion or two on how to do this (to enable
to do remote user support), it would be appreciated.
By the way, does anyone know if it is possible to disable the wallpaper
like WinVNC does when you connect?
I am still learning about Linux. Please don't flame me if I am doing
something dumb. However if anyone has some suggestions on how to do it
better, I would very much appreciate hearing from them.
TIP: You can use "gedit" to edit the file. It is much easier to use and
never did get the hang of vi.
Hope it helps a little...
At 12:28 PM 2002-12-10, Justin Fields wrote:
>I saw that VNC came as an installable Redhat package, but (perhaps
>mistakenly) wanted to make sure I had the most up to date version. So I
>deselect the VNC option and go from scratch. Silly me.
>On an entirely separate machine, I installed RedHat 8, this time, with
>VNC option. I got both the viewer and server installed. It took awhile
>me to find out how to view all the hidden files, but I have that
>accomplished now. I checked the .vnc/xstartup file, and it looks
>like the one you gave me.
>I used the VNC viewer on my Windows box and managed to connect to the
>RedHat box using:
>What I see at that point is a big dark grey screen with an X cursor I
>move around. The server machine has the graphical user interface, which
>looking to connect to.
>I must still be missing something, or misunderstanding something.
>Thanks for the fast and helpful reply.
>From: Tim Waugh [mailto:firstname.lastname@example.org]
>Sent: Tuesday, December 10, 2002 8:22 AM
>To: Justin Fields
>Subject: Re: Linux VNC Newbie Question
>On Tue, Dec 10, 2002 at 07:46:49AM -0500, Justin Fields wrote:
> > I got a fresh download of VNC installed on one of the new
> > machines,
>That was your mistake. :-)
>As shipped, Red Hat Linux 8.0 comes with VNC, complete with a default
>configuration to use the Bluecurve theme. You just had to run
>'vncserver', and be done.
>The magic bit of configuration is in .vnc/xstartup. Change it to
># Red Hat Linux VNC session startup script
>VNC-List mailing list
VNC-List mailing list