linux

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

const_void, in Looking to make the switch

Another day another post about switching on /c/Linux. We need a separate community for all of these blog style posts.

tkk13909,

Shut up and let the non-toxic members of this community take this one.

satanmat, in ELI5 the whole Wayland vs X11 going on.

Okay ELI5

X11 is a win doing system. It is old and has been around for years.

Wayland is a new one.

They both are the core that a gui sits on.

Wayland has some great new stuff but some people don’t like change

answersplease77,

which one is lighter/faster on old laptops?

drndramrndra,

Wayland has some great new stuff but some people don’t like change

More like: it was released 15 years ago and it’s still broken for a lot of people, while x11 is actually working without issues.

vole, (edited ) in Wayland running GUI program as another user
@vole@lemmy.world avatar

I got interested, so I spent some time looking into what’s going on here. I’m not intimately familiar with X11 or Wayland, but I figured out some stuff.

Why sudo ip netns exec protected sudo -u user -i doesn’t work for X11 apps

Short answer: file permissions and abstract unix sockets (which I didn’t know were a thing before now).

File permissions: when I start an X11 login session, the DISPLAY is :0 and /tmp/.X11-unix/ has only 1 file X0. This file has 777 access. When I start my wayland session with Xwayland, the DISPLAY is :1 and /tmp/.X11-unix/ has 2 files X0 (777) and X1 (755). I can’t figure out how to connect to display :0, so I guess I’m stuck with :1. When you change to a different (non-root) user, the user no longer has access to /tmp/.X11-unix/X1.

Abstract unix sockets: When I start my wayland/xwayland session, it creates abstract unix sockets with ids @/tmp/.X11-unix/X0 and @/tmp/.X11-unix/X1. See ss -lnp | grep Xwayland. The network namespace also sandboxes these abstract unix sockets. Compare socat ABSTRACT-CONNECT:/tmp/.X11-unix/X1 STDIN and sudo ip netns exec private socat ABSTRACT-CONNECT:/tmp/.X11-unix/X1 STDIN.

When you do sudo ip netns exec protected su - user, you loose access to both the filesystem unix socket /tmp/.X11-unix/X1 and the abstract unix socket @/tmp/.X11-unix/X1. You need access to one or the other for X11 applications to work.

I tried using socat to forward X1 such that it works in the network namespace… and it kinda works. sudo ip netns exec protected socat ABSTRACT-LISTEN:/tmp/.X11-unix/X1,fork UNIX-CONNECT:/tmp/.X11-unix/X1. It appears having ABSTRACT-LISTEN before UNIX-CONNECT is important, I guess it would be worth it to properly learn socat. With this sudo ip netns exec protected su - testuser -c ‘env DISPLAY=:1 xmessage hi’ works, but sudo ip netns exec protected su - testuser -c ‘env DISPLAY=:1 QT_QPA_PLATFORM=xcb kcalc’ does not work. 😞

Changing the file permissions on /tmp/.X11-unix/X1 to give the user access seems to work better.

Wayland waypipe

Waypipe works as advertised. But it’s still a little bit tricky because you need to have two separate processes for the waypipe client and server, wait for the waypipe socket to be created, adjust file permissions for the waypipe socket file, and set (and probably mkdir) XDG_RUNTIME_DIR.


<span style="color:#323232;">waypipe -s /tmp/mywaypipe client &amp;
</span><span style="color:#323232;">sleep 0.1
</span><span style="color:#323232;">chgrp shared-display /tmp/mywaypipe
</span><span style="color:#323232;">chmod g+w /tmp/mywaypipe
</span><span style="color:#323232;">sudo ip netns exec protected su - testuser -c 'mkdir -p -m 0700 /tmp/runtime-testuser &amp;&amp; env XDG_RUNTIME_DIR=/tmp/runtime-testuser waypipe -s /tmp/mywaypipe server -- env QT_QPA_PLATFORM=wayland kcalc'
</span><span style="color:#323232;">kill -SIGINT %1
</span>

Combined

into this script github.com/…/run-netns-user-wayland.bash

shadowintheday2,

Sir, you’re awesome! Thank you a lot for taking your time and explaining what you have found I will try these steps when I have some free time to tinker, and the info and script you have provided has cleared a lot of questions that I had

Auli, in ELI5 the whole Wayland vs X11 going on.

There is t really a whole thing. Wayland is where Linux is going as the people who developed X11 say it is insecure and it’s to hard to fix the issues so they went and started Wayland. They should have called it X12 or something then there would probably be less complaining.

Corgana,
@Corgana@startrek.website avatar

“X12” got a laugh from me. What I don’t get is that nobody is stopping you from working on X11 if you want, so why complain?

Secret300,

Haha that’s my thoughts exactly. Anyone that complains should go try to maintain x11 so they can understand way development is moving to Wayland. I’m not a dev at all and I don’t understand but I love reading the blog post from devs

LEDZeppelin, in Looking to make the switch

What are people’s experiences with dual booting windows and one of the Linux distros from the same SSD (different partitions) as opposed to having two physically separate SSDs? I unfortunately don’t have another M.2 slot on my mobo

474D,

It’s pretty easy, I installed Mint on my laptop and the installer took care of the partition and everything. On my desktop, I just installed an m.2 expansion slot.

ProgrammingSocks, (edited )

I do this, but you should pre-partition your drives. Shrinking partitions is risky and takes forever. Install Windows first, Linux second and GRUB should take over as the bootloader. This is fixable if you go the other way but you need to be considerably more familiar with bootloaders in general.

skullgiver, (edited ) in Evolve - A brand new GNOME Theme Manager
@skullgiver@popplesburger.hilciferous.nl avatar

