Avatar of systemsautomation
systemsautomation
Flag for Pakistan asked on

Desktop on Ubuntu Server

Hi

I have installed desktop on my Ubuntu Server using apt-get install ubuntu-desktop. The server is hosted somewhere so I don't have its physical access and I connect it through VNC (using ssh tunnel).

But the VNC viewer shows just a black dotted screen (screenshot is attached).

Can you please help me in sorting this out? It would be difficult for me to reboot the machine since it is being used 24/7.
vnc.png
Linux DistributionsLinux

Avatar of undefined
Last Comment
taym78

8/22/2022 - Mon
TobiasHolm

Hi!

Found this:

"... It seems that vncserver is not able to export display :0 but it opens another one where a window manager has to be loaded all over again and we don't want that.. ;)


In that case, install the package called x11vnc - which exports the current display, not a new one.."

Regards, Tobias
systemsautomation

ASKER
Thanks

I installed x11vnc. Typed vncserver :1 at command line. Tried to connect through VNC Viewer but same result.

In fact I am not clear on "which exports the current display, not a new one.."
Fabio Marzocca

I usually get connected with my ubuntu vnc server by running this script from the client:

#!/bin/sh

ssh -f -L 5900:localhost:5900 fabusernameio@<server-IP> \
        x11vnc -safer -noxdamage -ncache 10 -localhost -nopw -once -display :0 \
        && sleep 5 \
        && vncviewer localhost:0
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
rindi

First of all, Ubuntu server by default doesn't have a GUI installed, and it doesn't need one, so why are you trying to use VNC on it? You should be able to manage everything directly through SSH in a terminal. If there are X based apps on the Server, just install X on your local PC (or if you are using a Windoze box start xming and login via SSH using putty), and you will be able to start those X Apps on your local PC without needing the complete GUI on the server.
ASKER CERTIFIED SOLUTION
TobiasHolm

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Fabio Marzocca

Tobias, yes it is what my script does.
systemsautomation

ASKER
I want to install virtual box on the server which is hosted somewhere. If I open vbox at my machine using ssh -X I have to keep the connection always open to keep vbox running. I will not be able to turn off my machine or otherwise the VMs running will also go down.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
TobiasHolm

Did you get your VNC up'n running to your server?

I think the VirtualBox is another question?

If you install VirtualBox on your server you should be able to run virtual machines there without connection from your client.

Regards, Tobias
systemsautomation

ASKER
tobias thanks for your help. I will try your solution in awhile and let you know. My earlier reply was to answer rindi's question.
TobiasHolm

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
taym78

I would forget about VNC and run NX (by nomachine).  It is a better option that is very secure and much faster (even over slower networks or the internet).  You can download load it from their website.  It's fairly simple for a basic setup.  It can get a little more complex when you generate your own encryption keys to secure your sessions.  Over a remote connection, like the internet, I've have never seen a program that is faster than NX.  Their compression algorithms can't be matched.
taym78

Oops that didn't take that link right. It's at NoMacnine.com.