Page 2 of 2

Re: Tried to VNC into our server, but the screen is blank.

Posted: 2011/07/06 21:05:19
by pschaff
Yes - I see you posted while I was composing - did not catch that, and will defer to an author of the Wiki page, but I'm a bit confused as IIRC switchdesk is not installed by default and from inspecting /etc/X11/xinit/xinitrc and /etc/X11/xinit/Xclients Gnome will normally start if it is installed and ~/.Xclients does not exist.

Re: Tried to VNC into our server, but the screen is blank.

Posted: 2011/07/07 09:20:57
by r_hartman
[quote]
gerald_clark wrote:
Nothing past the "exec /etc/X11/xinit/xinitrc" will run.
The default has not been set.[/quote]

If that's true, why does my VNC work like a charm?
[code]$ cat .vnc/xstartup
#!/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 -nowin &
# xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
teamviewer6 &
gnome-session &[/code]

I don't have the "( while true ; do xterm ; done ) &" line; would that make the difference between showing a desktop and a blank screen?

Re: Tried to VNC into our server, but the screen is blank.

Posted: 2011/07/07 13:26:55
by gerald_clark
Because you are not running
exec /etc/X11/xinit/xinitrc
and therfore not running the normal desktop.

On the server:
go to the X login screen and login as the user in question.
Does it work?
If not, it won't work in VNC either.

Re: Tried to VNC into our server, but the screen is blank.

Posted: 2011/07/08 05:37:12
by r_hartman
[b]Gerald[/b]
I see; thanks.

Re: Tried to VNC into our server, but the screen is blank.

Posted: 2012/08/15 16:30:36
by rserling
I had this same problem and solved by making ~/.vnc/xstartup executable, which it was not on initial writing.

Re: Tried to VNC into our server, but the screen is blank.

Posted: 2017/11/03 19:29:13
by makermarc
I was launching x0vncserver from a remote ssh terminal. The server would run, but then connecting to vncviewer would show the black screen as mentioned above.

The solution:
Launching x0vncserver from a terminal window on the host gnome environment.

I use this configuration with win2vnc, so I get dual monitor Windows + 3rd monitor linux side-by-side with one keyboard and mouse. Works great!