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

Support running without X11 or Wayland on Linux #912

Open
wez opened this issue Jun 30, 2021 · 4 comments
Open

Support running without X11 or Wayland on Linux #912

wez opened this issue Jun 30, 2021 · 4 comments
Labels
enhancement New feature or request Linux Issue applies to Linux

Comments

@wez
Copy link
Owner

wez commented Jun 30, 2021

I've been thinking that it would be cool to run directly in the linux virtual console/framebuffer without needing to start either an X or Wayland server, but didn't really have a use-case to justify it... until now!

There's an accessibility angle; the Slint linux distribution is an accessible-to-the-visually impaired distribution looking for a more accessible terminal for the installation process. WezTerm doesn't currently have an accessibility story (see #913), but when it does, being able to run without X/Wayland and have support for low vision or blind users would help with the installation story.

What do we need to support running without X/Wayland? From my brief research:

  • MESA EGL has an extension that works with GBM
  • Rust has a GBM crate
  • Those two things should allow wezterm's EGL support to target a virtual console for output
  • Need to add support for that to our window crate. The GBM variant will likely also need to support directly reading keyboard and mouse input from the underlying devices. Can likely crib from my evremap project for that.
@wez wez added enhancement New feature or request Linux Issue applies to Linux labels Jun 30, 2021
@ghost
Copy link

ghost commented Jul 25, 2021

Two points:

  • This issue is for becoming your own framebuffer terminal ala fbterm or yaft. What about raw text output, e.g. ECMA48-style TERM=linux backend? Any interest? Or is that already possible?
  • If you were to handle GPM mouse and convert it to X10 mouse protocol, then wezterm would be one of AFAIK only 2 terminals that can do that: fbterm (allegedly since 1.7.0-6, haven't tested it) and lcxterm/qodem. That could be handy for people who want their mouse to work over ssh.

@wez
Copy link
Owner Author

wez commented Jul 26, 2021

What about raw text output, e.g. ECMA48-style TERM=linux backend? Any interest? Or is that already possible?

I'm not sure what you mean by this; sounds sort of like a TUI-only frontend (tmux-ish?)

@ghost
Copy link

ghost commented Jul 26, 2021

It seems that what you call frontend I call backend, but yes. So a VGA+keyboard or even serial port console would be able to run wezterm and gain a long persistent scrollback, better unicode support (even if not all of it could be displayed), custom keyboard bindings, mouse support over ssh, and so on.

@wez
Copy link
Owner Author

wez commented Jul 26, 2021

FWIW, you can use wezterm serial /dev/ttyUSB0 --baud 115200 for serial consoles; was using that yesterday to configure a router!

I have mixed feelings about doing a text front-end; I think the main value in wezterm is presenting with native gui features and nice fonts. Running directly on a framebuffer will result in a more restricted feature set though, so perhaps by the time that's a thing it won't be much of a stretch to do the text front-end anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Linux Issue applies to Linux
Projects
None yet
Development

No branches or pull requests

1 participant