Blog-Archiv

Samstag, 29. April 2023

Screenshots with Ubuntu on Wayland and Xorg

On my Ubuntu LINUX, I used Shutter as screenshot tool, but this did not work any more some years ago, so I changed to Ksnip.

After upgrading to Ubuntu 22.04, Ksnip behaved completely different. I couldn't mouse-select an area of the srceen any more, I had to take a shot of the whole desktop, then click "Options" and switch to selecting an area, then again take a shot where I could select the area.

As I couldn't take a screenshot of popup-menus that way, I decided to look for another screenshot tool. It turned out that Shutter is back, and as I was quite satisfied with it before, I installed it again.

But it turned out that Shutter behaved the same way as Ksnip. I couldn't mouse-select an area of the screen, the actions "Selection" and "Window" were disabled. Again I had to take a shot of the whole desktop, then click "Options", choose "Selection" and again take a shot.

What is going on?

As always, the way to a solution was found on stackoverflow. You have to switch back from new Wayland display server to old Xorg server, because Wayland not yet supports screen recorders sufficiently.

Switch to Xorg Display Server

  • Terminate all applications and log out.

  • When the login screen is presented to you, enter your user name and password, but do not press ENTER to log in yet.

  • Look for the gear ⚙ icon button on bottom right. If you click on it, a menu will pop up that lets you choose between "Ubuntu" (this is Wayland) and "Ubuntu on Xorg", and maybe some more display servers like "Unity" or "GNOME".

  • Select "Ubuntu on Xorg", then log in.

If you run Shutter now, you will see that the "Selection" button is enabled now.

You don't need to change to "Ubuntu on Xorg" any time you log in. Changing it once will make Ubuntu remember your decision. Only to change back to Wayland you will need the login-screen again.

Find Out Which Display Server Runs

On a Terminal command line you can enter

$ echo $XDG_SESSION_TYPE
x11

x11 denotes the Xorg server.

In UI you can see the type of display server in Ubuntu top right taskbar menu

  • "Settings" - "About" - "Windowing System"

I can't recommend any display server, but it looks like several applications do not run correctly under Wayland. What I can confirm is that mouse-dragging Firefox tabs to another screen works much better with Xorg than with Wayland, where I always needed several attempts to get the tab to the second screen.




Keine Kommentare: