I have started vncserver or remote instance with the vncserver command, and now am able to connect to it with VNC client.

Unfortunately, I can't start vncconfig due to error

No VNC extension on display

Everything is happening on VNC. How can it be?

enter image description here

  • You should type tightvncserver on the remote OS. vncserver is userd for RealVNC.
    – GAD3R
    Nov 29, 2018 at 20:25
  • Replace your VNC with the TigerVNC server and remove other vnc packages. Dec 31, 2019 at 18:50

1 Answer 1


1) Make a copy of vncserver

sudo cp /usr/bin/vncserver /usr/bin/vncserver.bkp

2) Open vncserver and find $defaultXStartup

sudo vi /usr/bin/vncserver

3) Modify lines to:

    = ("#!/bin/sh\n\n".
       "# Uncomment the following two lines for normal desktop:\n".
       "# unset SESSION_MANAGER\n".
       "# exec /etc/X11/xinit/xinitrc\n\n".
       "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n".
       "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
       "xsetroot -solid grey\n".
       "vncconfig -iconic &\n".
       "x-terminal-emulator -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
       "x-window-manager &\n");

This will ensure that you have all the right things started inside VNC.

In case you face issues, please follow the below link and ensure you have all the stuff is rightly installed.

See Installation of VNC server on Ubuntu.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .