Thumbnailer for the GNOME desktop environment that displays thumbnails for CorelDRAW (.cdr) files in the file manager (Nautilus/Files).
It works by extracting the embedded thumbnail that already exists inside the .cdr file (which is actually a ZIP archive in versions X4+).
- Extracts embedded thumbnails from
.cdrfiles (tries multiple internal paths:previews/thumbnail.png,preview.png,metadata/thumbnails/thumbnail.png). - Optionally resizes the thumbnail to the requested size if ImageMagick is installed.
- Integrates with GNOME to display thumbnails in the file manager.
- Bash: Script interpreter.
- unzip: To extract the thumbnail from the
.cdrfile. Install withsudo apt install unzipif needed. - GNOME Desktop Environment: Required for thumbnailer integration (Nautilus/Files).
- ImageMagick (optional): To resize thumbnails. Install with
sudo apt install imagemagick.
First, make the scripts executable:
chmod +x install.sh uninstall.shThen run the installer:
./install.shThe script will:
- Check that
unzipis installed. - Copy
cdr-thumbnailer.shto/usr/bin/and make it executable (requiressudo). - Copy
cdr.thumbnailerto~/.local/share/thumbnailers/. - Update the paths in the
.thumbnailerfile.
Note: The thumbnailer script must be installed in
/usr/bin/because GNOME 43+ runs thumbnailers inside a bubblewrap (bwrap) sandbox that only has access to/usr,/lib, and/lib64. Scripts in~/.local/bin/are not accessible inside the sandbox.
After installation, clear the thumbnail cache and restart Nautilus:
rm -rf ~/.cache/thumbnails/*
nautilus -q./uninstall.shAfter uninstalling, clear the cache and restart Nautilus:
rm -rf ~/.cache/thumbnails/*
nautilus -qIf you prefer to install manually:
- Copy the script to
/usr/bin/and make it executable:
sudo cp cdr-thumbnailer.sh /usr/bin/
sudo chmod +x /usr/bin/cdr-thumbnailer.sh- Create the thumbnailers directory (if it doesn't exist) and copy the configuration file:
mkdir -p ~/.local/share/thumbnailers
cp cdr.thumbnailer ~/.local/share/thumbnailers/- Update the paths in the
.thumbnailerfile:
sed -i "s|^TryExec=.*|TryExec=/usr/bin/cdr-thumbnailer.sh|" ~/.local/share/thumbnailers/cdr.thumbnailer
sed -i "s|^Exec=.*|Exec=/usr/bin/cdr-thumbnailer.sh %i %o %s|" ~/.local/share/thumbnailers/cdr.thumbnailer- Clear the cache and restart Nautilus:
rm -rf ~/.cache/thumbnails/*
nautilus -qGNOME uses .thumbnailer files in ~/.local/share/thumbnailers/ (user-level) or /usr/share/thumbnailers/ (system-level) to generate thumbnails.
The cdr.thumbnailer file specifies:
- MimeType: MIME types for CorelDRAW files (
application/x-cdr,application/vnd.corel-draw,image/x-cdr,image/cdr,application/x-vnd.corel.zcf.draw.document+zip). - TryExec: Path to the script. The system checks if it exists before using it.
- Exec: Command executed by GNOME.
%i= input file,%o= output file,%s= requested size.
The cdr-thumbnailer.sh script receives these arguments, attempts to extract a thumbnail from the .cdr (ZIP) file trying multiple possible paths, and optionally resizes it with ImageMagick.
GNOME 43+ runs external thumbnailers inside a bubblewrap (bwrap) sandbox for security. The sandbox only mounts /usr, /lib, and /lib64 as read-only, which is why the script must be installed in /usr/bin/.
-
Thumbnails not showing:
- Check that
unzipis installed:which unzip - Verify the paths in
~/.local/share/thumbnailers/cdr.thumbnailerare correct. - Check that
cdr-thumbnailer.shis executable:ls -la /usr/bin/cdr-thumbnailer.sh - Clear the cache:
rm -rf ~/.cache/thumbnails/*and restart:nautilus -q - Check logs:
journalctl --user -b | grep -i thumb
- Check that
-
Manual script test:
/usr/bin/cdr-thumbnailer.sh /path/to/file.cdr /tmp/test.png 256Feel free to open issues or pull requests if you find problems or have suggestions.