deleted_by_author

  • Loading...
  • kzhe,

    GTK4 theming with GUI?

    skullgiver, (edited )
    @skullgiver@popplesburger.hilciferous.nl avatar

    deleted_by_author

  • Loading...
  • kzhe,

    Can confirm GNOME tweaks does not do that. A note stable solution right now (only color theming though) is Gradience.

    jarfil, in ELI5 the whole Wayland vs X11 going on.

    X/X11 is a client-server protocol from the age of 10Mbps networks, intended for a bunch of “dumb terminals” connected to a mainframe that runs the apps, with several “optimizations” that over time have become useless cruft.

    Wayland is a local machine display system, intended for computers capable of running apps on the same machine as the display (aka: about everything for the past 30 years).

    Nowadays, it makes more sense to have a Wayland system (with some RDP app if needed), than an X11 system with a bunch of hacks and cruft that only makes everything slower and harder to maintain. An X11 server app acting as a “dumb terminal”, can still be run on a Wayland system to display X11 client apps if needed.

    PseudoSpock,
    @PseudoSpock@lemmy.dbzer0.com avatar

    RDP is not a replacement for individual remote apps, btw, just saying. RDP is a full remote desktop, like VNC.

    cerement, in ELI5 the whole Wayland vs X11 going on.
    @cerement@slrpnk.net avatar

    unless you are a developer, there’s not a whole lot to worry about – you’ll switch from one to the other when your distro switches and, chances are, you’ll never notice

    the drama comes from the fact that the Linux community loves choices (and arguing over those choices) and, as @skullgiver points out, most of the choices have fallen by the wayside over the years

    tomatenjoghurt, in Wayland/X11 problems with 4K HDMI TV

    Don’t really have an Idea, but to add to your problem…

    I have a 4K TV and 2 1080p Monitors and switching beneath them. Using NVIDIA graphics card with up to date drivers. All I can say, I’ve tried using KDE multiple times now, but always ended up getting weird Bugs, Micro stutter, etc on my 4K TV with KDE. So I always reverted Back to Cinnamon, GNOME, etc, because there it is working fine.

    sxan, in Looking to make the switch
    @sxan@midwest.social avatar

    There are distros that make it easy for non-techies to install and manage Linux, and if you have any computer aptitude at all, it should be pretty easy. The devil is in the details; if all your hardware is well supported, there’s no reason why you should ever have to open a shell. Trouble usually happens with peripherals like printers and some extremely protective vendor chips like Broadcom. In those cases, it’s usually still possible to make things work, but it can require researching, finding, reading how-tos, downloading, compiling and installing software.

    I think 99% of trouble I’ve ever had in the past 20 years has been with printers+scanners or Broadcom chips - they’re very common. I read about people having issues with graphics cards, but that seems to be mainly Nvidia; I’ve only ever had Intel or Radeon, and haven’t had trouble with graphics cards in the past decade or so, myself.

    Anyway, my advice is to do some distro hopping before you settle on one. Boot from a USB stick for a while; it’ll be a bit slower, but it’ll make playing with different desktop environments and distributions easier, before you commit.

    Dekkia, in ELI5 the whole Wayland vs X11 going on.
    @Dekkia@this.doesnotcut.it avatar

    X is old and very hard to maintain. A lot of rules about how displays work have changed drastically since X became a thing. X went along with most of those changes, which meant the introduction of more and more hacks to keep it running.

    Over time X became worse and worse to work on and people realized that it’s easier to write something new from scratch instead of trying to fix the decade-old technical debt in X.

    That new thing was Wayland and over time most if not all people that where interested in working on desktop compositing pivoted away from X.

    Wayland (as it is always the case with new software of that size) didn’t hit the ground running. It had various issues at the beginning and also follows a different desig philosophy than X.

    Despite a lot of issues being fixed some people are still very vocal about not wanting to use wayland for one reason or another. While some of those reasons are valid, most come from ignorance or laziness to adapt.

    nous, in ELI5 the whole Wayland vs X11 going on.

    Applications needs some coordination between each other in order to act like you would expect - things like one window at a time having focus and thus getting all keyboard and mouse inputs. As well as things like positioning on the screen and which screen to render to, the clipboard, and various others things.

    X is a server and set of protocols that applications can implement to allow all this behaviour. X11 is the 11th version of the server and protocols. But X was also first created in 1984, and X11 since around 1987. Small changes have been made to X11 over the years but the last was in 2012.

    Which makes it a very old protocol - and one which is showing its age. Advances in hardware since then and the way we use devices have left a lot to be desired in the protocol and while it has adapted a bit to keep up with modern tech it has not done so in the best of ways. I also believe its codebase is quite complex and hard to work with so changes are hard to do.

    Thus is has quite a lot of limitations that modern systems are rubbing up against - for instance it does not really support multi cursors or input that is not a mouse and keyboard. So things like touch screens or pen/tablets tend to emulate a mouse and thus affect the only pointer X has. It is also not great at touchpads and things like touch pad gestures - while they do work, they are often clunky or not as flexible as some applications need.

    It is also very insecure and has no real security measures in place - any GUI application has far more access to the system and input then it really requires. For instance; any application can screen grab the screen at any point in time - not something you really want when you have a banking web page open.

    Wayland is basically a new set of protocols that takes more modern hardware and security practices in mind. It does the same fundamental job as X11, but without the same limitations X11 has and to fix a lot of the security issues with X.

    One big difference with X though is that Wayland is just a protocol, and not a protocol and server like X. Instead it shifts the responsibilities of the X server into the window manager/compositor (which used to manage window placement and window borders as well as global effects such as any animations or transparency). It also has better controls over things like screen grabs so not every application can just grab a screen shot at once or register global shortcut keys or various things like that. Which for a while was a problem as screen sharing applications or even screenshot tools did not work - but over time these limitations have been added back in more secure ways than how X11 did them.

    Zoidsberg,
    @Zoidsberg@lemmy.ca avatar

    Does that mean that every application will need to be updated to work with Wayland?

    NateSwift,

    In theory yes. In practice most X11 applications can be ran using Xwayland as a compatibility layer

    nous,

    Additionally any application using a GUI toolkit (like kde, qt or gtk etc) only needs to to update to a version that has native Wayland support. Which means most applications already support it. At least if they don’t use any X11 APIs directly (which is not that common).

    aBundleOfFerrets,

    Not really a GUI toolkit but many many games use SDL and they also gain wayland support with a library update

    OmnipotentEntity,
    @OmnipotentEntity@beehaw.org avatar

    Yes, nominally, but there is a layer called XWayland to support backwards compatibility, so it’s not really a concern.

    rodbiren, in What are some interesting devices powered by Linux?

    I was product manager at a company that made PTZ cameras based on Linux. The company was acquired a few times but still actually manufactures them in Minnetonka MN. Kind of fun working at a place the had development, manufacturing, support and engineering in one building.

    www.legrandav.com/Products/…/RoboSHOT-12E-USB/

    maniacalmanicmania,
    @maniacalmanicmania@aussie.zone avatar

    How do you rate these cameras against the competition?

    rodbiren, (edited )

    Well, it turns out only a handful of companies actually make image modules. I would say it is better in terms of US based support, firmware, hardware design, and the fact it meets TAA and buy America compliance. I’ve seen these cameras in the DoD and even in the oval office. If you want a camera that is absolutely not spying on you I can vouch for these because I have watched the firmware get built on these.

    nkat2112, in What are some interesting devices powered by Linux?
    @nkat2112@sh.itjust.works avatar

    Many cars are powered by a flavor of Linux called AGL - Automotive Grade Linux

    Check out all the brands shown here:

    www.automotivelinux.org

    vzq, in ELI5 the whole Wayland vs X11 going on.

    It’s not some huge controversy. Almost everyone that works with/on X11 has thrown in with weyland years ago.

    taladar,

    I would say that is a false dichotomy. Almost everyone agrees that X11 isn’t the future but the support for Wayland and the specific ways it does things, is not nearly as universal as that. It is just that the problem is huge and has already taken 15 years or so and so it looks like if we want some alternative to X11 that will be done any time soon Wayland is unfortunately the only game in town, no matter how flawed it is.

    vzq,

    I’m not a Wayland fan by any stretch, but I’ve come to the same confusion you did. And so has almost everyone else. Which is the real point of my comment I guess.

    skullgiver, (edited )
    @skullgiver@popplesburger.hilciferous.nl avatar

    deleted_by_author

  • Loading...
  • pathief,
    @pathief@lemmy.world avatar

    I think the main problem is that Wayland is not a drop in replacement.

    Every software needs to support Wayland, new environment flags need to be created, flags must be used with electron apps…

    Nvidia support has been spotty and some functionality has not yet been implemented. I use a custom .xcompose file, which doesn’t work on electron apps. Let me know if there’s a better way to mimic window’s dead keys.

    Overall, it’s hard for an end user to change from a solution that is working perfectly to a solution that requires a ton of work and doesn’t yet have the same functionality.

    Everyone can understand that Wayland is the future but depending on your needs and hardware the current experience can be great or terrible.

    Auli,

    Sure but as someone starting with a new system Wayland just works. Example multitouch works right away on Wayland and if I remember correctly needs configuration on x11.

    pathief,
    @pathief@lemmy.world avatar

    “just works” depends on your needs. There is. Polarizing opinion on the Wayland vs x11 because the experiences are also very polarizing.

    skullgiver, (edited )
    @skullgiver@popplesburger.hilciferous.nl avatar

    deleted_by_author

  • Loading...
  • pathief,
    @pathief@lemmy.world avatar

    I had to set a ton more. Without the ozone flags my electron apps flicker and have this sync problem that appears to eat letters while I type them. Different electron apps use different configuration files, it’s a mess.

    I wouldn’t consider my setup to be complex enough for the amount of trouble I had to make the system work under Wayland.

    I’m using an Nvidia GPU, I’m sure things would be more streamlined if I had something else.

    taladar,

    A switch from X11 to Wayland is not just a minor change to your workflow though unless you used all defaults before.

    It requires you to replace your window manager, all the little tools related to things like clipboard, automation, screen locking,…

    And you would have to do pretty much all of that up front to be able to use Wayland long enough to know if it even works on a permanent basis for you. That is a lot of work to put into a project that has a sketchy history of people claiming for nearly a decade now that it works just fine for everything while clearly not working fine for all use cases.

    baru,

    It requires you to replace your window manager, all the little tools related to things like clipboard, automation, screen locking,…

    You use requires but those are not requirements. It applies to some cases.

    That is a lot of work to put into a project that has a sketchy history

    Sketchy history? Seems biased.

    skullgiver, (edited )
    @skullgiver@popplesburger.hilciferous.nl avatar

    deleted_by_author

  • Loading...
  • taladar,

    I was talking about tools like xsel or xclip or clipboard managers for multiple clipboards.

    skullgiver, (edited )
    @skullgiver@popplesburger.hilciferous.nl avatar

    deleted_by_author

  • Loading...
  • taladar,

    The point wasn’t so much that there are no replacements, more that every script and every shortcut and everything else using them will have to be changed to work with the Wayland alternative.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #