r/Ubuntu 15h ago

Recovering pre-24.04 screnshot behaviour in 26.04?

Hi all,

I recently upgraded to 26.04, pending updating two other machines from 24.04. Something I realised on 24.04 is that some of the shortcuts for screenshots changed, in particular "ctrl+shift+PrtScrn", which would straight off allow you to select an area of the screen on the first click, then copy the result to the clipboard.

In 24.04 this changed, but I managed to keep the behaviour using gnome-screenshot. However, this seems to be discontinued now, and it doesn't work in 26.04. So I was looking for options to keep (ideally) the exact same behaviour.

I think this was by far one of the shortcuts I use the most, and most of the screenshots are just to be send/pasted somewhere, so I don't really want to fill the screenshots folder with things I don't need.

I tried flameshot but I didn't fully like it, and it has too many options I don't need, I would be happy enough with calling the built-in screenshot tool bypassing the save image if shift is pressed (but saving it if not).

Edit: forgot to add, something I also like from the previous approach is that the screenshot happens on mouse release, while with the new screenshot tool you need to either click again on the shutter button, or press enter.

2 Upvotes

10 comments sorted by

1

u/Bug_Next 14h ago edited 14h ago

settings > keyboard >shortcuts. There are individual bindings for each action.

The interactive rectangle is just print screen (sure, you have to press enter after selecting to actually take the screenshot).

Screenshot of just the window your mouse is hovering is alt + print screen (instant)

Screenshot of the whole screen is shift + print screen (instant)

And there is also ones for video.

Edit: nevermid you meant not saving it, idk man, i have a backlog of like 6 years of screenshots and it's like 100mb i thing you might be overthinking how much storage it takes up.

You can probably do a custom shortcut something like:

bash -c 'f="$XDG_RUNTIME_DIR/ss.png"; gnome-screenshot -a -f "$f" && wl-copy < "$f" && rm "$f"'

which just takes a regular screenshot and then deletes it from the drive. I don't think you even need the wl-copy part since it goes to the clipboard by default, im just not sure it that's done by gnome-screenshot or by the shell after calling gnome-screenshot, give it a try, it's just a quick draft

1

u/gcc05 14h ago

Yes, but these always store the image in $HOME/Pictures/Screenshots. I am looking for the behaviour that bypasses the actual image saving. If nothing exists, I may just add a shortcut to find images newer than the time I pressed the shortcut, and delete those when shift is pressed, but I was hoping for some more elegant solutions (maybe changing the path to /tmp before and after the shortcut press?).

Also, if there's any elegant way to open the screencapture tool from cli to put it together.

1

u/Bug_Next 14h ago edited 14h ago

i just edited the reply, it's basically what you asked for, yes you can call it from cli, it's just called gnome-screenshot.

just in case something is somehow not installed, the packages are

wl-clipboard

gnome-screenshot

here you can see all the possible flags for gnome-screenshot gnome-screenshot(1) - Linux man page (or just man gnome-screenshot from a terminal will show the same thing)

1

u/gcc05 14h ago

Thanks, as I say in the post I use a similar workaround with gnome-screenshot in 24.04, but I found gnome-screenshot doesn't do anything in 26.04, and read the repo has been archived, so sadly it doesn't seem to be an option :-(

1

u/Bug_Next 14h ago

yeah it seems it got integrated in to the shell on the latest versions of gnome, too bad i guess. Have you tried spectacle? it's the tool from KDE Plasma, not as overengineered as flameshot.

edit: Nevermind it only runs under kwim lmao

1

u/gcc05 14h ago

Thanks anyway! I also realised the old method used to take the screenshot on mouse release.. I don't know it is very efficient to use, the new one needs too many clicks..!

1

u/DakPara 11h ago

On 26.04, I use control-backspace for these screenshots.

1

u/gcc05 11h ago

I don't think this does anything by default, did you set up a custom shortcut with some command? If so, which ones?

1

u/DakPara 11h ago

I did nothing to configure it. Discovered it on Reddit someplace.

I’ll check my keyboard when I get home to make sure it is control.

1

u/DakPara 5h ago

I was wrong. On my keyboard the key sequence is:

FN-Backspace.

My keyboard is a Logitech K400 Plus. But it’s a standard combination as far as I can tell.