Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jupyter: Add virtual framebuffer X server dependency #1827

Merged
merged 2 commits into from
Aug 29, 2021

Conversation

wenzeslaus
Copy link
Member

@wenzeslaus wenzeslaus commented Aug 27, 2021

  • Add xvfb (virtual framebuffer X server) as a dependency to Binder apt file be able to run m.nviz.image from notebooks on Binder.
  • Sort entries in the apt file.

Running m.nviz.image in Binder still requires a standard headless machine setup, i.e., xvfb-run or Xvfb :5 -screen followed by export DISPLAY (although simple Xvfb in background does not work in Jupyter). In any case, the setup of the environment is now possible.

* Add xvfb (virtual framebuffer X server) as a dependency to Binder apt file be able to run m.nviz.image from notebooks on Binder.
* Sort entries in the apt file.

Running m.nviz.image in Binder still requires a standard headless machine setup, i.e., Xvfb :5 -screen followed by export DISPLAY,
however the setup of the environment is possible.
@wenzeslaus
Copy link
Member Author

Can be tested in Binder with (Python):

with Display(size=(1000, 1500)):
    !m.nviz.image elevation_map=elevation -a mode=fine resolution_fine=6 color_map=elevation position=0.84,0.16 perspective=20 twist=0 zexag=10.000000 focus=7519,6792,105 bgcolor=255:255:255 light_position=0.68,-0.68,0.80 light_brightness=80 light_ambient=20 light_color=255:255:255 output=nviz_output format=tif size=1000,1500

or with (command line only):

xvfb-run m.nviz.image elevation_map=elevation -a mode=fine resolution_fine=6 color_map=elevation position=0.84,0.16 height=807 perspective=20 twist=0 zexag=10.000000 focus=7519,6792,105 bgcolor=255:255:255 light_position=0.68,-0.68,0.80 light_brightness=80 light_ambient=20 light_color=255:255:255 output=nviz_output format=ppm size=823,487

@wenzeslaus wenzeslaus added the enhancement New feature or request label Aug 27, 2021
@wenzeslaus wenzeslaus merged commit f4f6285 into OSGeo:main Aug 29, 2021
@wenzeslaus wenzeslaus deleted the bg-display-dep-for-binder branch August 29, 2021 19:26
lindakarlovska pushed a commit to lindakarlovska/grass that referenced this pull request Sep 6, 2021
* Add xvfb (virtual framebuffer X server) as a dependency to Binder apt file be able to run m.nviz.image from
  notebooks on Binder. This requires xvfb-run or a Xvfb command to run.
* Add PyVirtualDisplay as a Python interface to Xvfb.
* Sort entries in the apt and requirements files.
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
* Add xvfb (virtual framebuffer X server) as a dependency to Binder apt file be able to run m.nviz.image from
  notebooks on Binder. This requires xvfb-run or a Xvfb command to run.
* Add PyVirtualDisplay as a Python interface to Xvfb.
* Sort entries in the apt and requirements files.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
* Add xvfb (virtual framebuffer X server) as a dependency to Binder apt file be able to run m.nviz.image from
  notebooks on Binder. This requires xvfb-run or a Xvfb command to run.
* Add PyVirtualDisplay as a Python interface to Xvfb.
* Sort entries in the apt and requirements files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants