Change filename created by mate-screenshot

I need a screenshot filename with only alphanumeric characters i.e. no spaces,parens etc.
I have found no way to specify filename format. How do I do this. Thank you

When you hit Prt Scr, it gives you option to change filename.

You can use any characters you like.

Also, having produced the screen-shot, you can right-click it and rename to anything you want

1 Like

Thank you for these suggestions. I am hoping for something that will change the default filename.

I could modify the code, but is there a configuration file?

I don’t know if there is a config file, but my guess is it will be in the code

1 Like

I think @stevecook172001 is correct. I took a look and it seems pretty hardcoded in there: https://github.com/mate-desktop/mate-utils/blob/master/mate-screenshot/src/screenshot-save.c#L196

Have you tried a different program, like Shutter? I haven’t used or in a while, but I remember it being very configurable.

http://shutter-project.org/

3 Likes

Good guess @stevecook172001 it’s in the code.
@vkareh :slight_smile:

I’d use “scrot” for screenshots and set the image name in the command line.

Shutter is cool, you can draw some simple arrows and shapes over the images.

2 Likes

Thanks Misko. Yes I found that piece of code. Looks like it was meant to be temporary. I saw a mention of a config and I suppose the intention was to add in a formatter a some point? DO you know of any effort in progress to develop user configuration for the mate-utils?

I have tried shutter but there are issues with recent versions of Ubuntu. This is disappointing because I was happily using shutter for years. But I don’t see much activity over in the shutter shop.

I use screenshots frequently so I need to find a workaround or fix.

What is so hard about using it?

scrot [image-name].png

scrot 123456ABCD.png

The resulting image includes the terminal window. If I have an image
displayed and want to capture the screen…

Perhaps if assign it to a shortcut key? I will try tomorrow.

And although the command is simple, not at all much to ask, I really do
want to have a pushbutton screenshot that autonames the file to a name
unique to its directory and without the requirement of responding to a
confirmation dialog.

Shutter used to do that. In windows I used screenshot captor. That’s what I
want.

#!/bin/bash
# Ubuntu_Mate 16.04 LTS
#
# Take screenshot..Does NOT show terminal unless already on screen
scrot
# Take screenshot after 5 second delay
scrot --delay 5

For hotkey combinations, you will need xdotool and xclip.

1 Like

This works perfectly for my needs.

 #!/bin/bash
 # screenshot.sh
  scrot -u -q 100 '/home/bwall/screenshots/%Y%m%d_%H%M%S.png'

make the script executable

 $ chmod +x screenshot.sh

Then using MainMenu.System.Preferences.Hardware.Keyboard Shortcuts dialog to assign the printscr key to the absolute path of the script.

Glad you got it to work. :slight_smile: