How to change screenshot application to Flameshot on Ubuntu 18.04?
Solution 1
If you need or want to replace the PrtScr shortcut do the following:
-
Release the PrtScr binding by this command
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]'
-
Go to Settings -> Devices -> Keyboard and scroll to the end. Press + and you will create custom shortcut.
-
Enter name: "flameshot", command:
/usr/bin/flameshot gui
. -
Set shortcut to PrtScr (print).
That is it. Next time you push PrtScr flameshot will be launched.
Source: Posted in the question by OP which should have been posted as an answer instead.
Solution 2
Install and setup flameshot via terminal
... if there is no custom0
shortcut / binding
configured
Install flameshot:
sudo apt install flameshot
Release the PrtScr binding by this command:
Ubuntu 19.10 (Credits: @jobou's comment)
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]'
Older Ubuntu versions:
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot ''
Set new custom binding:
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
Set name:
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'flameshot'
Set command:
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command '/usr/bin/flameshot gui'
Set binding:
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding 'Print'
Solution 3
In case you installed Flameshot via snapcraft.io and not via standard sudo apt install flameshot
, then the path /usr/bin/flameshot gui
will not work, because the path is different.
-
So, first run command
type flameshot
(for Ubuntu 18.04 and higher). This will show you the path where app is installed. -
Copy this path.
-
Press Super and search for keyboard shortcut.
-
Find word screenshot
-
Edit it (in my case, I assigned Shift+Ctrl+Alt+~ as I have never used this key combo)
-
Then go back, click + symbol and add the path you have copied to command.
Solution 4
This is tested on Ubuntu 20.04
-
Disable PrtScr or Print shortcut by opening the Keyboard Shortcuts Settings
-
Navigate to Keyboard Shortcuts on bottom left menu, then select Print shortcut which is to Save a screenshot to Pictures
-
Hit Backspace to disable the current keyboard shortcut so that we can use this for Flameshot later.
-
Hit Set to apply/confirm it.
-
Identify Flame binary location with
which
command$ which flameshot /usr/bin/flameshot
-
Then, scroll down to the bottom and select + symbol to add new shortcut.
-
Add Custom Shortcut
- Name: Flameshot
- Command: /usr/bin/flameshot gui
- Shortcut: Print
That's it
Solution 5
Or simply set any shortcut (including PrtScr) to flameshot gui
: as indicated in the other answers, only without the need for any other setting. You will be asked if you want to remap the key (in Xfce at least, but I guess it's the same in most desktops).
You might consider keeping PrtScr for the default screenshot tool and use other shortcuts for flameshot, at least two I mean, because you can also capture screen with delay: for a 5-second delay, use flameshot gui -d 5000
.
More here.
Related videos on Youtube
Pavel Lysenko
Updated on September 18, 2022Comments
-
Pavel Lysenko over 1 year
I needed to highlight some text in my screenshots and I did not know how to do it with the default screenshot app. Flameshot is a solution. I installed it.
How can I replace the PrtScr shortcut-key so that it launches Flameshot?
-
dsSTORM almost 6 yearsYou should cut out everything from the second sentence onward, post it as an answer and delete it from the question so that the Q&A format is mantained.
-
pomsky almost 6 yearsSince Ask Ubuntu is a question and answer site, you should post the answer separately as @dsSTORM said. I have removed the answer part from the question, but you can find it here. Please post the answer in "Your Answer" section below. It's completely fine to answer your own question.
-
-
jobou over 4 yearsOn Ubuntu 19.10, I had to release the
PtrScr
binding with this commandgsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]'
-
Khongor Bayarsaikhan about 4 yearsYou need
[]
inside the''
so it should be'[]'
. Otherwise this should be accepted as the correct answer. -
Rocky Kev about 4 yearsThis worked on Fedora 31!
-
43Tesseracts about 3 yearsWorked on Ubuntu 20.04
-
43Tesseracts about 3 yearsWorks in Ubuntu 20.04
-
naim5am about 3 yearsworks on Elementary OS, Hera 5.1
-
Niclas Lindgren about 3 yearsIf it's installed as a snap just set the command to
flameshot gui
(without the path) -
Coder Guy about 3 yearsStrange that Flameshot has configuration options for a myriad of keyboard shortcuts except for the most important one.
-
Vladimir Kovalchuk almost 3 yearsworks perfectly
-
mekb over 2 years
which
also works as well astype
, but it won't say if it's a terminal command if it is -
Akhil over 2 yearsWorking in my PopOS 21.04. Thanks!
-
Andrea Moro over 2 yearsAnd depending on how you installed Flameshot, check the path. With Snapshot this will be /snap/bin/flameshot
-
Matt Welke over 2 yearsWorked well for me, except I was using snap, so I had to use
/snap/bin/flameshot gui
, and the way to get to the setting through Settings was a bit different than described here since I am using Ubuntu 21.10. But it wasn't too hard to find. -
questionto42standswithUkraine over 2 yearsThis is the Linux answer, only commands, no clicking, works.
-
Admin almost 2 yearsAlso verified works on Ubuntu 22.04