The VNC question

P

pibbur who

Guest
I need to set up one of my linux machines as a VNC server, a Fedora installation with Gnome. Installed tigervnc, set it up according to instructions and it seems that the vncserver is running. I can connect to it from Windows (tigervnc client), and the F8 menu works. However, GUI is completely black, which of course is a nice colour, but in this context not very useful. I've googled of course, and it seems to be a common problem. Unfortuantely there are lot of suggestions for howto solve the problem. I've tried a couple, without success.

I also tried to set it up on a Suse installation using Yast, which is simpler. Same result.

No doubt there are watchers who know exactly what to do.

pibbur who sometimes succumb to wishful thinking.
 
I don't have time right now but if you can't figure it out in a day or so drop a note and i'll give it a try on my linux box (currently ubuntu 16.04) and windows 10 box (which has nvidia gpu in case that matters).
 
Joined
Oct 20, 2006
Messages
7,758
Location
usa - no longer boston
I don't have time right now but if you can't figure it out in a day or so drop a note and i'll give it a try on my linux box (currently ubuntu 16.04) and windows 10 box (which has nvidia gpu in case that matters).

The Suse machine has an nvidia gpu. Maybe there is a driver problem - do I need a separate installation of nvidia drivers?

pibbur
 
Does it have to be VNC?

For remote access I tend to use X2Go, using the NX protocol, and usually a lightweight desktop like XFCE.
 
Joined
Nov 8, 2014
Messages
12,085
Don't know. I used vnc once a long time ago and it just worked. I suspect the server side isn't gpu specific and you said the linux machine was the server. It's the window machine with the black screen right ?

The Suse machine has an nvidia gpu. Maybe there is a driver problem - do I need a separate installation of nvidia drivers?

pibbur
 
Joined
Oct 20, 2006
Messages
7,758
Location
usa - no longer boston
@Ripper;: no, I only chose vnc because that was the only thing I knew about. will try x2go.
@you; are right. It's the win client that has the black window. But when googling I found lots of people focusing on the server.

thanks to both of you.

pibbur
 
A decade+ ago I used tinyvnc and a few times I caught people hacking in. One guy even tried to install malware on my machine as I watched but Norton's locked him out. He couldn't even successfully disable it - it seemed it was smart enough to know what he did.

One thing of course, is to turn off the default port on the IP address - 5001 IIRC. People are polling it specifically looking for VNC.

As for the Linux box - does it know where the right network card is - eth0 or eth1 IIRC. When I set up my SUSE box around the same time I managed to get the thing to be two separate IP addresses by accident. You couldn't do that on XP.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
Yes, that's one of the reasons I like X2go. It tunnels an X session through a secure SSH connection. VNC by default is quite insecure.
 
Joined
Nov 8, 2014
Messages
12,085
Which client are running on windows?

@Ripper;: no, I only chose vnc because that was the only thing I knew about. will try x2go.
@you; are right. It's the win client that has the black window. But when googling I found lots of people focusing on the server.

thanks to both of you.

pibbur
 
Joined
Oct 20, 2006
Messages
7,758
Location
usa - no longer boston
Ok. I couldn't find 1.8.9 so I used 1.8.0 on the windows box. It came up with a grey screen. I opened a window on the server (xterm -display :3) and that window poped up on vncviewer64. It just worked. THis is a little different than the program I used in 1998 which simply mirrored the screen. that was visible on the server - anyway.
-
On the server side the actual software I installed was vnc4server (sudo apt-get install vnc4server). I did not make a custom configuration. I just ran it - saw what virtual x server it created and it worked. On the pc I specify my host:5901 (5901 is the port which I found via netstat -an - but i htink 5901 is the default port unless you changed it.
-
Did you actually open a window on the server and point it to the virtual x server (i.e, xterm -display :3 (the number after : is the virtual server and it is either specify via configuration of vncserver or you can just pick the number it displays when you start the server - the part before the : is the name of your machine - :3 defaults to localhost:3).
-
I should have mentioned that my server is using intel integrated gpu - but I don't believe the vnc server is using the gpu; and if it did it would be piped through the xserver and be transparent to the client (windows box).
-
If you want to open the program from the client and not the server (i.e, xterm via the widnows box) you have to setup an ssh tunnel. Instructions are availble but i didn't go that far because it wasn't relevant to myself trying to reproduce your issue.

vncviewer64-1.8.90.exe

pibbur
 
Last edited:
Joined
Oct 20, 2006
Messages
7,758
Location
usa - no longer boston
I need to set up one of my linux machines as a VNC server, a Fedora installation with Gnome. Installed tigervnc, set it up according to instructions and it seems that the vncserver is running. I can connect to it from Windows (tigervnc client), and the F8 menu works. However, GUI is completely black, which of course is a nice colour, but in this context not very useful. I've googled of course, and it seems to be a common problem. Unfortuantely there are lot of suggestions for howto solve the problem. I've tried a couple, without success.

I also tried to set it up on a Suse installation using Yast, which is simpler. Same result.

No doubt there are watchers who know exactly what to do.

pibbur who sometimes succumb to wishful thinking.
Are you starting a virtual VNC server, ie with the "vncserver" command? If so, after setting your password with "vncpasswd", you need to modify your ~/.vnc/xstartup file to start something useful. For Fedora, use this as a basic one:

Code:
#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

exec /etc/X11/xinit/xinitrc

Also, make sure ~/.vnc/xstartup is executable: chmod a+rx ~/.vnc/xstartup

Then you should be able to do something like: vncserver -depth 24 -geometry 1600x900
And then connect to that virtual server (at the VNC port number it reported) which will now be running a GNOME desktop.

If you're starting VNC in some way other than with a vncserver command (like maybe you're using the systemd service-based version of it? or the vnc.so Xorg module) then let us know exactly how. There's so many different ways to use VNC on the Linux server side. You only mentioned you followed "instructions", but not which instructions.
 
Joined
Sep 26, 2007
Messages
3,444
For testing purpose he could do as I did and just open an app on the virtual screen being shared....

Are you starting a virtual VNC server, ie with the "vncserver" command? If so, after setting your password with "vncpasswd", you need to modify your ~/.vnc/xstartup file to start something useful. For Fedora, use this as a basic one:

Code:
#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

exec /etc/X11/xinit/xinitrc

Also, make sure ~/.vnc/xstartup is executable: chmod a+rx ~/.vnc/xstartup

Then you should be able to do something like: vncserver -depth 24 -geometry 1600x900
And then connect to that virtual server (at the VNC port number it reported) which will now be running a GNOME desktop.

If you're starting VNC in some way other than with a vncserver command (like maybe you're using the systemd service-based version of it? or the vnc.so Xorg module) then let us know exactly how. There's so many different ways to use VNC on the Linux server side. You only mentioned you followed "instructions", but not which instructions.
 
Joined
Oct 20, 2006
Messages
7,758
Location
usa - no longer boston
Back
Top Bottom