A command-line presentation app with purpose
Command Line – Impressive
Contrary to conventional wisdom, a command-line presentation app can be easy to use. Impressive does just that and gives you more flexibility to boot.
Called on to do a presentation, most Linux users will reach for LibreOffice's Impress. Impress is a thoroughly modern slide show app, comparable to Microsoft PowerPoint, and more than enough for most purposes. So why would anyone use a command-line presentation app like Impressive [1]?
The answer is simple: Impress and PowerPoint slide shows have limited options for design or presentation. By contrast, Impressive offers users more formatting options. Impressive also has a small, but effective set of practical tools to make a presentation more effective.
A large part of Impressive's advantage is that slides can be any shape or size, with any design elements a user chooses. Impressive slides can be made in any app, from LibreOffice to Krita, and then saved in a graphics format to a common directory and named numerically or alphabetically. Alternatively, the slides can be placed one per page in a single PDF file. Since Impressive was originally designed for use with PDFs, they work most efficiently if you choose to customize, but any common graphics format will do. The slide show can be run by pointing the command to the directory that contains the files:
impressive PRESENTATION-PATH
If you are using separate files, point to their directory rather than a file name.
Options can be added from the command line, or, more efficiently, each slide can be formatted differently by adding a configuration file to the slides' directory. The page properties file can be copied, of course, for use with another slide show.
Command-Line Options
If you design your slides carefully, you might be completely satisfied running Impressive without any options. However, if you like to tinker and improve your presentations, Impressive offers dozens of options.
To start, Impressive offers several options for administrative purposes. If you are running it on a machine with limited memory, you might want to set the --cache MODE
(-c
) option. By default, Impressive loads all slides and zoom views into memory for faster use, but you can turn the cache off by completing the option with none
, use a disk file as a cache with disk
, or store slides in a smaller format in the cache with compressed
. Another way to reduce the memory demand is to add --noback
(-b
) to prevent Impressive from rendering slides in the background.
Other administrative options perform a variety of tasks. For example, instead of running the slide show, --output DIRECTORY
(-o
) copies each slide in .png
format, which is useful when posting the presentation online.
When Impressive runs, the default is a full-screen display, but that is not the only option. Using --aspect X:Y
(-A
), you can set the window dimensions in pixels. Another option is to use --half-screen
(-H
) to display only on the right side of the screen, allowing access to other programs. However, slides generally have to be designed specifically for half-screen display.
Other options set how the presentation runs. For instance, --initial-page PAGE
(-i
) sets the starting page, whereas --pages START-END
(-p
) sets a range of pages to display. With some planning, both these options can allow you to create multiple versions of a slide show that are stored in the same directory or file. With --auto SECONDS
(-a
), you can set a presentation to run automatically and, if you choose, to close after the last slide with --autoquit
(-Q
).
As for transitions, Impressive chooses randomly from the enabled effects in default mode. The command impressive --listtrans
(-l
) shows a full list of transition effects, which can be enabled or disabled by a setting in the configuration file (see below). You can also specify which transitions to use with --transition TRANS1, TRANS2...
(-t
). Additionally, you may alter the default of 1,000 milliseconds for the transition duration with --transtime MILLISECONDS
(-T
) (Figure 1).
Finally, Impressive includes options to change what displays on the screen around the slides. Although the Impressive logo only displays while slides are being cached, you can disable it with --nologo
. You can also add an indicator of your current location in a presentation with --page-progress
. Similarly, with --minute
(-M
), Impressive shows an onscreen clock while a slide show is running.
These are only some of the most useful options for the command, with at least half as many more, so browsing the man page pays off. However, be aware that some Ubuntu versions of Impressive appear to be compiled with some of the options listed in the man page omitted.
Creating and Storing Customizations
As you might guess, an Impressive command can become rather long and cumbersome to type if you customize heavily. Although you can always retrieve a command from the history, a more efficient way to keep commands simple is to create a configuration file. This configuration file has the same name as the slide or the PDF file containing the slide show, except for its .info
extension. The file is a Python script, which is read automatically when Impressive is run with the slides in the same directory. It can contain three different forms of customization: global options that apply to all slides, custom keybindings, and page properties. Many of the possible settings in all three categories correspond to the command options, although not all.
Global options change Impressive's default settings. Instead of editing the defaults in /usr/bin/impressive
(Figure 2) – which requires root privileges – you can override them for a particular presentation only. For example, entering Verbose=True
means that Impressive outputs more information about what it is doing, and you could change the pixel dimension of the screen size by setting ScreenHeight=
and Screenwidth=
.
Another use for global options is to set the transitions that are assigned randomly. For example, if you wanted to avoid using the transition WipeBlobs
, you would include the setting AvailableTransitions.remove(WipeBlobs)
. By contrast, to add SlideUp
and SlideDown
to the enabled transitions (those marked by an asterisk when you use the -l
option), you would include:
AvailableTransitions += [SlideUp, SlideDown]
Should you decide to use only Crossfade
as a transition, you can simply enter:
AvailableTransitions = [Crossfade]
Impressive includes a set of default keybindings for use when running a presentation. However, you can also add your own in the configuration file, creating a permanent version of the --bind
(-e
) option. Custom bindings consist of an event (i.e., a key or a mouse button to use) and an action (the effect of the event). For example, a=fullscreen
toggles the full-screen display. A few keybinding actions can be used to set the entire presentation's behavior; for example, if you were having trouble with some keys behaving properly, you could use clearall
to remove all keybindings, which would allow you to continue running the slide show with the mouse. A complete set of events is listed in the manual [2].
Perhaps Impressive's strongest feature is the ability to set each slide's behavior individually. Individual slide properties are defined one per line in a section of the configuration file called PageProps
. Definitions for each page are grouped in curly brackets, as are the entire set of page properties. As with other customizations, the available features correspond closely to the command options, and a complete listing is given in the manual. Listing 1 shows the formatting and illustrates some of the possible uses for customization.
Listing 1
PageProps Customization
Running a Presentation
When giving a presentation with Impressive, you might want to experiment until you get the your desired settings in the command so that it is stored in your history. Remember that options specified in the command will override those given as global or page properties.
Impressive has a full set of keyboard shortcuts. To advance the presentation one slide, click the left mouse button; to go back one slide, click the right mouse button. Press the L key to return to the previously displayed page, or Tab to change the overview page that displays all the slides as thumbnails, which lets you navigate to any slide by clicking it with the mouse (Figure 3).
You can draw the audience's attention to a part of a slide in several ways. To start, the Z key toggles a single zoom in. More specifically, you can hold the left mouse button and drag the cursor to create a highlight box. A slide can have more than one highlight box, which can be closed by right-clicking inside the box. Similarly, when holding the Ctrl key and the left mouse button simultaneously, you can create a box to zoom into, allowing your audience to see complex diagrams more clearly, and then return to the original view by pressing the Esc key. Still another tool is a spotlight, which is activated by pressing Enter while moving the cursor. A spotlight's size can be adjusted with the + and - keys. When the presentation is finished, press Q to quit. When you quit the presentation, you can read the statistics about what resources Impressive has run (Figure 4).
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
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.