How to Take Screenshots on Arch Linux? | 5 Different Ways


When you work online, you often need to take images or screenshots. These screenshots can help you to capture and save important data and events. You can take screenshots on different available systems. Like if you are working on Windows, you can save important information without the need for extensive writing.

On Linux, you can take screenshots of commands, the terminal, or an important application window. You have the choice to either capture the entire system screen or part of a window on the screen. For example, you can capture screenshots of executed commands and their output while working with Arch Linux. There are multiple tools available on Arch Linux to take screenshots and share them.

 

How to Take a Screenshot on Arch Linux

Arch Linux, like any other Linux distribution, has multiple software and tools to take screenshots. These tools range from the default keyboard screenshot key to various third-party tools. Now we will cover the five most used methods of taking screenshots on an Arch Linux distribution.

 

1. Default Keyboard Shortcuts

The easiest method for taking screenshots on Arch Linux is using the default built-in system keyboard keys. It is by far the simplest and hassle-free method to quickly capture important data on your Arch Linux screen.

This default keyboard shortcut key has different options using which we can take custom screenshots and not only that it also allows us to customize the screenshot to some extent. You have the choice to start capturing the entire screen, a specific opened window, or a custom-selected area. This PrtScn key is located either on the top row of your keyboard or just adjacent to the space bar key. Most of the time these keys are labeled as PrtSc, PrtScn, or similar.

Following is the list of default keyboard shortcuts that usually work for all Linux distros.

  • PrtScn: This keyboard shortcut key will take a screenshot of the entire screen. The screenshots are saved inside the user’s home Pictures directory.
  • Shift + PrtScn: This shortcut key will capture a section of the screen.
  • Alt + PrtScn: This shortcut key will only capture the active window.
  • Ctrl + PrtScn: This key will take a screenshot of the complete system and copy it to the system clipboard.
  • Ctrl + Alt + PrtScn: This key will take a screenshot of the active window. It also copies the captured screenshot to the clipboard.
  • Shift + Ctrl + PrtScn: This shortcut key combination will capture a specific area of the screen and copy it to the clipboard.

 

2. Spectacle

The second tool on the list of screenshot tools is Spectacle. You can use this screenshot tool on Arch Linux if you have a KDE Plasma desktop environment. However, if you are running any other desktop environment on Arch Linux, you can still use this tool by installing it using snap.

This tool, just like other screenshot tools, can also capture the entire screen, a specific area, a single window, or a part of an application window on Arch Linux. You can save, copy, or print your screenshots using the spectacle screenshot tool. You can also customize its settings based on your needs.

Some main highlights of the Spectacle tools are shown below:

  • You can choose the area to capture such as full screen, current screen, active window, window under cursor, rectangular region, or freehand region.
  • It allows you to delay the screenshot by a custom amount of time.
  • Using this tool you can include the window border, the mouse cursor, and the window title in the screenshot.
  • It has a special feature of Saving the screenshot to a file, copying it to the clipboard, or exporting it to an online service, such as Imgur, KDE Paste, or Nextcloud.
  • You can also specify the screenshot file name, its format, and quality.
  • You can edit the screenshot with basic tools. You can crop, rotate, and resize the captured image.

To install Spectacle on Arch Linux, simply use snap. Snap is supported on multiple Linux distributions. It is a universal package manager for all these Linux distributions.

To get started, simply open a terminal. Then, install snap from the AUR (Arch User Repository) by cloning the snapd git repository and building the package with makepkg:

git clone https://aur.archlinux.org/snapd.git

cd snapd 

makepkg -si

A screen shot of a computer Description automatically generated

After snap installation, next we need to enable the systemd unit. This unit manages the main snap communication socket. This allows snap to communicate with the snap store and install applications.

To enable the socket, run this command with sudo:

sudo systemctl enable --now snapd.socket

