Updated on November 10, 2018
Taking a screenshot on Ubuntu like a Mac
Like Mac, Ubuntu has some screenshot abilities built in that allow for a more friendly screenshot experience. One tool that I really enjoy using is the “screenshot of an area”, sometimes called a “region screenshot”.
Macs have the keybindings set up so that taking a screenshot involves one hand, allowing you to use the mouse to select a region with the other hand. Ubuntu, however requires you to press the Print Screen button along with the other modifier keys, which is usually on the other side of the keyboard.
Below is the default keybinding for Ubuntu 18.10.
Mac is a little different, in that it doesn’t use the print screen button because there isn’t one on a Mac keyboard. Instead a Mac uses combinations of keys to achieve the same result. By default all screenshots are saved to the Desktop (which can really clutter it up when you’re writing a tutorial or report with screenshots).
From this website:
1. Take screenshot of the entire screen
Cmd-Shift-3
2. Take screenshot of a specific region
Cmd-Shift-4
3. Take screenshot of a specific window
Cmd-Shift-4
then press Spacebar
and hover over a window, then click the mouse.
4. Take screenshot of the Touch Bar
Cmd-Shift-6
Using the Control key will redirect the screenshot to the clipboard and not create a file.
Ctrl-Cmd-Shift-3
takes a screenshot of the entire screen and holds it in the clipboard.
Ctrl-Cmd-Shift-4
takes a screenshot of a region and holds it in the clipboard.
Making Ubuntu Like Mac?
Some people might prefer to use one hand to initiate the screenshot, especially to select a region. In this tutorial I’ll describe a method to set this up with some new keybindings. The original keybindings described above for Ubuntu should still work. We won’t modify every screenshot tool, but the region one is most important.
We will need an application called xfce4-screenshooter to perform the new custom screenshots. Open the terminal and type the following commands.
sudo apt install xfce4-screenshooter
The help screen for this tool shows all of the available options. You are welcome to use it to gain familiarity with the tool.
Open the Keyboard settings. Scroll down to the bottom and press the +
button.
The Add Custom Shortcut window will now open.
Screenshot region to clipboard:
Type in the command for Screenshot region to clipboard.
Now press “Set Shortcut”. I will use Shift-Ctrl-Alt-4
to simulate Mac’s Ctrl-Cmd-Shift-4
. I tried to use the Windows key, such as Ctrl-Super-Shift-4
, but that wouldn’t register on the custom shortcut tool (bug maybe?). I should point out that it’s not exactly easy to press all of these keys at the same time with one hand, especially if you have smaller hands or a larger keyboard.
Screenshot region to Desktop:
The next one I’ll set up is the Screenshot region to Desktop command. Ubuntu’s default location is in Pictures, but I don’t like this location because sometimes it’s automatically scanned by image applications, and it mixes scrap screenshots with important pictures of family and friends.
You might notice that I set the keybinding to Shift-Ctrl-$
, that’s the same as Shift-Ctrl-4
(although Ubuntu assumed Shift
means I wanted the $
).
Alternatively you can change the /home/user/Desktop
folder to any folder you like. I personally prefer /home/user/Downloads
because it’s where a bunch of the scrap download files that you tend to get from the internet end up. Please note that you cannot use shortcut aliases, such as ~/Downloads
because the system doesn’t seem to translate that for xfce4-screenshooter, the folders must be the full path (perhaps a bug?).
Upon pressing the key combination, a save dialog will appear asking you to name the file. I find that the default name is sufficient. It would be nice if xfce4-screenshooter would allow you to use the default file name without showing the dialog (see feature request here).
Screenshot Fullscreen to Downloads:
Using the -f
option, we’ll create a new shortcut for fullscreen captures. We’ll use the Ctrl-Shift-3
(or Ctrl-Shift-#
) key combination for this, to mimic the Mac.
Screenshot Fullscreen to Clipboard:
Instead of the -s option, we’ll now use the -c option for clipboard. The key combination will be Ctrl-Shift-Alt-#
(or Ctrl-Shift-Alt-3
).
Screenshot Active Window to Downloads:
The last command we need is to screenshot the active window. Mac uses the Spacebar
key after pressing the capture region shortcut, but we can’t do this. Instead we’ll use the Ctrl-Shift-2
option and Ctrl-Shift-Alt-2
option.
Screenshot Active Window to Clipboard:
Finally, capturing the active window to the clipboard. For this command I used the Screenshot Active Window to Downloads keybinding to take the screenshot, so you know the difference between all of the previous screenshots. The previous ones had been taken with the region tool.
You might notice that there is quite a bit of margin to the window, showing some of the application behind the window. This could cause security or privacy concerns in some instances, so be aware of the danger.
I’m going to set this one to Ctrl-Shift-Alt-2
(or Ctrl-Shift-Alt-@
).
Concerns
Keyboard shortcuts are great, but sometimes they overwrite application shortcuts. For instance, if an application already used Ctrl-Shift-3
, then the new keyboard shortcut used by the system would conflict with this. Lucky for me there are not a whole lot of applications that I use which use these shortcuts.
If you find a problem with a specific application, you can usually configure it to use a different key combination, or you can choose a different key combination for your screenshot keybindings.
Thanks a lot for the sharing!
Hey this was really great! Thank you so much for doing this. Makes the transitoin to linux OS much smoother!