Saturday 28 October 2023

Linux Mint: replacing gnome-screenshot

The default screenshot program on Mint doesn't really do it for me.

 

So I started investigating a better solution.

Don't get me wrong, gnome-screenshot is a perfectly capable program, but I think I can do better by replacing it with the program called 'scrot' (SCReenshOT).

For reference, I'm currently running Linux Mint 21.2 Cinnamon.

Here are my personal requirements for screen capture:-

  • select area to be captured with mouse,
  • auto save file to unique file name,
  • save file to a dedicated 'screenshots' folder,
  • use 'Print Screen' as shortcut key ('Prt Sc' on my Entroware laptop).

The first step is to install scrot. Using a terminal:-

 $ sudo apt install scrot

Then I need to develop a suitable command line using scrot;

To create a unique file name I'm using date time to the nearest second:-

  %Y-%m:-%d_%H:%M:%S

 which gives: year-month-day_hour:minute:second

The image will be saved as a .png file to a folder named: _screenshots

The 's' switch instructs scrot to wait for an area to be manually selected. So the full command should be:-

 scrot -s '_screenshots/Screen_%Y-%m:-%d_%H:%M:%S.png'

...and sure enough, this works when tested in a terminal.

 


To develop a custom shortcut, select menu Preferences > System Settings > Keyboards > Shortcuts > Custom Shortcuts

Enter the new Keyboard shortcut details: enter a suitable name and paste in the command line



Enter a keyboard binding by pressing your chosen key/key combination: I've chosen to re-use the "Print Screen" key.

Note: this automatically destroys the original binding with gnome-screenshot.



Assuming it works, that's all there is.

but...

...isn't there always a but?

Although this works great on my Linux Mint laptop, over on my Peppermint machine something isn't quite right.

Instead of getting a cross-hair cursor, allowing me to select a capture area, I get a pointer. When the mouse is clicked, scrot captures a full-screen image.

As far as I can see, the difference is down to scrot versions: v0.8 on Peppermint compared to v1.7 on Mint.

These days, my Peppermint machine is only used for blogging, so I'm not too bothered (Google is largely blocked on my Mint laptop).

No comments:

Post a Comment