Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
Site Navigation
Linux Forums
Linux Articles
Product Showcase
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Free Publications

Configure GNOME and a file browser that supports thumbnailers (such as Nautilus) to generate icons embedded inside Windows executables.

Dependencies: icoutils (can be found in most repositories).

This guide will allow your file browser (Nautilus is used in this guide, but with some amendments other browsers supporting external thumbnailers should work) to automatically extract and generate GNOME-compatible icons for Windows executables.

We'll use a combination of wrestool and icotool, provided by icoutils. First we will create a bash script to utilise these two binaries, since GNOME will only execute simple commands as thumbnailers, but not bash script or similar.

As root, create an empty file in /usr/bin named 'msiconailer' (or whatever you want to call your thumbnailer) then copy and paste this code into the contents of the file using a text editor:

wrestool -x -t14 $1 | icotool -x -o $2 -

This code first extracts the 'main' icon (type 14) from your Windows exe (specified by the first argument $1). These binaries can include multiple cursors/icons, so we need to use wrestool to make sure we get the one we want. The data for this icon will be passed to stdout by wrestool, which we then pipe into icotool, which converts this data into a PNG format image and writes it to disk in the location specified as the second argument ($2). Here's an example use of our script:

msiconailer /path/to/windows.exe /path/to/exportedicon.png

Once you've saved the script (and don't forget to make it executable), we can configure our thumbnailer in GNOME.

The thumbnailers are configured inside gconf-editor (you can access this via the Applications menu or just enter gconf-editor into a terminal). The specific path to the thumbnailers is /desktop/gnome/thumbnailers - but to add new keys here we must use the terminal. Execute these two commands in the terminal:

gconftool-2 --type=bool --set "/desktop/gnome/thumbnailers/application@x-ms-dos-executable/enable" true
gconftool-2 --type=string --set "/desktop/gnome/thumbnailers/application@x-ms-dos-executable/command" "/usr/bin/msiconailer %i %o"

Your thumbnailer has been added - browse to a Windows executable using Nautilus to see icons generated.

If your exe icons don't appear, don't forget to empty the .thumbnails/fail folder in your home directory, and make sure things are configured correctly in Nautilus preferences (such as abandoning thumbnail-generation for files over a certain size or residing in a remote location).

Rate This Article: poor excellent
Comments about this article
writen by: alexwriter on 2015-11-17 15:36:52
Thanks, i use this on my home PC
RE: Gnome written by alexwriter:

Comment title: * please do not put your response text here