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

Error: X11 #103

Open
dennisangemi opened this issue Mar 10, 2023 · 2 comments
Open

Error: X11 #103

dennisangemi opened this issue Mar 10, 2023 · 2 comments
Labels
multiplatform Multiplatform compatibility type/bug 🐛 Something isn't working what/toolkit/notebook Related to the native graphics toolkits

Comments

@dennisangemi
Copy link

  • xeus-octave version: 3.0.5
  • Operating System: WSL on Windows11

Description

I've tried to plot data but the kernel died

fatal: caught signal Segmentation fault -- stopping myself...

and from terminal I got:

GLFW Error: X11: The DISPLAY environment variable is missing (65544)
Cannot initialize GLFW
Run with XEUS 3.0.5

Could you help me? Thanks!

@rapgenic
Copy link
Collaborator

This is due to xeus-octave needing X11 to run. I think you have two possibilities here:

  1. Install xvfb-run (virtual X11 implementation) and use it to run jupyter:

    $ sudo apt update
    $ sudo apt install xvfb
    $ xvfb-run jupyter lab  # or xvfb-run [whatever command you're using]
  2. Enable X11 in WSL, see https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps for example. This is in my opinion the "cleaner" route, but I have never tried it as I don't use WSL.

@rapgenic rapgenic added type/bug 🐛 Something isn't working what/toolkit/notebook Related to the native graphics toolkits multiplatform Multiplatform compatibility labels Mar 10, 2023
@dennisangemi
Copy link
Author

dennisangemi commented Mar 10, 2023

Grazie Giulio!

I followed https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps#install-x11-apps

sudo apt install x11-apps -y

but nothing changed.

So I tried

Install xvfb-run (virtual X11 implementation) and use it to run jupyter:

$ sudo apt update
$ sudo apt install xvfb
$ xvfb-run jupyter lab  # or xvfb-run [whatever command you're using]

and now:

  • ✅ the kernel doesn't die
  • ✅ I no longer get any X11 errors
  • ❌ I can't see the plot :|

Thanks again for your time ;)

Addendum:

  • I noticed that if I run (for example) plot(x,y) when notebook is "Not trusted" and then I switch to "Trusted", the plot magically appears... This procedure works only one time lol
  • From File > Print preview I can see all the plots correctly ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multiplatform Multiplatform compatibility type/bug 🐛 Something isn't working what/toolkit/notebook Related to the native graphics toolkits
Projects
None yet
Development

No branches or pull requests

2 participants