
X11 was a brilliant design, though it certainly lacked in some areas that were less important when it was born. However, a funny thing happened. People, for the most part, seemed to forget that X11 was made for multiuser networked machines. So they started using X11 as a display driver for their single-user workstation. Of course, that works fine. But that’s like using a motorcycle to go from the living room to the kitchen. You can do it, but it may come with certain trade-offs.
I would have loved to see X11 fixed to have better security and performance, but that didn’t happen. Instead, we got Wayland. I resisted it as long as I could, but a recent update to my computer stopped me from logging into a GUI session. That’s when I found out that OpenSuse decided that I would really like to replace X11 with Wayland. So much so that they wouldn’t give me a choice. I spent a day trying to figure out a realistic way to roll back or graft X11 in, but finally decided it was too much and would lead to more and more work with each release. So I decided to just bite the bullet.
Why Not Wayland?
If you are like me, you probably don’t really care much about what software is driving your display as long as it works. And that was the problem. I have two workflow tasks I do quite often that Wayland seemed to have problems with. First, I use autokey to remap keys for certain applications, notably web browsers, so that I can use emacs keystrokes in them. Second, because I have multiple networked computers, I often run an ssh tunnel and forward X11 traffic to run remotely. Actually, I used to simply log into those machines remotely, but because of security concerns, most login greeters have had that capability turned off for a while, and getting it to work in modern times has been spotty, so I just tunnel the whole window.
The Solutions
There’s good news and bad news. First, there’s no universal answer that completely replaces the tools I’ve used in the past. The good news is there are some things that get you most of the way there. The bad news, again, though, is that not all of those things work with every application you might want to use, although, presumably, that will get better over time. After all, Wayland is only 13 years old.
Using xremap
The answer to autokey is to configure xremap and start it as a service. This isn’t as well-polished as autokey, but it is also very powerful. You can remap key combinations and attach them to specific applications or devices. It won’t do everything autokey did, but it also can do some things that were difficult in autokey. You can probably figure it out from the configuration file, at least for simple cases.
Keymap: - name: Emacs-style keys in Zen application: only: - zen - firefox - google-chrome - chromium-browser remap: # Character and line movement C-b: left C-f: right C-p: up C-n: down C-a: home C-e: end # Page and document movement C-v: pagedown A-v: pageup A-S-comma: C-home A-S-dot: C-end # Editing C-d: delete C-w: C-x A-w: C-c C-y: C-v C-k: [S-end, C-x] # Browser and formatting commands C-q: C-w A-b: C-b C-g: esc C-s: C-f A-y: C-y
If you need to know application names, the project’s README explains how that works on different combinations of operating systems/compositors. Don’t count on xwindowinfo under Wayland (another casualty).
You also need a way to start it. Here’s my systemd unit, although note that your unit names like plasma-core.target may be different than mine.
[Unit] Description=xremap keyboard remapping Documentation=https://github.com/xremap/xremap After=plasma-core.target PartOf=graphical-session.target [Service] Type=simple ExecStart=/usr/local/bin/xremap --desktop kde --watch %h/.config/xremap/config.yml Restart=on-failure RestartSec=3 [Install] WantedBy=plasma-workspace-wayland.target
Waypipe
If you want to run X11 programs over ssh, you can start ssh with -X or -Y to enable X11 forwarding. Then things you run on the remote machine will mysteriously appear on your local screen. The truth is, in an ideal world, you didn’t need this. The X11 DISPLAY variable could point to a network machine. The problem is your traffic was in the open, and people could randomly wedge things on your screen without fancy authentication setups. So using ssh as the pipe between machines was a good deal. You had to authenticate yourself, and the wire traffic is encrypted.
Because many apps still support both X11 and Wayland, your apps will probably still work like this for now, if you want. However, as X11 gets further in the rearview mirror, that may not be true. A pure Wayland program would need some hocus pocus to run a nested Wayland compositor with an X11 back end. Luckily, you don’t have to.

If you have a program that supports Wayland, you can use waypipe to grab it and transport it somewhere else, usually over ssh. Actually, waypipe doesn’t care what you use, so socat or many other programs will work, but for security, you usually want ssh.
Consider, say, pcmanfm. You might have a lightweight file manager like that on a headless server. You could run it two different ways:
waypipe ssh my_remote_host pcmanfm
or
ssh -X my_remote_host pcmanfm
This assumes my_remote_host is an alias set up in ~/.ssh/config, but you could just have well used al@hackaday.com or whatever. Either command works because pcmanfm knows how to “speak” X11 and Wayland. Unfortunately, in my case, the version of emacs on the remote computer doesn’t know how to do Wayland natively, so for that I have to use the second type of command.
Usually, programs can figure out the right backend to use, but sometimes you may have to help them out. For example, if you wanted to be sure pcmanfm used Wayland:
waypipe ssh my_remote_host env QT_QPA_PLATFORM=wayland pcmanfm
Of course, that’s for a QT app. Other applications might require GDK_BACKEND=wayland or an argument like --ozone-platform=wayland (Chromium).
Trouble, Trouble…
If you have persistent GPU problems, try passing waypip the --no-gpu option. However, most of my problems were with ssh because of my setup.
With ssh, you can gain some efficiency by having the first session you connect to a remote host do the setup and then subsequent connections reuse the same underlying setup. The problem is, if that first session is not set up the way you want (e.g., it has a DISPLAY variable to use with -X) this can lead to strange problems where an X program would run one time and then not again.
Of course, you could turn it off. However, you can also use a command like:
waypipe ssh -S none my_remote_host pcmanfm
Either way works.
Other Replacements
There are other tools that almost replace some of what I used to use on X11. For example, ydotool can do some of the things you need to automate your desktop. There are also compositor-specific tools. Got a favorite Wayland hack? Let us know in the comments.
It seems like there’s nothing ssh can’t do. Meanwhile, we miss X11. But we have noticed a trend these days. It used to be you’d give people a choice, and if your new thing was so much better, people would switch to it on their own. Now, people get herded to the new thing even if they don’t want it.
This articles is written by : Nermeen Nabil Khear Abdelmalak
All rights reserved to : USAGOLDMIES . www.usagoldmines.com
You can Enjoy surfing our website categories and read more content in many fields you may like .
Why USAGoldMines ?
USAGoldMines is a comprehensive website offering the latest in financial, crypto, and technical news. With specialized sections for each category, it provides readers with up-to-date market insights, investment trends, and technological advancements, making it a valuable resource for investors and enthusiasts in the fast-paced financial world.
