How to finally launch a VNC server on 18.04 without installing a different desktop?

5,111

Controlling current desktop currently is a standard feature of Ubuntu
It is called 'desktop sharing'.
VNC server is installed by the vino package and his setup available in the gnome-control-center sharing

See Cannot turn on sharing on ubuntu 18.04

sudo apt install vino
gnome-control-center sharing &

enter image description here

enter image description here

Share:
5,111
Alexis
Author by

Alexis

Engineer based in Tokyo French, English, Japanese

Updated on September 18, 2022

Comments

  • Alexis
    Alexis over 1 year

    I moved one of my desktop to Ubuntu to try it. In Centos 7, all I need to do to launch a VNC server and see my desktop remotely is: yum install tigervnc-server xorg-x11-fonts-Type1 and vncserver. And I can see correctly my desktop as if I was in front of the monitor. No need to modify any xstartup file or anything!

    The question comes back again and again without acceptable answer then I have few more:

    1. Why nobody could do it in Ubuntu yet?
      • If Unity or for whatever reason it isn't possible, let me know.
    2. Why 99% of the tutorials required us to install xfce?!

      • I don't want to install anything else Finally, for an ultimate time:
    3. Is there a proper way to install a VNC server without modifying xstartup, and without installing a tier desktop?

    I don't expect a simple answer here, if you provide a xstartup file, I'd like to get all the explanations. No need to get the same what I can read in the hundreds duplicated blogs.

    • eri0o
      eri0o over 4 years
      x11vnc -create -env FD_PROG=/usr/bin/unity -env X11VNC_CREATE_GEOM={$1:-800x800x24} -nopw -localhost -forever -shared -noshm
    • Alexis
      Alexis over 4 years
      Why x11vnc? Latest version: 2011. Why is Xvfb mandatory here and not in Centos?
    • Alexis
      Alexis over 4 years
      Moreover even after the x11vnc and xvfb installations, I get lots of XOpenDisplay errors and asking me to run x11vnc as root. No way.
    • eri0o
      eri0o over 4 years
      The above line is exactly what I use on my phone. Why don't you ssh -x, no need for vnc.
    • Alexis
      Alexis over 4 years
      1. no need ssh in local 2. ssh X forwarding performance is awful 3. can forward only the app I launched 4. the app closes with the connection 5. using windows?! 6. it isn't my question 7. a lot more
    • eri0o
      eri0o over 4 years
      Oh, you are using Windows? Then you should be either using ssh -x with WSL (in Win7 I use Cygwin with XWin) or using Remote Desktop Protocol, also known as RDP. Take a look into this -> askubuntu.com/questions/592537/… (you can ignore the part that says to install xfce, but you will need to replace the bin for whatever you are using. I tried with KDE and it worked.)
  • Alexis
    Alexis over 4 years
    Thanks but it requires to be already logged in. And it's a concurrent screen sharing. I'm more looking for something like what I can do with Centos, creating one or several independent sessions. Sorry, I misled you in my question. Edited.