jeudi 26 mars 2015

how to create custom shortcuts for scrot and gnome-screenshot interactive mode


I want to add command scrot -s as custom shortcuts via gnome-control-center keyboard. The accelerator key was Super+S.


enter image description here


but it didn't works.


If i remove -s or try other interactive command like xkill, they works fine.


Also, scrot -e 'mv $f ~/Pictures/scrot/' is works fine too.


So my question, why scrot -s didn't work and how can i fix it.


My distro is fedora 21, gnome version is 3.14.2, and scrot version 0.8


[UPDATE] gnome-screenshot -a is failed too.


[UPDATE 2] The default shortcut "Save a screenshot of an area to Pictures" is working fine, but i'm still curious why it didn't work when i set it to custom shortcuts. enter image description here


[UPDATE 3] The following is the error log results from custom shortcut command strace -v -s 1000000 -o /tmp/gnomescr.log gnome-screenshot -a:



$ grep -ni CRITICAL /tmp/gnomescr.log
2660:write(2, "\n(gnome-screenshot:8700): Gdk-CRITICAL **: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed\n", 115) = 115
2686:write(2, "\n(gnome-screenshot:8700): Gtk-CRITICAL **: gtk_window_resize: assertion 'width > 0' failed\n", 91) = 91
2748:write(2, "\n** (gnome-screenshot:8700): CRITICAL **: Unable to capture a screenshot of any window\n", 87) = 87
$


Aucun commentaire:

Enregistrer un commentaire