VNC blank screen problem with RedHat ES4

I have a new install of RedHat ES4 that I cannot get VNC to cooperate in.  Actually things look OK on the Linux side, but when I try to connect to a Linux session via VNC from my WIndows desktop, I just get a blank screen with a large X, but not the KDE desktop that i'm hoping for.

I'm not a Linux expert, and don't have Unix background either.  I am an experienced Windows user and an experienced Oracle DBA.  I've gotten VNC to work before on a couple ES3 installs I did, and on ES4 once, but I had to re-install ES4 and now I cannot get past the frustrating blank screen in VNC.

Yes, I have root access to the Linux machine via a "putty" session and I am (unfortunately) the closest thing we have to a Linux sysadmin.  I have explored some of the responses to somewhat similar questions in this forum, but they are for different distros and/or older versions of RedHat, so I'm not sure how much of the info in them applies in my case.
LVL 36
Mark GeerlingsDatabase AdministratorAsked:
Who is Participating?
 
wesly_chenCommented:
1. kill your vnc session with
vncserver -kill :1  (or :2)

2. As root
rm -rf /tmp/.X11-unix/*

3. restart vncserver

4. Please post the log file in ~/.vnc/  here for more information to debug.

VNC has nothing to do with the setting in /etc/sysconfig/desktop.
kde or gnome is decided by gnome-session or startkde command in ~/.vnc/xstartup.

But your personal setting in your home directory (say .kde directory ) will affact the
KDE in VNC.
0
 
Mark GeerlingsDatabase AdministratorAuthor Commented:
I'm puzzled and somewhat amazed, frustrated, and happy.  VNC works for me now!  Why?  I don't have a clue.  

Linux was at runlevel 3, but I've had VNC work before and bring up the KDE GUI on my Windows desktop with ES4 at runlevel 3.  A few minutes ago I decided to do a "startx" in my Putty (command-line) session on the Linux server.  Then I went to the console, and KDE was running there as expected.  I opened a terminal shell there, stoppped the VNC server session that was running, then restarted it, and went back to my Windows desktop and tried the VNC client again, not really expecting it to give me anything other than a blank screen, but it launched KDE! I went back to the console and logged out (which shut down X) then disconnected my VNC session, and reconnected - no problem: it gave me a KDE desktop again.  I went back to Putty and stopped and restarted vncserver again, then tried to connect via VNC, again no problem.

Why it co-operates now but refused to co-operate earlier is a complete mystery to me.  Does anyone have any ideas about why it it is willing to co-operate now?
0
 
Mark GeerlingsDatabase AdministratorAuthor Commented:
Well, not quite.  I shut down and rebooted ES4, and expected VNC to co-operate, but no such luck.  It was running on the Linux side but my VNC client on Windows just gave me the blank screen.  I then did a "startx" in Linux and tried my VNC client again.  No better, still a blank screen.  I then shut down KDE on the console, then stopped and restarted vncserver, and now it co-operates again and gives me KDE on my VNC client.

What is going on here?  What combination or sequence of things does VNC need to be able to reliably give me a GUI desktop to Linux?  I need to be able to manage an Oracle database on Linux and I don't know the Linux commands well enough to do everything from the command line.  (Plus Oracle's installer and some configuration tools for Linux need to run in a GUI.)  I want to be able to have the GUI on my Windows desktop.  If VNC is not the most reliable way to make this happen, I'm willing to consider other options.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
wesly_chenCommented:
You need to "uncomment the following two lines in ~/.vnc/xstartup"
unset SESSION_MANAGER
exec  /etc/X11/xinit/xinitrc

So your ~/.vnc/xstartup looks like
-----------
#!/bin/sh

unset SESSION_MANAGER
exec  /etc/X11/xinit/xinitrc

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session  &   # <=== change from "twm &"
--------------------
Then kill the old vncserver session and restart a new vncserver session.
0
 
Mark GeerlingsDatabase AdministratorAuthor Commented:
Those two lines in my xstartup file have been uncommented.  The remaining lines are commented out though.  Isn't there some overlap or duplication between the line:
exec  /etc/X11/xinit/xinitrc

and the last few lines in this file?  I don't claim to be a Linux expert, but it looks to me like the xinitrc script does at least some similar things as these lines.

I know that I don't want a GNOME desktop, I prefer KDE.  I have modified my /etc/sysconfig/desktop file to be:
DESKTOP="KDE"
0
 
wesly_chenCommented:
> I prefer KDE.
Just make your xstartup looks like the following
------
#!/bin/sh

unset SESSION_MANAGER
exec  /etc/X11/xinit/xinitrc

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startkde  &   # <=== change from "twm &"
-------
0
 
Mark GeerlingsDatabase AdministratorAuthor Commented:
No.

After a Linux reboot, that still gives me just a blank screen in my VNC client with an X-shaped mouse pointer, but it is useless.  I'm out of time for today - I'll check back in the morning.
0
 
rindiCommented:
You can check the following link. I think it already has more or less what lesly suggested, but there may be some additions...

http://www.experts-exchange.com/Operating_Systems/Linux/Q_21303449.html?query=vnc+kde&clearTAFilter=true
0
 
Mark GeerlingsDatabase AdministratorAuthor Commented:
To rindi:

Been there, done that.  Yes, that link has pretty much the same things I have tried.  That user, wanted gnome, not KDE, but otherwise it looks like the same problem I have.  When I uncomment those two lines though in my xstartup file, I still get just a useless blank screen with only a large X for a mouse pointer that does nothing.
0
 
Mark GeerlingsDatabase AdministratorAuthor Commented:
With the help of Red Hat Technical Support, we found and fixed the real problem: an error in /etc/hosts.  The host name was wrong.  I entered it during the O/S install process differently than I intended.  I corrected it in /etc/sysconfig/network, but hadn't corrected it in the /etc/hosts file.  After correcting it there, VNC responds as expected.

I'll accept wesly's last suggestion as the answer to thank him/her for trying.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.