0

I have a VM in which I installed the VNC server (TightVNC) using the link : https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04

It is installed successfully and I can see the port 5901 running

/etc/tigervnc$ netstat -tulpn
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:5901          0.0.0.0:*               LISTEN      16460/Xtigervnc     
tcp        0      0 127.0.0.1:5902          0.0.0.0:*               LISTEN      16183/Xtigervnc     
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                   
tcp6       0      0 ::1:5901                :::*                    LISTEN      16460/Xtigervnc     
tcp6       0      0 ::1:5902                :::*                    LISTEN      16183/Xtigervnc     
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
tcp6       0      0 ::1:631                 :::*                    LISTEN      -                   
udp        0      0 0.0.0.0:36618           0.0.0.0:*                           -                   
udp    29184      0 127.0.0.53:53           0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:631             0.0.0.0:*                           -                   
udp     7680      0 0.0.0.0:5353            0.0.0.0:*                           -                   
udp6       0      0 :::37372                :::*                                -                   
udp6   20736      0 :::5353                 :::*  

Now from my local machine, I tried to do the port binding to my local from VM (as per the link https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04)

ssh -L 5901:127.0.0.1:5901 -C -N -l test 172.1.1.1

In my local machine, I able to see the port is binded to 5901

/etc/guacamole$ fuser 5901/tcp
5901/tcp:            22049

Now when I try to take the VNC connection using 127.0.0.1:5901, It promopts for VM's password and shows only the blank page.

enter image description here

5
  • Does your VM software provide a screen view, like e.g. VirtualBox, so that you can check, if your VM provides a "desktop" at all?
    – Marvin
    Nov 15, 2018 at 22:09
  • In particular, the guide you linked includes a step of editing the .vnc/xstartup file to invoke startxfce4 - are the relevant XFCE4 packages actually installed? Nov 15, 2018 at 22:26
  • @Marvin, I created this VM using ovirt and it is able to provide the desktop version of VM
    – Harry
    Nov 16, 2018 at 2:11
  • Since you can connect the VNC, does it respond to keyboard input at all? I have seen VNC displays "sleep" after an amount of inactivity and just hitting enter (or any key really) brings the display back up. Nov 16, 2018 at 19:40
  • @GracefulRestart It is working finally, using the following configuration xsetroot -solid grey vncconfig -iconic & x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & x-window-manager & startxfce4 & Also start the vncserver : env -u SESSION_MANAGER -u DBUS_SESSION_BUS_ADDRESS vncserver
    – Harry
    Nov 16, 2018 at 20:08

0

You must log in to answer this question.

Browse other questions tagged .