Next, we need to create a symbolic link between /var/lib/snapd/snap and /snap, which is where snap applications are mounted. This allows you to run snap applications from the command line or the desktop menu. To create the link, run this command with sudo:

sudo ln -s /var/lib/snapd/snap /snap

Finally, we can install Spectacle using snap:

sudo snap install spectacle

Restart your system for the installation to take effect. After that, launch Spectacle by searching for it in the desktop menu or by running the below command in a terminal:

snap run spectacle

A screen shot of a computer Description automatically generated

You can also directly run the spectacle from the command line using the following command:

spectacle

A screenshot of a computer Description automatically generated

 

3. Flameshot

The third tool on the list is the Flameshot. The Flameshot is a highly customizable and open-source Linux tool. Most Linux users prefer the Flameshot tool over any other tool because it can be controlled directly from the CLI without any need for interference with the GUI. Flameshot is a lightweight tool, using which you can gain full control over your screenshots.

Some main features of the Flameshot are:

  • Flameshot’s accessible configuration dialog has some main features that can customize the interface color, button selection, and keyboard shortcuts.
  • Using Flameshot you can add an arrow mark, highlight text, and blur a section.
  • You can also add text and draw shapes to highlight an important part of your screenshot.
  • You can also add an incrementing counter number and a solid color box with its built-in editing tools.
  • It allows you to drag the selection box to capture the custom area.
  • Delaying the screenshot by a custom amount of time.
  • Screenshots taken using the Flameshot are directly uploaded to Imgur. It also allows saving the screenshot to a file, copying it to the clipboard, or uploading it to an online service, such as Imgur.
  • You can also run Flameshot directly from CLI.
  • You can configure a custom file name, format, and location of the screenshot.
  • It allows you to define a keyboard shortcut of your own choice.

Use pacman to install the Flameshot tool on your Arch Linux system:

sudo pacman -S flameshot

A screenshot of a computer Description automatically generated

To launch Flameshot, just search for it in your application menu or run:

flameshot gui

A screenshot of a computer Description automatically generated

 

4. Ksnip Tool

Ksnip is another cross-platform, free screenshot tool. It lets you capture and edit your screenshots with various annotation features.

Some of the features of Ksnip are:

  • It can capture a custom area or a whole screen. It can also capture the area around the mouse cursor as a screenshot.
  • You can set a delay time for any capture option.
  • It directly uploads your screenshots to imgur.com, either anonymously or with your account.
  • You can use the command line arguments with Ksnip to take a screenshot and save it with default settings.
  • Edit the screenshots with various tools such as pens, markers, shapes, texts, and stickers.
  • Add a watermark to the captured images.
  • Make the selection blurry.

To install Ksnip, snap must be installed on your system. Using Snap on Linux, you can install applications from a central repository.

Note: If you have snap already installed, then you can skip these steps and proceed directly with the Ksnip installation command.

If you don’t have snap installed, then open your terminal and clone the snapd repository from GitHub with the following command:

git clone https://aur.archlinux.org/snapd.git

A screenshot of a computer screen Description automatically generated

Now change the current working directory to the snapd directory that you just cloned.

cd snapd

Next, run the given makepkg command to build and install the snapd package from the PKGBUILD file in the current directory.

makepkg -si

The -s flag resolves and installs any dependencies, and the -i flag installs the package after building.

Next, you need to enable the snapd.socket unit, which manages the main snap communication socket. Snap packages are self-contained applications that work across different Linux distributions.

You can do this with the following command:

sudo systemctl enable --now snapd.socket

A screen shot of a computer Description automatically generated

Now run the given command to create a symbolic link from /var/lib/snapd/snap to /snap. This is needed for compatibility with snap packages that assume this path:

sudo ln -s /var/lib/snapd/snap /snap

After that, reboot your Linux Arch system and log in again to ensure that the snap’s paths are updated correctly.

Once you have snap installed, you can install Ksnip with the following command:

