I have never really been a fan of the multipage tiff creation within xsane. It works okay when you are scanning a lot of paper that makes up a single document, but it is somewhat cumbersome when you just want to lay a big stack of paper on the scanner consisting of several single and multi-page documents, scan in the entire batch as single page files and then create your own multipage tiff files on the fly.

I have used tiffcp in the past to create multipage tiffs from the command line. However, what I wanted was something built into Nautilus so as I was reviewing large icons of the batch of paper I just scanned, I could simply select the ones that go together, right click, and create a multipage tiff from those files.

Installing nautilus-actions

To make this happen, I was going to need something that allowed me to customize my right click options in Nautilus. Some quick googling lead me to the nautilus-actions package. It provides a slick interface to build out custom actions for the right click menu, exactly what I wanted to do!

Setting up nautilus-actions

After installing, I navigated to System > Preferences > Nautilus Actions Configuration and added a new action called “Create Multipage TIFF”.

The next thing to do was to setup what I wanted this action to do using the Edit Action dialog. It is pretty easy to do as well. We specify the label, the tooltip, the command we want to use, and the additional options. Nautilus-actions provides a legend for passing various parameters that could be determined based on what is selected. For what I wanted to do, I simply needed a list of all the files I selected (%M) and the current working directory (%d). I decided I wanted my output naming convention to look something like, out-<filename of file I right clicked on>.tiff, so out-%f.tiff became my last parameter.

I think this next part is really cool. Nautilus-actions allows me to specify when I want this right click option to be available. This is great because I don’t want to see this option when I am not selecting multiple tiff images. To prevent this from happening, you can just click on the Conditions tab and build it out. For my use case, I wanted this to show up only when I selected multiple tiff images. I didn’t want to fuss with specifying multiple file extensions, so I decided to qualify on the mime type, image/tiff. Finally, I specified that this should work for only files, and checked the “Appears only if selection has multiple files or folders” checkbox.

The Result

After logging out and back in to restart Nautilus, I was ready to test. I found a directory with several tiff files that I wanted to merge, selected 2 of them and saw my beautiful, customized Nautilus action.