Set EXIF Date for Image Files in Thunar

Jump Straight In!

Basic Tab

Appearance Conditions Tab

To add a custom action open Thunar file manager from the menu select Edit -> Configure custom actions…

The Bash Script

The examples on this page use the bin directory within the user’s Home directory. Home -> User -> bin. Place the script in the bin folder.

What You’ll Need:

  • Thunar File Manager: (Part of XFCE desktop environment)
  • exiftool: A powerful command-line utility for reading, writing, and editing image metadata. You must have this installed.
    • Installation: Open a terminal and run: sudo apt install libimage-exiftool-perl (or the appropriate package manager command for your Linux distribution).
  • Bash Shell: (Typically pre-installed on most Linux distributions)
  • A location to store the script. The recommended location is in your user’s bin directory (/home/<your_username>/bin).

Creating the Custom Action in Thunar:

  1. Open Thunar Configuration: From the Thunar menu, select Edit -> Configure custom actions….
  2. Add a New Action: Click the “+ Add” button to create a new custom action.
  3. Configure the Action Details:
FieldValueDescription
Name:EXIF dateThe name that will appear in the right-click menu.
Description:Set / change EXIF date for imagesA brief explanation of what the action does.
Command:xfce4-terminal --title "Set EXIF Date" --command "bash /home/<your_username>/bin/exif %F" (Replace <your_username> with your actual username)This command opens a terminal window, sets the title to “Set EXIF Date,” and executes the exif script (located in your bin directory), passing the selected file(s) as arguments. The %F is a Thunar variable that represents the full path of the selected files. Important: Adjust the path /home/<your_username>/bin/exif to match where you saved the exif script.
Appearance Conditions Tab – File Pattern:*This allows the action to apply to any file type.
Appears if selection contains:Image FilesThis ensures the action only appears when you right-click on image files (e.g., JPG, PNG, TIFF).

The Bash Script (exif – Save this as a file named exif in your /home/<your_username>/bin/ directory):