Desktop mode version of Openframe

@_fx, our friend Dimitar and I have been working on a version to run Openframe in desktop mode instead of command-line.

This is the first step towards a version for other operating systems like Ubuntu (e.g. running on Electric Objects), and it also enables running Openframe on Raspberry Pi 4 with rotated screen.

This could also have other advantages:

  • Quicker loading times for X server based extensions (like Website or Processing)
  • It’s harder to get locked into command-line for new users who don’t know Linux / Raspberry Pi that well. Less confusion about Openframe not working in desktop mode.
  • Quicker development right on the Pi in desktop mode

Disadvantages may be:

  • Slower in some cases (especially extension not necessarily needing x server) compared to running in the command line. We haven’t tested what the difference in performance it’s really going to make.

We figured the key is to prepare the extensions to also run in desktop mode. It seems like some extensions are working just fine, like the video extension. Extensions based on X server should check if X server is running and skip wrapping the process in an x server template and instead launching the process directly.

We’ve come up with a working version of the website extension: https://github.com/jvolker/Openframe-Website/tree/feature/desktop

To make this work Openframe can be installed just normally running the install script (autoboot disabled) and opening it from a terminal in desktop mode.

Then install the extension running openframe -i github:jvolker/Openframe-Website#feature/desktop

VLC is working too.

Install the updated extension like this: openframe -i github:jvolker/Openframe-VLC#feature/desktop
Use openframe-vlc as artwork format as usual.

Shader and image extensions not working since glslViewer doesn’t compile on latest Raspbian.

Once it compiles again this version of the glslViewer extension should work in desktop mode:

Processing is working too.

Install the updated extension like this: openframe -i github:jvolker/Openframe-Processing#feature/desktop
Use openframe-processing as artwork format as usual.

afraid to kill too much time with Ubuntu, I started trying the Raspian Desktop version in comparison (https://www.raspberrypi.org/downloads/raspberry-pi-desktop/). Still running in VirtualBox on macOS.

So far:

  • VLC mostly works.

    • Ubuntu
      • Command Line: goes black, no error?
      • Desktop: works with new extension
    • Raspian:
      • Command Line: doesn’t scale down videos to screen resolution (default and desktop extension)
      • Desktop: seems to work as expected with the new extension
  • Website

    • Ubuntu: crashes (both desktop and command line, both extensions)
      • Desktop
        • new extension: error message below
        • old extension: Fatal server error: Server is already active for display 0
      • Command Line
        • new extension: error message below
        • old extension: unable to connect to X server: Connection refused
    • Raspian
      • Desktop:
        • new extension: works
        • old extension: Fatal server error: Server is already active for display 0
      • Command Line:
        • new extension: ERROR: browser_main_loop.cc(1512) Unable to open X display
        • old extension: unable to connect to X server: Connection refused

Ubuntu + New Website Extension Error Message:

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/bin/chromium ENOENT
    at exports._errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
  • Processing
    • Ubuntu
      • Desktop
        • new extension: same error message as the website extension above
        • old extension: Fatal server error: Server is already active for display 0
      • Command Line
        • new extension: same error message as the website extension above
        • old extension: unable to connect to X server: Connection refused
    • Raspian
      • Desktop
        • new extension: works
        • old extension: Fatal server error: Server is already active for display 0
      • Command Line
        • new extension: error message below
        • old extension: unable to connect to X server: Connection refused

Raspian + Command Line + New Processing Extension Error Message:

Exception in thread "main" java.lang.ExceptionInInitializerError
…
Caused by java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
…
1 Like

Wow, @_fx thanks for all those tests. I think this looks promising. :raised_hands:

All new extensions (the ones with desktop mode compatibility) ignore console mode compatibility for now. There is no need to cross-test them. It would be the next step to merge both versions. I’m seeing the desktop mode versions more as a proof of concept at this stage. Even though I have to say desktop mode looks really promising and I think it should become the new default. Let’s focus on the desktop mode in this conversation.

To sum your results up:
Raspbian x86 (desktop version) in desktop mode works with all desktop mode extensions you have tested.

I’m going to write about Ubuntu in the Ubuntu topic of this forum.

Again, thanks so much!

glslviewer works for me under Ubuntu as well as Raspian Desktop environments. it just doesn’t go fullscreen but stays windowed…

Great. Could you please try again? I’ve just updated the extension.