Score:2

xte stopped working after upgrading to ubuntu 21.04

nz flag

I use xbindkeys to copy and paste using mouse 8 and mouse 9 buttons.

It worked with ubuntu 20.10 but since I upgraded to 21.04, it stopped working in some applications.

The issue seems to be coming from xte

If I run sleep 4; xte 'key v' in the terminal And

  • switch to nautilus it doesn't print a v
  • switch to terminal it doesn't print a v
  • switch to firefox it doesn't print a v

  • switch to chrome it does print a v
  • switch to signal it does print a v
  • switch to slack it does print a v
  • switch to discord it does print a v

How come it stopped working in some applications but not others ? How can I debug this ?

Score:4
us flag

To check whether your Ubuntu session is Xorg or Wayland:

$ echo $XDG_SESSION_TYPE 
wayland

You can either:

  1. try to replace tools relying on GUI with tools that write input events directly to /dev/uinput, e.g. xdotool with ydotool etc,
  2. or you can switch back to Xorg.

To set Xorg as default:

$ sudo gedit /etc/gdm3/custom.conf

Uncomment (remove #) the following line:

#WaylandEnable=false

Save the file, reboot and try something like xdotool mousemove 50 20 in terminal, it should teleport your mouse pointer near the upper left corner of the screen.

Score:1
cn flag

Very simple. After installing Ubuntu 21.04, you are now on the more modern Wayland graphical system rather than the venerable Xorg server. Extremely usefull automation tools such as xbindkeys, xvt, wmctrl, xdotool, ... do not work on Wayland.

In addition, many screen recording programs do not work on Wayland, although major player OBS Studio now supports Wayland.

Why does it work on some applications? Probably because these applications run on XWayland, an Xorg emulation layer for Wayland to support applications that do not run on native Wayland.

What to do? Switch back to Xorg for the time being, or attempt to get the very young replacing tools for Wayland to work.

nicolast avatar
nz flag
I switched back to ubuntu Xorg on the login screen and now it works. awesome, thank you !
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.