VNC running on Ubuntu

Hi All,
I’m trying to run VNC on Ubuntu distribution.
I just installed the VNC server by means of apt-get install x11vnc and everything worked fine.
When I try to start the VNC server I get some error messages:

15/09/2013 09:15:28 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 2024
15/09/2013 09:15:28 XOpenDisplay("") failed.
15/09/2013 09:15:28 Trying again with XAUTHLOCALHOSTNAME=localhost …
15/09/2013 09:15:28
15/09/2013 09:15:28 *** XOpenDisplay failed. No -display or DISPLAY.

Can someone help me?

Thanks,

Vince

Can you let people know which board you are using?

Gerald

Sorry for missing info... I just received a BBB, I'm a newbie. Thanks

You'll have to run x11vnc with the user that is currently running X,
e.g., use sudo -u USERNAME -i for that or you can run x11vnc as root if
you prefer.
Alternatively you can pass the xauth option or set the XAUTHORITY
environment variable and point to the right place

pgrep -l -f -- -auth

then
x11vnc -auth BLA

BLA is what the pgrep command will give you, look for the parameter
after the X -auth

You can also use x11vnc -findauth , check the x11vnc manual page for
more details:

man x11vnc

cheers,
Nuno

- --
http://aeminium.org/nuno/

Hi Nuno and thanks for reply.
I figured out I had to install Xvfb and I did it.
Then I tried the following:
x11vnc -usepw -display :0 -create

Currently I can log with a VNC client but I get only a black screen with a shell window open in it and the mouse cursor.
No desktop, no icons,…
any idea?

Thanks again

I was facing the same issue, but I solved it with setting the Xauth and DISPLAY varialbles accordingly to the display manager I was using. For LXDE it was something like:

ubuntu@ubuntu-armhf:~$ export XAUTHORITY=‘ls /var/run/lxdm/lxdm-:0.auth’

ubuntu@ubuntu-armhf:~$ export DISPLAY=:0.0

And then I was able to launch lxde

ubuntu@ubuntu-armhf:~$ startlxde

Hi Leo,
did you install LXDE separately?
I don’t have it default in my distribution.

Thanks

libvncserver have the example of android vncserver .
I modified it for iMX6 board .
You can try

fbvncserver.c (15.3 KB)

Sure. In the Angstrom distro there is GNOME installed as default and therefore the parameters look slightly different. I think the whole issue depends on which dm (display manager) you have installed.

But to be honest: I’m far apart from being an expert. The response is honored the fact I was facing the same error you described.

Hi all,
I’m having similar problem with BBB (rev A5B).
It’s running Debian 8 from official beagle bone black image.
I’ve installed x11vnc package using apt-get and it gives me the same info as for Vincenzo Cacciatore (…XOpenDisplay failed. No -display or DISPLAY…)
pgrep -l -f – -auth command returns nothing.

x11vnc -findauth returns xauth: not found

I was logged as root.

I did never attached external screen (over HDMI) to this board so I’m not sure if GUI is there.

Can anyone help please?

regards,
Kuba

W dniu niedziela, 15 września 2013 18:15:07 UTC+2 użytkownik Nuno napisał:

Kuba, you have to install lightdm, then start the server with:

sudo x11vnc -auth /var/run/lightdm/root/:0 -display :0 .forever

W dniu poniedziałek, 4 stycznia 2016 13:37:59 UTC+1 użytkownik ja.q...@gmail.com napisał:

Hi,
thank you very much for your response.
It does not says “XOpenDisplay failed” any more.
I’m able to make a connection with my BBB board.
Unfortunately I have another issue that I can’t get rid of.

The screen that shows up is without anything (status bar, clock, start etc.). The only thing I can do is a right click to show context menu. There I can choose from couple of commands like run terminal, switch monitors or run web browser. And those works - I can run the terminal or view web pages. However I can’t get to e.g. file browser.
It’s the same when I run x11vnc and tightvnc.
I’ve went through couple of examples from the web and proposition of solving similar problems. Nothing worked.

Could this be somehow connected to “headless” debian installation (the monitor was never attached)?

regards,
Kuba

Almost certainly yes. X11 is just a display server: it's ready to
display windows for X11 applications, but visible windows are only
showing up because someone, somehow started running an X11
application. As you discovered, you can run those applications by hand
(by the way, file browser may be provided by application 'nautilus',
or several others---I am not sure which one is provided on your
system).
More importantly, there usually is an application that orchestrates
windows on an X11 display---it's a combination of a X11 session
manager and window manager. You can run it by hand just like a regular
application---try one of twm, fvwm, xfwm, lwm (again, they may or may
not be installed on your system, so you may need to use apt-get to
install some). Most window managers will have a way to start
applications by mousing/clicking around, either via clickable icons or
menus.