Unfortunately, disabling this completely breaks UI tests (in my case Java AssertJ Swing tests):
Caused by: java.awt.AWTException: java.awt.Robot requires your X server support the XTEST extension version 2.2
at sun.awt.X11.XRobotPeer.setup(Native Method)
at sun.awt.X11.XRobotPeer.<init>(XRobotPeer.java:51)
at sun.awt.X11.XToolkit.createRobot(XToolkit.java:958)
at java.awt.Robot.init(Robot.java:171)
at java.awt.Robot.<init>(Robot.java:164)
at org.assertj.swing.util.RobotFactory.newRobotInLeftScreen(RobotFactory.java:58)
at org.assertj.swing.image.ScreenshotTaker.<init>(ScreenshotTaker.java:66)
... 21 more
I have found the root issue, it is happen due to Chrome or Chromium are both not compatible with xdg-desktop-portal. You can try to uninstall those to test, if you won’t believe me. Thanks to ChatGPT I also found a solution for that
Please search ChatGPT for the below, and it will give you a guildelines, since there are many
On Chrome open chrome://version/
Check for Profile Path /home/lin/.config/google-chrome/Profile 1 (Profile can be default or from 1 to many profile you have)