[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VNC blank screen problem with RedHat ES4

Posted on 2005-05-10
10
Medium Priority
?
3,043 Views
Last Modified: 2013-12-15
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.
0
Comment
Question by:Mark Geerlings
  • 6
  • 3
10 Comments
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 13971392
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
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 13971544
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
 
LVL 38

Expert Comment

by:wesly_chen
ID: 13971658
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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
LVL 35

Author Comment

by:Mark Geerlings
ID: 13972058
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
 
LVL 38

Expert Comment

by:wesly_chen
ID: 13972364
> 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
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 13972888
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
 
LVL 88

Expert Comment

by:rindi
ID: 13975438
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
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 13977257
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
 
LVL 38

Accepted Solution

by:
wesly_chen earned 1500 total points
ID: 13979888
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
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 13981459
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month19 days, 10 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question