sudo snap install ksnip

To launch Ksnip, you can search for it in your application menu:

A screenshot of a computer Description automatically generated

You will see the Ksnip window with a toolbar and a tray icon. You can use the toolbar buttons or the keyboard shortcuts to take screenshots of different areas of your screen. The tray icon will give you access to the screenshot options.

After taking a screenshot, you can customize them using the on-screen annotation tools. You can also use the menu bar to access more options, such as saving, copying, printing, or uploading your screenshot.

 

5. Using CLI

CLI stands for the command-line interface, using which you can communicate with your system using text commands. It can be useful for taking screenshots if you prefer a more advanced and flexible way of capturing screenshots without using any graphical application.

You can use some CLI tools for taking screenshots, such as scrot, maim, GNOME, and import. These are lightweight and fast tools that allow you to take screenshots with various options and parameters. You can also combine them with other commands and scripts to automate and customize your screenshot process.

Take Screenshot Using import

To use the import screenshot tool, we have the ImageMagick package. This package has a screenshot utility, using which you can take screenshots directly from the command line. Using the import command, you can easily capture a screen or a window.

For example, to take a complete screenshot of your active window, use the following command:

import -window root screenshot1.png

The above command will save the screenshot as a PNG file in your current working directory.

Note: You can also specify other image formats, like JPEG or GIF, by changing the file extension.

Take Screenshot Using gnome

GNOME is another command line screenshot tool, using which you can capture screenshots directly from the CLI. The GNOME screenshot tool is not only limited to CLI, but it also has a GUI interface.

sudo pacman -S gnome-screenshot

To take a screenshot of the entire screen, run:

gnome-screenshot

The above command will capture your entire screen and save it inside the picture’s directory.

To take a screenshot with a delay of two seconds, run:

gnome-screenshot -w -d 2

Following is the list of other options that you can use with the gnome-screenshot command:

  • -w: It is used to capture the current window
  • -d: It is used to set the delay time in seconds.
  • -a: To select a specific area to capture, use the -a option, which will change the mouse pointer to a crosshair that you can drag and select a portion.

You can also use various options to customize your screenshot, such as:

  • -w to capture the active window
  • -a to capture an area of the screen
  • -p to include the pointer
  • -d to add a delay
  • -i to interactively set options
  • -f to save to a file
  • -b to capture the screenshot with the window border included
  • -B to exclude the window border from the screenshot

Take Screenshot Using scrot

Scrot is another command line tool to take screenshots from the command line. You can also set a delay period after which this tool will capture your screen. You can install Scrot using pacman package manager.

sudo pacman -S scrot

The above-given command will install scrot from the official Arch Linux repositories.

To take a screenshot of the complete screen, run:

scrot picture.png

The above command will save the screenshot as a file with a PNG extension (picture.png) in the current working directory.

A screenshot of a computer Description automatically generated

You can also use the -s option to capture a selected portion. This option will also change the mouse pointer to a crosshair:

scrot -s picture.png

Following are some other options to use with scrot command:

  • -d to set a delay and give some more time to capture the image
  • -u option to capture the currently active window.

To take a screenshot of the current window after 2 seconds delay, run:

scrot -u -d 2 picture.png

 

Conclusion

Arch Linux, like any other Linux distribution, has multiple ways of taking screenshots. All these ways depend on your personal preference and kind of usage. If you want a basic screenshot tool with no extra features, you can start with the default keyboard shortcuts. These default keyboard shortcut keys are set to capture the entire screen, an application window, or a specific region. If you want a more advanced way of capturing and editing the screenshot, then you can continue with the graphical tools like Spectacle, Flameshot, or Ksnip.

Alternatively, you can also use the command-line interface to take screenshots. In Arch Linux, we have different command line tools like the scrot, maim, gnome, or ImageMagick. Using the given tools, you can capture and share your screenshots or edit them.

 

Print Friendly, PDF & Email