Printing multiple files from the right-click context menu in Nautilus

If you want print files without open them, you can use nautilus scripting.
You can use your printer or a pdf printer (sudo apt-get install cups-pdf)

Go to ~/.local/share/nautilus/scripts
Create a new file and call it ""

  1. #!/bin/bash
    # Print files from the right-click context menu in Nautilus.
    # Place this script in ~/.local/share/nautilus/scripts.
    # The printer to use (as shown in the Printer Configuration
    # gui or in /etc/cups/printers.conf).
    echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | while read file
            lpr -P "$printer" "$file"
    exit 0
In printer value, you can choose your favorite one with the same name that you see in your printers.

Now give execution permission to the file (chmod +x and restart nautilus.
If you click on a document, now you can see it as follows (In my case I created 2 printers):


Popular posts from this blog

How to fix Android when developer options are not available for this user

from: can't read /var/mail/ in Python scripts

How to fix VirtualBox error when you try to import an ova file