INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Raspberry Pi Headless: cannot get x11vnc working [solved]  (Read 6103 times)

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
Raspberry Pi Headless: cannot get x11vnc working [solved]
« on: May 05, 2015, 06:29:52 am »

Hi,

It has been a long time since I have done anything in the UNIX space so I apologise in advance for my lack of skill and understanding (I was amazed I remembered ps -ef | grep without using google!).  

I recently purchased a Raspberry Pi 2 model B for another project.  Thought I'd install JRiver and get headless working.  I followed the posts from mwillems (http://yabb.jriver.com/interact/index.php?topic=95578.0) and Hilton (http://yabb.jriver.com/interact/index.php?topic=95578.msg666290#msg666290).  Got JRiver installed and working, but having issues with headless.

I'm assuming I've missed or stuffed something.  After following Hilton's post checking for vnc and xrdp, there are no vnc processes running

Code: [Select]
pi@SteveMacPi1 ~ $ sudo netstat -anpt | grep -E "vnc|xrdp"
sudo: unable to resolve host SteveMacPi1
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1919/xrdp
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1933/xrdp-sesman

When I try to start x11vnc I get an error related to display 0

Code: [Select]
pi@SteveMacPi1 ~ $ x11vnc -bg -nevershared -forever -usepw -display :0 -auth guess
05/05/2015 21:23:28 passing arg to libvncserver: -nevershared
05/05/2015 21:23:28 -usepw: found /home/pi/.vnc/passwd
05/05/2015 21:23:28 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 2591
05/05/2015 21:23:28 -auth guess: failed for display=':0'

Any thoughts on how to troubleshoot?

thanks,

Steve



Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Raspberry Pi Headless: cannot get x11vnc working.
« Reply #1 on: May 05, 2015, 08:01:30 am »

A few questions and thoughts:

1) Is this a default NOOBS installation of Raspbian?  Do you have it set to boot into x11/graphical mode in raspi-config?  If not, how are you starting the xserver?

2) How are you trying to start x11vnc?  Via ssh? Serial cable?  Something else?

In whatever context you're trying to start x11vnc, please post the output of the following commands (separately, obviously)
Code: [Select]
echo $DISPLAY
ps -e | grep Xorg
ps -e | grep lx

Shooting in the dark, if I had to guess what the issue is, there's a step missing from Hilton's step by step that he brings up a few posts later.  Specifically, you need to make the following changes to your config.txt for his method to work:

Code: [Select]
This changes console resolution to standard 1080p
framebuffer_width=1920
framebuffer_height=1080

This forces HDMI to 1080p 60hz even with no monitor attached.
Which means if you need to plug it in to a monitor or TV after running in headless mode, it wont be in a minicule unusuable resolution.
BTW you need to boot into gui mode for some of the features to work in headless mode.
hdmi_group=2
hdmi_mode=82

I believe because of the above setting I also need to set this to enable HDMI audio
hdmi_drive=2

The second and third paragraphs in particular are important for successful headless operation if you're using x11vnc (but not for regular VNC operation).

All that said, x11vnc does have a few technical advantages (e.g. binding to a real display allows for hardware graphics acceleration), but it's really much, much easier to use a conventional vncserver (like tightvnc or tigervnc) which create their own virtual displays.  I don't generally mess around with x11vnc on my pi's because I generally don't need the added functionality that binding to the real display offers; if you just need an interactive display to run JRiver on, check out my original headless virtual display method here: http://yabb.jriver.com/interact/index.php?topic=91227.0 .  You've already done almost all of the configuration you need to for my method  ;) 

If you plan to have the pi connected to a monitor and want remote control of the actual display, or need hardware graphics acceleration, then x11vnc is your best choice.  Otherwise, tightvnc will work fine and you can skip all the xauth stuff.
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
Re: Raspberry Pi Headless: cannot get x11vnc working.
« Reply #2 on: May 05, 2015, 08:14:52 am »

A few questions and thoughts:

1) Is this a default NOOBS installation of Raspbian?  Do you have it set to boot into x11/graphical mode in raspi-config?  If not, how are you starting the xserver?


Yes a NOOBS installation

thanks - the bleeding obvious - I hadn't changed the raspi-config to start a graphical interface.  once this was done & rebooted, the process was present & RDP successful

appreciate the help,

Steve
Logged
Pages: [1]   Go Up