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

Issues related to software problems.
pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

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

Post by pschaff » 2011/07/06 21:05:19

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.

r_hartman
Posts: 711
Joined: 2009/03/23 15:08:11
Location: Netherlands
Contact:

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

Post by r_hartman » 2011/07/07 09:20:57

[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?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

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

Post by gerald_clark » 2011/07/07 13:26:55

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.

r_hartman
Posts: 711
Joined: 2009/03/23 15:08:11
Location: Netherlands
Contact:

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

Post by r_hartman » 2011/07/08 05:37:12

[b]Gerald[/b]
I see; thanks.

rserling
Posts: 2
Joined: 2012/08/15 15:22:44

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

Post by rserling » 2012/08/15 16:30:36

I had this same problem and solved by making ~/.vnc/xstartup executable, which it was not on initial writing.

makermarc
Posts: 1
Joined: 2017/11/03 19:25:15

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

Post by makermarc » 2017/11/03 19:29:13

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!

Locked