LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-30-2009, 06:32 PM   #1
zushiba
LQ Newbie
 
Registered: Sep 2007
Posts: 15

Rep: Reputation: 0
vncserver was working, now just gives black screen. Xvnc Free Edition 4.1.2


I am running Red Hat Enterprise Linux Server release 5.4 (Tikanga)

I've tried probably a dozen changes to my xstartup file and I'll post the various configurations I've tried but first I'll explain my issue.

I am trying to vnc into our server. It worked fine earlier today and I was able to see a gnome desktop. For some reason now all I get is a black screen.
My original configuration on the server was this.
Quote:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
^This exact same xstartup configuration works perfectly well for another user but brings up a black screen with an X cursor for me.

On a backup server the following xstartup is the following. And it works great. But not on our live server.
Quote:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
gnome-session --sm-disable
gnome-session
I've tried commenting out twm &, I've tried variations on gnome-session, exec gnome-session, gnome-session &, exec gnome-session &.

If I comment out exec /etc/X11/xinit/xinitrc I get a grey screen with a console and nothing else but nothing I try seems to bring back my gnome UI.
I am not logged in on another session anywhere, I've restarted the vncserver a few times and I simply cannot seem to fix this.

I've been on google looking for ideas on how to fix this for literally the past 6 hours and nothing seems to work.
 
Old 09-30-2009, 09:28 PM   #2
donanap
Member
 
Registered: Sep 2008
Location: Perth, Australia
Distribution: RedHat, Solaris
Posts: 38

Rep: Reputation: 15
Lightbulb Try adding Startx into your config file

Hi Zushiba,

I'm no expert on these things! But with all of my VNC sessions I remove the twm at the end of my file and I add the startx into my 'xstartup' file eg:
Quote:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startx &
Also, when you restart the session, does it work for a period of time and then just die?? Also, what viewer are you using?? RealVNC, VNCViewer? and what level of encryption? I had a similar problem with a staff member that they could not view the session using one version of tightVNC ( they were getting a plain black screen) but when using the normal or vncviewer they were able to fine.
Good luck. Hope ive helped in some way.

Thanks,
Donanap
 
Old 09-30-2009, 09:35 PM   #3
zushiba
LQ Newbie
 
Registered: Sep 2007
Posts: 15

Original Poster
Rep: Reputation: 0
I've actually tried starx and commenting out/removing twm and neither had any affect.

I've been using UltraVNC and that worked fine for a while before it decided I would no longer get to see a desktop. I changed no settings in either UltraVNC or the xstartup file. It just suddenly stopped working all together and just for me, everyone else on the server seems to be having no problems what-so-ever. I've copied their xstartup files to no avail.
 
Old 10-01-2009, 02:26 AM   #4
donanap
Member
 
Registered: Sep 2008
Location: Perth, Australia
Distribution: RedHat, Solaris
Posts: 38

Rep: Reputation: 15
Question Check your /etc/sysconfig/vncserver

Hi,

Sorry to hear my suggestions didnt help at all. Have you checked the /etc/sysconfig/vncservers file?? make sure nothing is awry here?
also, I would suggest checking the vnc logs...

vncserver config file
Quote:
/etc/sysconfig/vncservers
vnc log files here:
Quote:
$HOME/.vnc/hostname:connection#.log
Share your vnc config file details here. Also share the tail end of your vnc log file here as it should tell you what is wrong with it or display messages from last time you logged in.

Good Luck.
Donanap
 
Old 10-01-2009, 09:28 AM   #5
zushiba
LQ Newbie
 
Registered: Sep 2007
Posts: 15

Original Poster
Rep: Reputation: 0
Sorry this took so long to reply to I had to get back to work to get at these files.

This is pretty much what I get.
Quote:
Xvnc Free Edition 4.1.2
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 70101000, The X.Org Foundation


Wed Sep 30 14:36:50 2009
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
vncext: Listening for HTTP connections on port 5801
vncext: created VNC server for screen 0
localuser:jzsiba being added to access control list
No profile for user 'jzsiba' found
SESSION_MANAGER=local/bebop-prod.taftcollege.edu:/tmp/.ICE-unix/18678

Wed Sep 30 14:36:58 2009
Connections: accepted: 192.168.50.35::3343
SConnection: Client needs protocol version 3.4
SConnection: Client uses unofficial protocol version 3.4
SConnection: Assuming compatibility with version 3.3

Wed Sep 30 14:37:01 2009
VNCSConnST: Server default pixel format depth 16 (16bpp) little-endian rgb565
VNCSConnST: Client pixel format depth 16 (16bpp) little-endian rgb565

