LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-18-2011, 11:16 AM   #1
scott8035
LQ Newbie
 
Registered: Nov 2010
Posts: 14

Rep: Reputation: 4
Getting gray X screen when using VNC


I'm trying to setup an Ubuntu 10.10 desktop that will allow any number of vnc connections. When I try to connect (from Win7 using UltraVNC, which has worked for me using a comparable Red Hat RHEL 5.5 setup), I get a flickering gray X screen with no apps running, as if it were starting X over and over. I'm trying to make this display Ubuntu's login screen at that point.

I have installed vnc4server and xinetd. My xinetd config is:

service vnc
{
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc4
server_args = -inetd -geometry 1280x900 -depth 24 -SecurityTypes None
}

I have a ~/.vnc/xstartup file that looks like:

#!/bin/sh
# [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
# [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
# vncconfig -iconic &
gnome-session &

...but I don't think I'm getting that far. Any ideas?
---scott
 
Old 03-20-2011, 12:10 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 997

Rep: Reputation: 130Reputation: 130
Hi
It's not by chance that
Code:
gnome-session &
should instead be
Code:
gnome-session
?
I remember I had in the past a similar problem and the WM was shutting down just after it started. But I just checked and now it is working fine independently from the ampersand.
Otherwise what do the logs in .vnc say?
Bye!
 
Old 03-20-2011, 03:11 PM   #3
scott8035
LQ Newbie
 
Registered: Nov 2010
Posts: 14

Original Poster
Rep: Reputation: 4
I can't find any *.vnc log file anywhere; a "locate '*.vnc'" only shows me /root/.vnc/. Can you be more specific?
 
Old 03-20-2011, 03:18 PM   #4
scott8035
LQ Newbie
 
Registered: Nov 2010
Posts: 14

Original Poster
Rep: Reputation: 4
Xvnc4 started from xinetd only displays empty gray X screen

Here's a better description...

Hi. I'm attempting to setup an Ubuntu 10.10 box so that anyone can connect to port 5900 and be greeted by the gdm login manager. To do so, I added a vnc entry in /etc/services and I am starting Xvnc4 using this xinetd config file:

service vnc
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -geometry 1000x700 -depth 24 -broadcast -inetd -once -securitytypes None
}

This kind of works...I can start multiple sessions all to port 5900, and I get an X screen. The problem is that I only get an empty, gray X screen with no applications started.

I know when you run vncserver from the command line it will look to your ~/.vnc/ directory for your passwd and xstartup files, and I think what I want to do is put "gnome-session" into the xstart file. However, which xstartup file? The running user is "nobody" who obviously doesn't have a ~/.vnc/ directory. I tried a /root/.vnc/xstartup file and a ~scott/.vnc/xstartup file and it doesn't look like they were even read.

I changed the xinetd vnc service so that it would "strace" Xvnc4. I looked thru all the "open" lines and didn't get a clue as to what file it was trying to read for xstart.

Can anyone help? I just want a terminal server where the user is presented with a gdm login screen.
 
Old 03-20-2011, 03:50 PM   #5
scott8035
LQ Newbie
 
Registered: Nov 2010
Posts: 14

Original Poster
Rep: Reputation: 4
Ooops...log

Now I know what you meant about logs... they are in the .vnc folder in format "hostname:display.log", in my case "ubuntu-1:1.log".

I cleaned these out after I was done with testing vncserver by hand. Now that I'm running from xinetd, there are no logs like that on my system (at least, not under /etc, /usr, /root, /home, or /var).
 
Old 03-21-2011, 06:40 PM   #6
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 997

Rep: Reputation: 130Reputation: 130
Sorry for the late reply. Yesterday I killed my notebook by spilling coke on it - see the thread I just opened.
Yes - you're right. Those logs.
Well, if you don't get the logs now... it's weird.
Unluckily what you're trying to do goes beyond my knowledge - I usually only use VNC to perform non-concurrent connections, started manually or automatically with very simple scripts, without using a login manager.
Couldn't you start from a simplier configuration increasing step-by-step? first of all using a normal window manager like twm, e16 or xfce4 and especially not xinetd (and I have no clue about xinetd) but manually nor using "nobody" but an existing user. Add then step-by-step the additional complexity.

FYI - might be helpful: I once set up a script to start vnc at boot and i used a custom init.d script to do it. The result was that vnc was creating a ".vnc" directory just under the root filesystem directory (meaning "/"). Don't know if this is correct but out of it I deduced that if vnc was started through init.d when the PC boots, vnc does not find the root directory of root as the environment variable is not yet set....... or something like that. Have a look if you find anything just under "/"... .
Bye!
 
Old 03-24-2011, 06:58 PM   #7
scott8035
LQ Newbie
 
Registered: Nov 2010
Posts: 14

Original Poster
Rep: Reputation: 4
Workaround using rdp

I finally gave up on this, started fresh from a snapshot of my system, and installed xrdp and vnc4server. Worked right out of the box. Very frustrating. I will be trying VNC again when 11.04 comes out.
 
Old 03-26-2011, 12:50 PM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Testing"
Posts: 6,117

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
No such thing as "give up"

Please try this post: VNC and a full login Gnome session with GDM

Those instructions are for fedora, but should work just fine for ubuntu if you replace yum with apt-get
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gray screen in vncviewer barunparichha Linux - Desktop 1 01-05-2009 06:23 AM
VNC -- gray background iggep SUSE / openSUSE 6 10-03-2007 01:27 AM
vnc remote desktop gray packetsmacker Linux - Software 3 09-12-2007 09:29 PM
YaST Gray Screen scdark Linux - Newbie 2 05-16-2005 07:42 AM
gray screen when i startx nObRaIn Slackware 8 12-21-2003 05:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:22 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration