Record screencasts with Peek on Gnome
In the Can
A screencast shows what happens on the desktop. Peek lets you create screencasts in the blink of an eye and export them to popular formats.
As the famous saying goes, a picture is worth a thousand words. But how many words can a video save you? A million, maybe? In many situations, a short screencast (i.e., a video of desktop events) gives a far better explanation of a problem or an action than wordy text with images. A wide range of tools is available for this purpose.
The range extends from SimpleScreenRecorder [1] to recordMyDesktop [2]. Compared with these candidates, the fairly recent Peek [3] has a very small feature set, but the program is not trying to compete with the more established applications. Originally, it simply recorded the desktop as a GIF, thus producing videos that were easy to embed into web pages. However, Peek now also supports more traditional video formats such as WebM and MP4.
Recording the Desktop
In terms of the interface, Peek is deliberately oriented on the LICEcap [4] screencast tool for Windows. The program shows a scalable transparent window that is always in the foreground on top of all your other applications. Everything inside the window frame, is grabbed as a video by the software when you click Record. After pressing Stop (Figure 1), Peek immediately saves the results on the hard disk.
The program has supported real video formats (e.g., WebM and MP4) since version 1.0.0, which was released in March 2017. To set the output format, as shown in Figure 2, click on the Peek icon in the upper left corner and choose Preferences.
You can open these formats – in a style typical of modern Gnome applications – from the application menu next to the Activities button in the desktop's header bar. Then adjust the additional parameters, if necessary, such as the Delay in seconds before the recording starts and the Framerate, or influence the size of the recording with Resolution downsampling.
For the GIF format, especially, you should keep in mind that it was not originally designed for recording: Recording the entire desktop in full HD at 30 frames per second (FPS), will result in huge files.
Therefore, choose only the snippet that you actually want to view later. When scaling the window, the size display can help you align the frame precisely (Figure 3). Additionally, you can reduce the framerate to about 10fps, and, if necessary, use the Resolution downsampling option to scale the recording by an integer factor.
Installation
Peek's first commits date back to December 2015; since then, the developer has worked quite actively on the program. At the beginning of 2017, the work started to pick up speed: Changes to the code appeared daily on GitHub. As a fairly young program, it is not currently found in the repositories of the major distributions.
However, Ubuntu has a Personal Package Archive (PPA) repository (Listing 1). On Arch Linux, you can simply install the application from the Arch User Repository (AUR) [5]. For other distributions, such as Fedora, Debian, or Solus, the developer provides instructions for installation on the project page.
Listing 1
Add PPA
What is currently causing Peek difficulties is the change to the new display server, Wayland. For security reasons, Wayland isolates individual applications on the desktop from each other. Software is not allowed to read the content of another program's window. Thus, screenshots of the entire desktop are no longer easily achievable.
However, Peek is not the only applicatoin facing this problem; other screenshot tools, such as Shutter [6], are also affected. Additionally, Wayland no longer delivers absolute coordinates on the position of the application window, which – at least theoretically – puts it in a position to arrange windows on round or curved 3D displays.
Unless you launch Gnome under the classic X server via the display manager using Gnome on Xorg, Peek therefore needs to revert to the XWayland [7] compatibility layer, which now happens automatically when you start Wayland; however, if needed, you can call the application directly under XWayland with:
GDK_BACKEND=x11 peek
After fulfilling this condition, working with the program is very easy: Launch, align the frame, and record the screencast. For more tips on screencasts, check out the "Input Visualization" box.
Input Visualization
If you want to demonstrate a certain step to your viewers, rather than just grabbing a video of a program, it is useful to see input and mouse clicks. Linux offers two applications to help you with this include key-mon [8] and screenkey [9]. Key-mon simply displays a small window with an iconized mouse and the Ctrl, Alt, and Shift keys. However, screenkey displays all input from the keyboard in a bar.
The applications can complement each other, if necessary. On one hand, key-mon illustrates mouse actions. Starting the program with the command
key-mon --visible_click
draws a red circle around the mouse cursor, even for clicks. On the other hand, screenkey helps you with entries such as Ctrl+C or helps improve the viewer's understanding of the commands (Figure 4).
Conclusions
The enhancement list, a roadmap for Peek on GitHub [10], lists a large number of innovations and ideas for the future of the tool. The most important of these has already been implemented in the form of support for a genuine video format (WebM), but other useful features, like the ability to pause the recording, a picker for selecting a screen area, or a progress bar when rendering the recording, are still on the roadmap.
Infos
- SimpleScreenRecorder: http://www.maartenbaert.be/simplescreenrecorder
- recordMyDesktop: http://recordmydesktop.sourceforge.net
- Peek: https://github.com/phw/peek
- LICEcap: http://www.cockos.com/licecap
- Peek in the AUR: https://aur.archlinux.org/packages/peek
- "Shutter does not work in Wayland": https://bugs.launchpad.net/shutter/+bug/1502263
- XWayland: https://wayland.freedesktop.org/xserver.html
- key-mon: https://code.google.com/archive/p/key-mon
- screenkey: https://github.com/wavexx/screenkey
- Future improvements: https://github.com/phw/peek/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.