|
|
Subscribe / Log in / New account

An X11 Apologist Tries Wayland (artemis.sh)

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 19, 2022 10:16 UTC (Mon) by q3cpma (subscriber, #120859)
In reply to: An X11 Apologist Tries Wayland (artemis.sh) by taladar
Parent article: An X11 Apologist Tries Wayland (artemis.sh)

Yeah, same here, I've had to make a prospective list before deciding the switch is too painful for now:
* bspwm: https://github.com/riverwm/river + https://github.com/jonbkei/riverbsp ?
* sxhkd: https://github.com/waycrate/swhkd until there's a dedicated protocol (https://gitlab.freedesktop.org/wayland/wayland-protocols/...)
* dmenu: nothing as light, as expected from Wayland, but https://github.com/Cloudef/bemenu or https://codeberg.org/dnkl/fuzzel is probably the best choice
* lemonbar: no replacement that is as hacker-friendly, https://codeberg.org/dnkl/yambar is the only one that doesn't depend on GTK; probably my biggest gripe
* st: https://github.com/michaelforney/st and https://github.com/majestrate/wterm are dead (so is wld), the only sane and "light" choice is https://codeberg.org/dnkl/foot/; otherwise it's all "GPU-accelerated" Rust contraptions with Node-tier dependency trees, VTE stuff or Kitty made by a someone who refuses patches to allow bitmap fonts
* sxiv: imv is better designed, but FreeImage is a dumpster fire that's also a security disaster just waiting to happen and imv lacks too much format support without it (e.g. Webp, netpbm, TGA, etc...); I may write more backends if I get the time, one day (heh)
* mupdf: Zathura as a mupdf frontend works, but I'd prefer pure mupdf, personally
* emacs: forced to use the GTK frontend instead of the perfect and lightweight athena/Xaw one
* Nyxt: I think it's okay, since it uses webkit-gtk-2
* Tk, McCLIM and countless other tookits away from the GTK/Qt hegemony: dead

Some other websites I found very useful about this:
https://arewewaylandyet.com/
https://hacktivis.me/notes/pure-wayland.shtml


to post comments

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 19, 2022 10:42 UTC (Mon) by rsidd (subscriber, #2582) [Link] (5 responses)

Any x11 application should work fine under xwayland, including mupdf, the athena version of emacs, your favourite x11 terminal, tk-based programs, etc.

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 20, 2022 0:19 UTC (Tue) by q3cpma (subscriber, #120859) [Link] (3 responses)

Well, one of the reasons for these preferences (mupdf vs Zathura, athena vs GTK, st vs *) is lightweightness. Are they still lightweight with an (admittedly stripped down) X11 server for each instance?

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 20, 2022 0:36 UTC (Tue) by rsidd (subscriber, #2582) [Link]

On my machine Xwayland uses a negligible amount of resources, and X11 applications run just as well as they do under Xorg. I think it is far more lightweight than a full-fledged Xorg setup.

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 20, 2022 3:13 UTC (Tue) by pabs (subscriber, #43278) [Link] (1 responses)

All X11 apps share an XWayland process btw, so they aren't isolated from each other.

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 20, 2022 7:08 UTC (Tue) by abo (subscriber, #77288) [Link]

It would be be possible to separate apps into distinct X servers, which I guess would be beneficial for security, but these X servers also need window managers, and (iirc, iiuc) currently at least GNOME (on Wayland) is only able to act as a window manager for one X server.

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 20, 2022 3:12 UTC (Tue) by pabs (subscriber, #43278) [Link]

Not all of them do though. For example I can't click on dungeon tiles in X NetHack under GNOME Wayland and Chromium BSU is all kinds of busted under GNOME Wayland unless you force SDL into Wayland mode and even then there are bugs.

https://bugs.debian.org/897980

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 19, 2022 11:23 UTC (Mon) by nix (subscriber, #2304) [Link] (6 responses)

otherwise it's all "GPU-accelerated" Rust contraptions with Node-tier dependency trees, VTE stuff or Kitty made by a someone who refuses patches to allow bitmap fonts
Presumably the latter part is code for "only uses Fontconfig, and recent Fontconfig has dropped bitmap font support"? It turns out... it hasn't! What has actually happened is that support for Type 1 and X bitmap fonts is gone (which is very annoying if like me you have a huge library of them), but OpenType can represent bitmap fonts fine and everything can still render those, and FontForge can convert the former into the latter. There just aren't many of them yet. I should try making an OTF wrapping jmk-neep one of these days, because many of these newer terminals are seriously amazing to use.

Most of them have hotkey-driven tabbing and splitting (a la terminator), large-scale layout restoration (just what you need if like me you have a dozen terminals you want instantiated on different virtual desktops every time you start up); all the VTE ones at least have infinite-length scrollback (via a compressed, encrypted, unlinked file in /tmp, so it's pretty safe from info leakage as these things go), and the GPU-acceleration means screen refresh even on high-res displays is instantaneous and it scrolls in an unreadable flashing blur, which is surely what everyone really needs from a terminal emulator? (What do you mean you can't read a screen that's only displayed for 7ms?). And most of them have (unlike in days of yore) actually paid attention to the specs and (more importantly) what xterm does, and tried to implement a terminal that doesn't get things gratuitously wrong.

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 19, 2022 11:34 UTC (Mon) by q3cpma (subscriber, #120859) [Link] (5 responses)

>Presumably the latter part is code for "only uses Fontconfig, and recent Fontconfig has dropped bitmap font support"
No, it rejects font with the scalable property.
cf https://github.com/kovidgoyal/kitty/issues/97#issuecommen...

>Most of them have hotkey-driven tabbing...
I'm a suckless kind of guy, I like simple code and clean separation of roles (e.g. don't include tmux in your terminal emulator). I did use the word "contraption", after all; "usine à gaz" in french also fits.

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 19, 2022 17:33 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

> e.g. don't include tmux in your terminal emulator

How would you implement true scrollback in tmux without terminal-level support?

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 20, 2022 0:12 UTC (Tue) by q3cpma (subscriber, #120859) [Link]

Your question makes sense, but in that case, I'd still say tiling is the responsibility of the WM, not the terminal emulator; and tabbing or Quake-style dropping down too, as it's still "window management", to me.

But some features like keyboard input multiplexed to a group of windows (terminator) is unheard of in any WM to me. Maybe could be done in some very hacker-friendly ones like stumpwm or using http://hea-www.harvard.edu/~fine/Tech/xlax.html (I love those obscure and/or magic X11 including xdo, xdotool, wmctrl, wmutils, etc...).

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 19, 2022 17:53 UTC (Mon) by nyanpasu64 (guest, #135579) [Link] (2 responses)

It would be cool to have "tmux as an API" that allows me to open one SSH connection to a server, send multiple virtual terminals of data through SSH over a semantic protocol (rather than as presentational VT100 control codes), and display them in a tiling GUI with console-native mouse-based selections constrained within one column of the screen, and pixel-precise scrollbars (neither of which is possible in tmux to my knowledge).

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 19, 2022 21:07 UTC (Mon) by erincandescent (subscriber, #141058) [Link] (1 responses)

SSH already has a feature enabling connection reuse. Add something like
Host *
  ControlMaster auto
  ControlPath ~/.ssh/master-%r@%n:%p
  ControlPersist 1m
to your ~/.ssh/config

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 20, 2022 7:42 UTC (Tue) by taladar (subscriber, #68407) [Link]

The downside with ControlMaster is that at one point your ControlMaster connection might stall and then any ssh call in any script that is currently running using SSH will just hang instead of opening a new connection.

Tk backend for Wayland

Posted Sep 19, 2022 15:08 UTC (Mon) by stephen.pollei (subscriber, #125364) [Link] (3 responses)

Tk has backend for windows, mac, and X11. Seems like they could add a native Wayland backend as well. Likely a bit of work to be sure.

Tk backend for Wayland

Posted Sep 19, 2022 21:24 UTC (Mon) by dskoll (subscriber, #1630) [Link]

The last time I looked (which admittedly was a very long time ago) Tk's Windows back-end implemented compatibility code that made it "look like" Xlib calls to the rest of Tk. I guess this solution could work with Wayland too, and probably wouldn't require a ton of code.

Tk backend for Wayland

Posted Sep 20, 2022 1:22 UTC (Tue) by raven667 (subscriber, #5198) [Link] (1 responses)

If someone wanted to work on it they could, it might be a fun project and wouldn't hurt, but what would be the technical benefit over using Xwayand, indefinitely? Is it going to make any substantial difference in the capabilities of Tk application performance, compatibility or maintainability to use Xwayland as the compat layer for Xlib?

Tk backend for Wayland

Posted Sep 20, 2022 8:10 UTC (Tue) by gspr (subscriber, #91542) [Link]

XWayland doesn't have the same scaling capabilities as Wayland. If you use such scaling, your XWayland windows may look terrible compared to your native Wayland ones.

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 19, 2022 16:54 UTC (Mon) by anarcat (subscriber, #66354) [Link] (1 responses)

* sxiv: imv is better designed, but FreeImage is a dumpster fire that's also a security disaster just waiting to happen and imv lacks too much format support without it (e.g. Webp, netpbm, TGA, etc...); I may write more backends if I get the time, one day (heh)
Could you expand on this? It feels like *all* image renderers (hello libpng and image magick!) are kind of dumpster fires, security wise... but is FreeImage specifically bad in that regard? Asking for a friend looking for wayland alternatives... ;)

An X11 Apologist Tries Wayland (artemis.sh)

Posted Sep 20, 2022 0:01 UTC (Tue) by q3cpma (subscriber, #120859) [Link]

>Could you expand on this?
Massive library bundling + very slow/dead developement (last release 2018).

I'd say that imlib2 looks quite good, now that the developement picked up steam
again. For example, if we compare 1.7.1 (latest in Gentoo) with 1.9.1, we got
XBM, AVIF, HEIF, JPEG XL, SVG, JPEG2000, PS/EPS support and WEBP, ICO, GIF,
(A)PNG, JPEG XL multiframe support.
Just need nsxiv to be adapted, for X11 users.


Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds