Xvnc4 started from xinetd only displays empty gray X screen

2.6k Views Asked by At

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.

3

There are 3 best solutions below

0
On

Well, to remove the gray X screen, you may need to create the password and add xstartup profile for each of the user accounts.

1) to create vnserver password, switch the account or log in as the specific user

Switch account

su - **user_name**

Setup vnc user password

vncserver

out put will be like this prompting for a vnc password..

You will require a password to access your desktops.

Password:
Verify:

xauth:  file /home/**user_name**/.Xauthority does not exist
New 'server1:1 (**user_name**)' desktop is server1:1
Creating default startup script /home/**user_name**/.vnc/xstartup
Starting applications specified in /home/**user_name**/.vnc/xstartup
Log file is /home/**user_name**/.vnc/server1:1.log

2) Create the xstartup profile

vim /home/test1/.vnc/xstartup


and add
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

3) reboot server

sudo reboot

Reference: You may have a look here for the full installation http://rupeshkushwaha.blogspot.sg/2017/11/vnc-server-installation-and.html

4
On

According to this post you need to make sure that GDM uses XDCMP & that localhost is allowed to make XDCMP calls to itself...

0
On

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.