This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[Solved] How 'Grab' icons for .exe files running under Wine

Tags: None
(comma "," separated)
rcameron
Registered Member
Posts
105
Karma
0
OS
Is it true that KDE has a built-in way of obtaining and using the icons from Windows executables, to use for Wine shortcuts/bookmarks?

On this page in Wine's online documentation, it describes a utility designed for Gnome, for this purpose.

Then, toward the bottom, it says, "The package [exe-thumbnailer] is not installed automatically if KDE is installed, as Kubuntu systems have their own similar icon-grabbing program."

I'm not running Kubuntu -- but, since Mint is based on Ubuntu/Kubuntu, I imagine the same would apply: don't use this utility, it's not necessary, since KDE has this facility built-in.

? But, if that's correct, then where is it, and how does one use it?

Searches of this forum and of the Internet have been unsuccessful.

Can someone advise me
-- and if you say it's not there, then are there any problems with installing the utility for Gnome? I'd rather stick with utilities designed for KDS, if possible ...

Last edited by rcameron on Sun Feb 08, 2015 8:44 pm, edited 2 times in total.


System information:
Linux Mint 17.3 | KDE Platform Version 4.14.2, and
Linux Mint 18.0 | KDE Platform Version 5.28.0
louis94
Registered Member
Posts
99
Karma
1
OS
Hello,

Dolphin has this feature, but it needs to be enabled explicitly. Check the corresponding box in Dolphin's configuration > General > Thumbnails.

Louis
rcameron
Registered Member
Posts
105
Karma
0
OS
louis94 wrote:... Check the corresponding box in Dolphin's configuration > General > Thumbnails.

Thanks Louis. I'm following your directions but need more help because I'm not arriving at the same place as you did.

Steps: Settings -> Configure Dolphin -> General -> ?
? means, I'm looking at the both the window that opened, and its tabs, but "Thumbnails" is not to be seen ...

Tabs are: Behavior, Previews, Confirmations, Status Bar -- no Thumbnails. I've also opened each Tab, and still, no Thumbnails.

Can you tell me what I'm missing? Again, I'm looking for a way to obtain and display an icon for a Windows .exe, that I'm running under Wine. But, available to use anywhere, not just to display in Dolphin, itself.
___________________
Dolphin
Version 4.13.3
Using KDE Development Platform 4.13.3


System information:
Linux Mint 17.3 | KDE Platform Version 4.14.2, and
Linux Mint 18.0 | KDE Platform Version 5.28.0
louis94
Registered Member
Posts
99
Karma
1
OS
rcameron wrote:Steps: Settings -> Configure Dolphin -> General -> ?
? means, I'm looking at the both the window that opened, and its tabs, but "Thumbnails" is not to be seen ...
Tabs are: Behavior, Previews, Confirmations, Status Bar -- no Thumbnails. I've also opened each Tab, and still, no Thumbnails.

Sorry, I was translating it back from French. It's the 'Previews' tab. There is long list of files types, and among them Windows .exe. Checking the box will enable displaying icons in Dolphin when they are enabled (the same way one can preview images or text documents).
I think other Kde-related programs use these previews (the desktop?). I've just tested running an installed Windows program from the main menu, and its window icon is displayed correctly.

Louis
rcameron
Registered Member
Posts
105
Karma
0
OS
louis94 wrote:It's the 'Previews' tab. There is long list of files types, and among them Windows .exe. Checking the box will enable displaying icons in Dolphin when they are enabled (the same way one can preview images or text documents).

OK, thanks for making it clear for me!
I've checked the box in front of the line, Microsoft Windows Executables, then OK. Next I've opened the Icon Source window, in the Properties of the Windows .exe file. There are two selection buttons here, for : System icons and Other icons.

Where do I go from here, to find and select the icon for my Windows .exe? It is displaying in Dolphin, correctly. But so far, it's not displaying anywhere else.

I have a Desktop Configuration File (on the Desktop, of course) that links to the .exe in Wine's C: Program Files directory. In spite of the .exe's icon showing in Dolphin, here it just shows as a gray page with a corner turned up and a gray question mark centered on it. I'd like for the icon to display here, if possible.
? Where do I go from here, to do that?

When I select Other Icons and then go the the .exe's directory, there's a filter on the file extension selection so it only displays image files -- so in this window, the .exe with its icon is -- actually, invisible.
Ron


System information:
Linux Mint 17.3 | KDE Platform Version 4.14.2, and
Linux Mint 18.0 | KDE Platform Version 5.28.0
louis94
Registered Member
Posts
99
Karma
1
OS
If you wish to use a .desktop file, you need to (1) extract the icon, (2) move it somewhere and (3) select it.

(1) is the most difficult. You can do it using wrestool, which is provided by icoutils. Its use is explained here. Basically, you do the following :
Code: Select all
wrestool -l 'path/to/the/exe/file.exe' | grep group_icon
This should output at least one line looking like this (with maybe a different name) :
Code: Select all
--type=14 --name='MAINICON' --language=3081 [type=group_icon offset=0x15d6d8 size=20]
Then, the following name will extract the main icon (say its name was MAINICON, as it is above) :
Code: Select all
wrestool -x -n 'MAINICON' 'path/to/the/exe/file.exe' > icon.ico
This will create a file named icon.ico in your home directory.

(2) Open Dolphin and move the icon to your favorite folder. You can rename it, too.
(3) Open the Icon Source window, tick the 'Other icons' box (again, translating from French), click 'Browse' and select the file you extracted.
rcameron
Registered Member
Posts
105
Karma
0
OS
OK, thanks - this sounds good.
louis94 wrote:... (3) Open the Icon Source window, tick the 'Other icons' box (again, translating from French), click 'Browse' and select the file you extracted.

I'm about ready to do this, but one question first: the Browse window file-selection filter will only allow display of the following file types:
Icon Files (*.png *.xpm *.svg *.svgz)

The last part of your step-by-step instructions shows the creation of an .ico icon file. I think ... if an extension isn't on the filter list, won't that prevent this file from being visible, and consequently, from being selected?
? How will I get around this? Is KDE able to use an .ico file, using some special work-around?

Thanks for your patience, if the answer is obvious -- it's the first time I'm doing this.


System information:
Linux Mint 17.3 | KDE Platform Version 4.14.2, and
Linux Mint 18.0 | KDE Platform Version 5.28.0
louis94
Registered Member
Posts
99
Karma
1
OS
I thought the dialog could use just any image file. Anyway, just open the icon in Gwenview (or your favorite image editor), and save it as a png file. (If Gwenview doesn't allow you to just Save As, flip the image twice and it will become possible.)
rcameron
Registered Member
Posts
105
Karma
0
OS
:) Very good, thanks Louis. Everything has been covered.

Once I have the .ico file, I'll double-check to see if it will open in the 'browse' window. I was beginning to suspect it would have to be converted.

This will be a good resource for other KDE users, confronting the same problem.

Ron


System information:
Linux Mint 17.3 | KDE Platform Version 4.14.2, and
Linux Mint 18.0 | KDE Platform Version 5.28.0


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]