Thumbnail support

  • Milan Nikolic

    Milan Nikolic - 2011-12-18


    Rodent filemanager is amazing :) I can't believe I only recently hear about it (although I used before xffm).
    In times where everyone more and more dumb done interface a powerful file manager that uses standard tools and is fast and easy to use is much appreciated.

    One thing I would really like to see in rodent is more options for thumbnails. Either some way to configure thumbnail programs like thunar had before (~/.local/share/thumbnailers I think), where you could configure executable for mime types  or, even better, one rodent option that if enabled will use a file if already exists in users ~/.thumbnails dir .
    For example, I  have a large comic book collection, and a script to generate thumbnails, all rodent could do is read that file if it is there.

    Thanks,  looking forward to next relases!


  • Edscott Wilson Garcia

    Just got back from vacation and saw your post.

    Currently Rodent will cache all generated thumbnails in a directory structure located at ~/.cache/thumbnails ( Here you will find a directories where the directory name is a hashtable key for the corresponding directory path which is cached.)

    Rodent will create the thumbnail file on displaying it. If the thumbnail file exists and is not older than the file it thumbnails, then it will be recreated.

    Your second suggestion sounds cool. If a thumbnail file exists in ~/.thumbnails directory (and it is not older than the file it is supposed to thumbnail, and has the correct thumnail size) then Rodent could use it. There are currently 4 different sizes for thumbnails in Rodent.

    The only problem with the ~./thumbnails approach is that you may have two different files with the same name in different directories. This is a bug with the ~/.thumbnails apporach: which is the thumbnail to associate?

    So that option is out. So probably the best option would be to modify the script you use so that the generated thumbnails follow the hash table key nomenclature. This would allow you to generate the thumbnails overnight, for example. Otherwise, Rodent will generate the thumnails on a need to know basis.

    Rodent Delta is in the oven and now uses gtk+3 (gtk+2 still available). Transparenent access to ftp and sftp/ssh hosts and obex devices (mobile phones) and a multithreaded xfsamba plugin will be included in the release.


  • Milan Nikolic

    Milan Nikolic - 2012-02-14

    Hi, thanks for your reply.
    I managed to change the script I use to generate thumbnails. (comic-thumbnails from . For now I use python ctypes to call glib g_string_hash, because I couldn't find equivalent function in python, I thought this is the same like djb_hash but apparently it is not.

    However, thumbnails still doesn't show in rodent, I generated them for size 20, 48, 96 and 400. Are there any hardcoded mime types in code for which this should work or am I missing something?

    Thank you for your time.


  • Edscott Wilson Garcia

    Rodent checks for supported image types in gtk library. These include .gif, .jgp, .png, .svg. Postscript and pdf files are previewed via ghostscript. Thumbnails are not generated for postscript or pdf files, only images. What is the format for the files you have problems with thumbnails?

  • Milan Nikolic

    Milan Nikolic - 2012-02-15

    Those are actually zip and rar archive, containing images, application/x-cbr and application/x-cbz are mimetypes.
    That is why I thought it would be nice to have support for freedesktop thumbnails, if file (no matter which type) has generated thumbnail, just show it… Now, I understand rodent does it different, and some option, not turned on by default will be great for this, if it can be done somehow…

    I can't program in C, or I would try to hack it somehow…

  • Edscott Wilson Garcia

    Interesting… Rodent will show thumbnails for openoffice files and these are zip archives. Within the zip archive the thumbnail is already generated so Rodent just extracts it.

    If the thumbnail handling in x-cbr and x-cbz is similar (which sounds logical), adding support for thumbnails would be very easy indeed. I would need an example file to test it out, so if you send me one x-cbr and one x-cbz I'll look into it.


  • Milan Nikolic

    Milan Nikolic - 2012-02-15

    I believe those are just plain archives, with no internal thumbnail support. I have I function that tries to guess cover (usualy named cover or front) and returns first image if those are not found. Pretty successful so far.

    Here are some archives, with couple of images only, for testing. Bluecoats 1 - Robertsonville Prison.cbr Bluecoats 2 - The Navy Blues.cbz

  • Edscott Wilson Garcia

    I understand the issue now.  cbz file thumbnails requires very little modification of code used for openoffice files. cbr files, OTH, are a bit trickier and require that unrar be installed. I'll start  coding it during my lunch break.

  • Edscott Wilson Garcia

    In the current subversion repository, Image preview support is now enabled for both x-cbz and zip files, previewing the first image file found in the archive. see

    I'm having problems with the rar file. The command

    unrar e  "/home/edscott/tmp/The Bluecoats 1 - Robertsonville Prison.cbr" The_Bluecoats_1_-_Robertsonville_Prison_0001.jpg

    gives me

    UNRAR 4.00 freeware      Copyright (c) 1993-2011 Alexander Roshal
    Extracting from /home/edscott/tmp/The Bluecoats 1 - Robertsonville Prison.cbr
    No files to extract
  • Milan Nikolic

    Milan Nikolic - 2012-02-15

    Hey, that is great! Thanks. Will try svn version ;)
    About that message, You will need also directory path inside archive, like this:
    unrar e -inul -p- "/tmp/The Bluecoats 1 - Robertsonville Prison.cbr" "The Bluecoats 1 - Robertsonville Prison/The_Bluecoats_1_-_Robertsonville_Prison_0001.jpg"

    In my script, I get this from unrar vb output. Hope it helps.


  • Edscott Wilson Garcia

    Cool. I think that

    unrar vb

    will do the trick. I'll try to get my hands on it tomorrow.

    The svn version is mostly stable outside of the "FUSE" (filesystem in user space) and samba plugins, which are in active development.

  • Milan Nikolic

    Milan Nikolic - 2012-02-16

    Thank You, I just compiled version from svn and I am enjoying :)



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks