Live data from Hacker News

An X11 apologist tries Wayland

artemis.sh

151–160 of 453 posts

Re: An X11 apologist tries Wayland

#151

I've tried to use Sway a number of times, and the biggest reason I keep bouncing off it is environment variables. There's a bunch of environment variables I want set for every process in my desktop session, from basic things like $EDITOR and $LD_LIBRARY_PATH to more complex things like $MOZ_USE_XINPUT2 or $SSH_AUTH_SOCK. When I use i3 under X11, gdm runs my ~/.profile script so I get all my standard login environment…

When you 'exec sway' it inherits the tty env vars... So just stuff your vars into whatever .profile the tty loads when you login after boot. This has never been a problem I spent any amount of time on. If you are doing something magical like auto starting sway or something, then you need to make sure that a .profile is loaded by whatever is starting sway if it doesn't inherit a .profile.

I have pretty much always been in the "log in on console, then startx" camp but I suspect you and I are a vanishingly small minority these days.

Re: An X11 apologist tries Wayland

#152
post #150

Earlier quoted context omitted.

What percent of Linux users do you think would ever use software this way? What percent of all "desktop" OS users would ever use software this way? It seems like an extremely niche and rare use case and probably not the right thing to target for the main desktop environment. I've been using Linux as my main OS for ~12 years now. I have personally never wanted to do anything like that. For remote software, I would pre…

X-forwarding (over ssh, or directly like this person is doing) is extremely useful and powerful. I use it this way, and I know plenty of people that do too. On top of that, wayland doesn't solve any problems that I have, so there's your data point.

Sure, but my guess is that <1% of Linux users currently use X forwarding, and probably <0.01% of desktop OS users would ever want something like this. It's a cool feature that should exist, but rare enough that it doesn't need to be fundamental to desktop architecture.

Re: An X11 apologist tries Wayland

#153
> The effort you need to go through to actually use these depends on how your distribution handles the file permissions of /dev/uinput. Some of them have it as root:input, in which case you just need to usermod -a -G input and then relog to get it working. Others have it as root:root so you either need to go do some reconfigurations to change its permissions or live with running the software using it as root.

There's a trick to that. The TL;DR is "install the steam-devices package or similar" (https://github.com/ValveSoftware/steam-devices/), which adds the following udev rule (and others, but this is the relevant one):

  # Steam Controller udev write access
  KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"
This does some udev magic to add an ACL to /dev/uinput allowing the currently logged in user to write to it. Its effect will be something like:

  $ getfacl /dev/uinput 
  getfacl: Removing leading '/' from absolute path names
  # file: dev/uinput
  # owner: root
  # group: root
  user::rw-
  user:cesarb:rw-
  group::---
  mask::rw-
  other::---
The reason Steam has that udev rule is for something really cool called Steam Link, which allows you to use your Android phone, through your local network, as if it were a joystick for your computer. For some games (and its own user interface, which switches to a simplified "big picture" mode when you connect that emulated joystick) it does it directly without going through /dev/uinput, but for other games (which read the joystick input directly, without going through the Steam libraries) it sends the emulated input through /dev/uinput.

Re: An X11 apologist tries Wayland

#154

From https://wiki.ubuntu.com/Wayland "The X11 protocol was designed around running graphical apps across the network. While some people use this feature, it's far from common. Wayland drops this requirement as a way to greatly simplify its architecture." X client and server are usually the same machine, but they don't have to be. While on the road, you can use your notebook to open a Gimp session on your home machine…

On the other hand, this works increasingly poorly as most desktop environments and software assumes there is no network involved (for example, last time I tried running Firefox over a forwarded X session I got a bunch of errors about a broken GL context). And you can do the same thing, with usually better results, by using VNC instead (and there are indeed VNC servers for Wayland, for example wayvnc).

Just had to use Firefox remotely (to use WeTransfer to ship a giant file, they dropped support for their cli, grr), and had exactly this issue - it works incredibly slowly over X over SSH. In the end had to use vnc over SSH.

(Note that tightvncserver seems to silently ignore the -localhost option now, which means it's completely insecure to run on an internet connected machine. Tigervnc still has the option)

Re: An X11 apologist tries Wayland

#155
post #68
post #7

I recently tried switching to Linux with a few different distro's (Ubuntu, Elementary OS, etc.) and use Wayland. The thing that sticks out like a sore thumb to me, and which I've been unable to solve, is that apparently it's not possible to configure trackpad scroll speed. At all. From what I was able to gather, Wayland/libinput say they shouldn't be responsible for handling it and instead window managers should[0][1…

Wayland is not GNOME, what you describe is not Wayland problem, but GNOME problem. It's possible in both KDE and Sway. GNOME is probably worst DE imaginable. After 20 years, they still don't have thumbnails in filepicker and even dropped preview side pane in GTK4. I can't even.

No it's not possible in a newer LTS (> 20.04, don't have laptop on hand) Ubuntu KDE. There's no scroll speed configuration, as sibling comments discuss. Switching driver to libinput or whatever made it configurable, but other bugs popped up, and suddenly every accidental palm touch sent my cursor clicking somewhere.

Re: An X11 apologist tries Wayland

#156

From https://wiki.ubuntu.com/Wayland "The X11 protocol was designed around running graphical apps across the network. While some people use this feature, it's far from common. Wayland drops this requirement as a way to greatly simplify its architecture." X client and server are usually the same machine, but they don't have to be. While on the road, you can use your notebook to open a Gimp session on your home machine…

I used to use X11's network transparency features a lot in college[0], but it's been a good 20 years and I haven't used it since -- even once.

I, too, am not comfortable with throwing away such a potentially useful feature (though I believe there's a wayland "protocol" or something that allows for network transparency now), but I personally don't have a need for it.

[0] One of our VLSI design labs was a FreeBSD lab, and the machines there had a bunch of proprietary/paid simulation software on them. It was amazing to be able to ssh in from my dorm room, and run those apps "locally", with access to all my files on the network share. A few of my classmates wondered why I never pulled all-nighters in the lab with them... I never needed to! They all ran Windows at home; back then it was pretty difficult (or at least just kinda unknown) to run an X server on Windows.

Re: An X11 apologist tries Wayland

#157

I've tried to use Sway a number of times, and the biggest reason I keep bouncing off it is environment variables. There's a bunch of environment variables I want set for every process in my desktop session, from basic things like $EDITOR and $LD_LIBRARY_PATH to more complex things like $MOZ_USE_XINPUT2 or $SSH_AUTH_SOCK. When I use i3 under X11, gdm runs my ~/.profile script so I get all my standard login environment…

> With Wayland/Sway, none of this works. gdm does not execute ~/.profile, and there's no equivalent to ~/.xsession. Something starts a user-level systemd instance, but its environment variables aren't synced to the compositor, and the compositor doesn't use it to start apps, so $SSH_AUTH_SOCK isn't available in anything I care about.

This probably won't help you, since you say the compositor isn't using the user-level systemd instance to start apps, but in case it helps someone else: I recently faced a similar problem at work (I needed to set the DOCKER environment variable so that unit tests running directly from the IDE could find the podman socket from the user-level podman.socket systemd unit), and solved it by creating a file under ~/.config/environment.d (https://www.freedesktop.org/software/systemd/man/environment...).

Re: An X11 apologist tries Wayland

#158

From https://wiki.ubuntu.com/Wayland "The X11 protocol was designed around running graphical apps across the network. While some people use this feature, it's far from common. Wayland drops this requirement as a way to greatly simplify its architecture." X client and server are usually the same machine, but they don't have to be. While on the road, you can use your notebook to open a Gimp session on your home machine…

You can also use Gimp via a RDP or VNC session, which will give much better performance on low-bandwidth connections, since those protocols do damage detection, only sending updates of what's changed, and (lossy) compression. I'm not an expert, but my understanding is that the whole X11 is network transparent thing worked great when apps used the X11 drawing primitives. These days a significant number of X11 apps jus…

Editing my photos over a layer of video compression artifacts doesn't sound fun. Web apps are a more reasonable replacement for X11, with browser client much more capable to do low latency local processing. The only problem is lack of easy support for local apps and LAN-distributed apps. Probably still easier to add than to support low input latency eventually consistant Canvas over X11 or VNC.

Re: An X11 apologist tries Wayland

#159
post #142
post #82

The pet peeve of mine is lack of subpixel rendering: if you move from X to Wayland, it's hard to get used to fuzzy fonts. Then again, recent MacOS versions have also dropped it, and I couldn't stand fuzzy fonts either (and so much for their screens being "retina" screens). At least this is coming to Wayland :)

Wait, what? Longtime Wayland hater here and I literally thought this was one of the things I could expect Wayland to be better at.

In order to do subpixel font rendering correctly, the application needs to know about the subpixel arrangement of the display hardware. So it falls under the same category as things like color management, which Wayland also doesn't support; they just didn't standardize an API to provide that information.

Re: An X11 apologist tries Wayland

#160

Is there a single Wayland supporter who finds the user experience to be better than X11? Because my understanding of Wayland is that the only people who want it are gui devs.

>Is there a single Wayland supporter who finds the user experience to be better than X11?

The immediately noticeable improvement with wayland is with respect to screen tearing, especially in multi-monitor rotated configurations. Screen tearing has always been an issue on x11, and while intel/amd drivers do a decent job in basic cases, things that don't work will likely never work given that x11 is mostly deprecated.

Post reply on HN