Wed Sep 30 14:37:06 2009
Connections: closed: 192.168.50.35::3343 (Clean disconnection)
SMsgWriter: framebuffer updates 2
SMsgWriter: ZRLE rects 3, bytes 205
SMsgWriter: raw bytes equivalent 1573924, compression ratio 7677.678049
FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing.
Everything seems to be commented out in the config

Quote:
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
But it works fine for other users with the same xstartup as me and like I said it was working fine for me for a while then just stopped :/

We've restarted the server, still no good :/

EDIT: I've tried a few different clients they all show the same thing.


EDIT2: Commenting out exec /etc/X11/xinit/xinitrc and trying startx I get a grey screen with a console and nothing else.

Quote:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &
Same thing with
Quote:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &
Attached Images
File Type: jpg broken.jpg (53.1 KB, 6 views)

Last edited by zushiba; 10-01-2009 at 02:15 PM.
 
Old 10-02-2009, 12:05 AM   #6
donanap
Member
 
Registered: Sep 2008
Location: Perth, Australia
Distribution: RedHat, Solaris
Posts: 38

Rep: Reputation: 15
Question What happens when you restart?

Hi,

No probs, thanks for posting ur results. You restarted the server.. surprising this didnt help..I have seen this exact screen MANY times at my workplace.. I have not found an answer to WHY this happens...but restarting the vnc session has always fixed it for me.(Not to say we are at all having the same problem.)

Have you checked to make sure there arent any rampant processes running? Try killing them if so and restarting the vnc session? (not that this makes a lot of sense if you have rebooted... hmmm)
To kill the session:

Code:
vncserver -kill :1
Now restart the session:

Code:
vncserver :1 -depth 24 -geometry 3200x1100
Obviously put in your depth/geometry(screen resolution) here. But i can see from your session you are running port 1. Is anyone running a VNC session as root??

just check who else is running, ensure there's a) not currently 2 sessions running in your name. b) no body else has a conflicting port number.

Code:
ps -ef | grep vnc
Both your examples of your xstartup file are the same, im presuming this was a copy and paste error? Also, is that the end of your log file?? was sept 30th last time u logged on?? Usually current messages are WAY at the bottom of this..Would expect some errors here.
Heres 2 examples of the type of xstartup file I use.
Simple, default config file.
Code:
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startx &
Other startup file.

Code:
#!/bin/sh

OS=`uname -s`

if [ $OS = "Linux" ]
   then
        # Uncomment the following two lines for normal desktop:
        unset SESSION_MANAGER
        exec /etc/X11/xinit/xinitrc

        [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
        xsetroot -solid grey
        vncconfig -iconic &
        xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

elif [ $OS = "SunOS" ]
    then
        [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
        xsetroot -solid grey
        #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
        Geonet &
        /usr/dt/bin/dtwm &
else
        echo "ERROR!!"
fi
#twm &
Also, make sure all the links in your startup file ARE actually pointing to existing files.. si there a chance something got deleted or corrupted?? Anyway, long post sorry! Sorry if u've tried all these things already, just going through the usual troubleshooting, cant help asking some stupid questions.
Good Luck!
Donanap
 
Old 10-02-2009, 10:13 AM   #7
zushiba
LQ Newbie
 
Registered: Sep 2007
Posts: 15

Original Poster
Rep: Reputation: 0
Ah yes the double xstartup was a c&p error.

I have gone through and attempted to kill all sessions I've ever used (1-8) and up to 20 just in case though I've never had any that high.

I've reset the vncserver service itself many times and I'd think that would kill any sessions? Or am I wrong?
running (as root)
Quote:
ps -ef | grep vnc
I get
Quote:
root 4884 4825 0 08:05 pts/1 00:00:00 grep vnc
Though there is no pid in /root/.vnc/ and killing 1-20 just vies me the standard
Quote:
"Can't find file/root/.vnc/<server>:X.pid file.
You'll have to kill the Xvnc process manually
And yes that's all that's in the log files. I only have access to this server during work hours and nothing changed on the 1st to post about. Same old crap pretty much.

Last edited by zushiba; 10-02-2009 at 10:20 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get vncserver (Xvnc) and its apps to survive logout nicely???? [RHEL 5.1] rickhg12hs Red Hat 12 06-17-2009 04:54 PM
laptop not working, all I get is black screen asif2k Linux - Laptop and Netbook 1 07-29-2006 05:59 AM
suse 9.3 live edition 64bit black screen with mouse pointer wonderwizard Suse/Novell 1 05-25-2005 08:41 AM
Installing BCJ-80 printer caused X to stop working - black screen davespod Linux - Hardware 0 06-07-2004 03:27 PM


All times are GMT -5. The time now is 10:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration