2

According to this, pressing the screenshot hotkey will do either of 2 things:

  1. For Unity users, it'll open the dialog box where you can set the picture's name, location and whether or not it'll be copied to clipboard instead.
  2. For Gnome users, it'll automatically save the picture with a name that shows time and date taken to the set autosave folder (~/Pictures by default).

I've been using gnome-flashback (formerly known as Gnome Classic (No Effects) or Gnome Fallback) for a long time and have had the second outcome happen every time. For some reason, though, after upgrading to 14.04 and switching Unity to gnome-flashback, it started doing the first one instead.

Following this to make custom keyboard shortcuts doesn't work because gnome-screenshot still uses the dialog box by default.

I've already set the autosave location and the screen flash + shutter sound is enough of an indication that a shot's been taken so no need to argue pros and cons like all the bug reports that do.

Is there a setting or some way to disable the dialog box from appearing while trying to keep Ubuntu light by not having to install more things as much as possible?

maki57
  • 1,827
  • 1
  • 14
  • 17

1 Answers1

3
  • gnome-screenshot has -f option to specify store file. The following command should be the replacement you are looking for:

    gnome-screenshot -f "$HOME/Pictures/Screenshot from $(date '+%F %T').png"
    
  • One way! is to replace gnome-screenshot to be run with addition parameter:

    1. Move original:

      sudo mv /usr/bin/gnome-screenshot /usr/bin/gnome-screenshot.orig
      
    2. Create a modified command:

      sudo nano /usr/bin/gnome-screenshot.mod

      #!/bin/sh
      gnome-screenshot.orig -f "$HOME/Pictures/Screenshot from $(date '+%F %T').png" $@
      

      Make it executable:

      sudo chmod +x /usr/bin/gnome-screenshot.mod
      
    3. Create replacement symbolic link:

      sudo ln -s /usr/bin/gnome-screenshot.mod /usr/bin/gnome-screenshot
      
user.dz
  • 48,105
  • 1
    Thank you very much! The shutter sound doesn't play, but the screen flash should do. The -f option does the trick, plus you get to set the autosave location without needing the dconf editor. Athough, for #3, I had to switch the positions of /usr/bin/gnome-screenshot and /usr/bin/gnome-screenshot.mod in the command to make it work. – maki57 Jul 14 '14 at 08:06