"X11GRABBER ERROR: Unable to open display. DISPLAY environment variable not set"

  • Hi All,


    I'm trying to get ambilight with Hyperion working on my XBMCbuntu setup. I got WS2812b leds , an Arduino Uno, and it works ....well...sort of...
    To test and try I have been able to get it all working on my laptop, Works great.
    Now I want to use it on the real thing, and I have everything set, but I can't get the leds to work, because of the following message : "X11GRABBER ERROR: Unable to open display. DISPLAY environment variable not set"


    Code
    xbmc@xbmc:~$ export DISPLAY=:0.0
    xbmc@xbmc:~$ hyperion-x11
    hyperion-x11:
            version   : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
            build time: Jul 25 2016 06:54:05
    X11GRABBER ERROR: Unable to open display. DISPLAY environment variable not set


    I have tried to set the DISPLAY variable , and the hyperion-x11 then starts.........

    Code
    xbmc@xbmc:~$ hyperion-x11
    hyperion-x11:
            version   : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
            build time: Jul 25 2016 06:54:05
    PROTOCONNECTION INFO: Connecting to Hyperion: 127.0.0.1:19445
    X11GRABBER INFO: Update of screen resolution: [0x0] => [1920x1080]
    X11GRABBER INFO: Using XRender for grabbing
    PROTOCONNECTION INFO: Connected to Hyperion: 127.0.0.1:19445


    .......but I think The DISPLAY variable needs to be set at boottime, but for the love of god, I have no idea how to do that...


    I have been google-ing for quite some time now, but I can't seem to find anything. Can someone please give me a nudge in the right direction?

  • OK, got it working now.


    Maybe some one has the same issue as I did , so I will sum up the things I did to get it working.
    I have Xbmcbuntu (Kodibuntu nowadays) installed with LightDM as window manager. It boots directly to Kodi.


    I have bought WS2812b leds and I used 64 leds horizontaly and 39 leds verticaly on my 46" tv. (206 leds in total)


    I installed the Hyperion software as per wiki :

    Code
    curl -k -L --output install_hyperion.sh --get https://raw.githubusercontent.com/hyperion-project/hyperion/master/bin/install_hyperion.sh
    chmod +x install_hyperion.sh
    sudo sh ./install_hyperion.sh


    The problem then was that I could not start hyperion-X11 due to the fact that the was no DISPLAY variable defined. On my laptop it worked almost straight away, but in Xbmcbuntu the DISPLAY variable is not set for some reason.


    To set this variable at boot I added the following line to the /etc/environment file :

    Code
    DISPLAY=:0.0


    Then I created a file in the xbmc user home directory called .xsessionrc to start the hyperion-x11 grabber (in the background) with the following content :

    Code
    /usr/bin/hyperion-x11 &


    The make sure your Arduino sketch has the same serialrate as the hyperion.config.json I used 460800. I had to add a delayAfterConnect value of 1500 to the hyperion.config.json file in order to make it work correctly.


    My hyperion.config.json file looks like this :


    and my sketch looks like this :


    I hope this helps someone sometime... ;)
    Thanks for hyperion, it looks marvelous!!


    Regards,
    Jerry

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!