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

Need X to run resyntax #124

Closed
samdphillips opened this issue Apr 13, 2021 · 6 comments
Closed

Need X to run resyntax #124

samdphillips opened this issue Apr 13, 2021 · 6 comments
Labels
adoption barrier This makes it harder for people to use or contribute to Resyntax bug Something isn't working

Comments

@samdphillips
Copy link
Contributor

Similar to jeapostrophe/racket-langserver#45

$ resyntax help
Unable to init server: Could not connect: Connection refused
Gtk initialization failed for display ":0"
  context...:
   body of "/usr/local/stow/racket-8.0/share/racket/pkgs/gui-lib/mred/private/wx/gtk/queue.rkt"
   body of "/usr/local/stow/racket-8.0/share/racket/pkgs/gui-lib/mred/private/wx/platform.rkt"
@samdphillips
Copy link
Contributor Author

Seems you are very much aware of this state of affairs...

@jackfirth
Copy link
Owner

Yup, see #37 for some mentions of the problem to myself. Having a canonical issue for it is good though.

@jackfirth jackfirth added the bug Something isn't working label Apr 15, 2021
@jackfirth
Copy link
Owner

In summary: the problem is that Resyntax depends on DrRacket's code indenter which is entangled with the GUI framework. That's the only reason Resyntax needs a display. If we can reimplement that indenter without GUI dependencies, or extract the current implementation out into a GUI-less API, this problem goes away.

@jackfirth jackfirth added the adoption barrier This makes it harder for people to use or contribute to Resyntax label Apr 15, 2021
@jackfirth
Copy link
Owner

jackfirth commented Apr 7, 2022

I think this might be fixable now by making Resyntax use the new syntax coloring APIs, specifically those described in syntax-color/racket-indentation.

@greghendershott
Copy link

As mentioned on that other link, there's the work-around of using xvfb-run resyntax to give it a virtual X device.

(On the one hand, this is just a work-around. On the other hand, it's something that anyone using Racket on a headless server probably will need to learn, eventually -- even if you carefully install minimal Racket, it is easy to install something that indirectly depends on gui-lib and it gets installed.)

@jackfirth
Copy link
Owner

Fixed by #236.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adoption barrier This makes it harder for people to use or contribute to Resyntax bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants