Yesterday I attended a presentation of a colleague, but unfortunately during his speech the PDF viewer on his laptop crashed.

His supervisor told him to use pdf_presenter_console . Don’t know whether you’ve already heard about this tool? It’s able to display the current slide on the beamer-screen while you can see the next slide on your real screen. Generally a nice idea, but the software seemed to be a bit unstable ;-)

Anyway, I always wanted to find a solution to see some notes for a single slide while the slide is active, and today I set to work.

I searched for tools that are able to open two different PDF’s at once, I tried impressive, some vnc hacks, and so on, until I realized that there is already a smart solution on my laptop using the lightweight PDF viewer XPDF!

XPDF has a nice remote feature, if you run it like

xpdf -remote SOMEID presentation.pdf &

you can use your terminal to send some commands to the viewer. For example to go to the next slide try the following (see the COMMANDS section of XPDFs man page):

xpdf -remote SOMEID -exec nextPage

Great, isn’t it!? (if you receive the error error: "nextPage" file not found scroll down to XPDF is buggy)

I think the rest is clear, open two different XPDF-instances, one for the notes and one for the presentation itself:

usr@srv % xpdf -remote NOTES notes.pdf &
usr@srv % xpdf -remote PRESENTATION presentation.pdf &

and define some keys to scroll through the PDFs. You could use xbindkeys to bind the keys to the commands, for example I use F9 to go to the next slide and added the following to my ~/.xbindkeysrc :

"xpdf -remote PRESENTATION -exec nextPage && xpdf -remote NOTES -exec nextPage"
    m:0x10 + c:75

After running

xbindkeys -f ~/.xbindkeysrc

I’m able to go to the next slide by pressing F9 . To find the keycodes for some keys you may use xbindkeys -k or xev . Take a look at the documentation for more information (GER). Of course presentation.pdf and notes.pdf should have the same number of pages ;-)

XPDF is buggy

The -exec flag didn’t work for me, returning the following error:

usr@srv % xpdf -remote SOMEID -exec nextPage
error: "nextPage" file not found

I tried version 3.02 and also 3.03. The problem is located in the XPDF wrapper script, located in /usr/bin/xpdf . If you take a look at the contents you’ll find the following lines (in my case it’s 25ff):

while [ "$#" -gt "0" ]; do
    case "$1" in
    -z|-g|-geometry|-remote|-rgb|-papercolor|-eucjp|-t1lib|-ps|-paperw|-paperh|-upw)
        cmd="$cmd $1 "$2"" && shift ;;
    -title)
        title="$2" && shift ;;
    -m)

They simply forgot to define the -exec parameter to take an argument. So nextPage is not seen as argument for -exec and XPDF tries to find a file called nextPage that is obviously not present. To patch this you just need to add -exec like:

while [ "$#" -gt "0" ]; do
    case "$1" in
    -z|-g|-geometry|-remote|-rgb|-papercolor|-eucjp|-t1lib|-ps|-paperw|-paperh|-upw|-exec)
        cmd="$cmd $1 "$2"" && shift ;;
    -title)
        title="$2" && shift ;;
    -m)

or just use xpdf.real directly and skip the wrapper:

usr@srv % xpdf.real -remote SOMEID -exec nextPage

Since modifying files in /usr/bin isn’t a good idea I recommend to just substitute xpdf for xpdf.real in your ~/.xbindkeysrc .

That’s it for the moment, I wish you a nice presentation ;-)


Martin Scharm

stuff. just for the records.

Do you like this page?
You can actively support me!

Leave a comment

There are multiple options to leave a comment: