LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Getting gray X screen when using VNC (https://www.linuxquestions.org/questions/linux-general-1/getting-gray-x-screen-when-using-vnc-869414/)

scott8035 03-18-2011 10:16 AM

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

Pearlseattle 03-20-2011 11:10 AM

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!

scott8035 03-20-2011 02:11 PM

I can't find any *.vnc log file anywhere; a "locate '*.vnc'" only shows me /root/.vnc/. Can you be more specific?

scott8035 03-20-2011 02:18 PM

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.

scott8035 03-20-2011 02:50 PM

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).

Pearlseattle 03-21-2011 05:40 PM

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!

scott8035 03-24-2011 05:58 PM

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.

tredegar 03-26-2011 11:50 AM

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


All times are GMT -5. The time now is 03:25 AM.