Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-12-09 09:44:30

jeff story
Member
From: Shelton, WA, USA
Registered: 2011-05-09
Posts: 26
Website

How To Change .iso Icons In Thunar [Solved]

The Thunar icon for an iso looks like a blank sheet of paper.....   How to assign an icon that looks like a CD/DVD for iso files?

Last edited by jeff story (2013-06-02 06:48:35)

Offline

#2 2011-12-12 10:35:39

angstrom
Member
Registered: 2011-08-13
Posts: 267

Re: How To Change .iso Icons In Thunar [Solved]

File association are defined by *.desktop and mimeinfo.cache in /usr/share/applications/ or in ~/.local/share/applications/. I think that this also define what icon name are associated.

Last edited by angstrom (2011-12-12 10:37:17)


Xfce is NOT Xubuntu. Bugs in Xubuntu don't mean that Xfce is buggy ...

Offline

#3 2012-01-30 01:19:03

jeff story
Member
From: Shelton, WA, USA
Registered: 2011-05-09
Posts: 26
Website

Re: How To Change .iso Icons In Thunar [Solved]

Found an easy way to do this and want to pass it on.......

I'm running Arch, so some details will have to be change to suit your distro.
This is how I changed my *.iso icon from a blank file looking icon to a nice cd/dvd icon.


1) Built and installed assogiate from the AUR
2) Assogiate wouldn't run im my user account so....
3) I ran it in gksu ie:  $ gksu assogiate
4) Click the Database tab and select the "system database"
5) Use the search function to find "iso". My search results showed a single entry with the name "x-iso9660-image"
6) Double click the entry to edit the "default icon"
7) Click on the box to the right of the default icon file listing, navigate to your icon of choice and select it.
8) Re-login to update the mime database.

Last edited by jeff story (2012-01-30 01:29:41)

Offline

#4 2013-06-02 02:50:19

jeff story
Member
From: Shelton, WA, USA
Registered: 2011-05-09
Posts: 26
Website

Re: How To Change .iso Icons In Thunar [Solved]

Unfortunately, the above solution stopped working for some reason. So far, I tried rebuilding and reinstalling assogiate on my current updated system.

Running Arch linux 64bit,  linux 3.9.4-1,  assogiate 0.2.1-5,  xfdesktop 4.10.2-1,  thunar 1.6.3-1

Anyone have a solution for this?

Last edited by jeff story (2013-06-02 03:08:22)

Offline

#5 2013-06-02 06:47:36

jeff story
Member
From: Shelton, WA, USA
Registered: 2011-05-09
Posts: 26
Website

Re: How To Change .iso Icons In Thunar [Solved]

Tracked down a problem for assogiate to use an .svg icon. Switching to a .png icon restored function as expected, but using png's looked bad scaled up.

On my system, I reinstalled the current versions of librsvg python2-rsvg packages. This solved all the problems...

Offline

#6 2013-06-04 02:21:57

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: How To Change .iso Icons In Thunar [Solved]

I had a problem in Arch with some icons being replaced by this “blank sheet of paper” recently. I think it was caused by the librsvg update, or something related. I had to run a command to get my icons back; I think it was this one:

sudo /usr/bin/gdk-pixbuf-query-loaders --update-cache

(From https://bbs.archlinux.org/viewtopic.php … 7#p1251717 )

Offline

#7 2016-10-22 21:57:29

jeff story
Member
From: Shelton, WA, USA
Registered: 2011-05-09
Posts: 26
Website

Re: How To Change .iso Icons In Thunar [Solved]

Over 5000 views of this post. I'm wondering if someone here who's part of the xfce team and has the capacity could either figure out whats really wrong in Thunar, or possibly make this fix into a patch to submit. It would be a nice default setting.  I'd do it but it's a bit beyond my capabilities.

I've had to come up with a new fix for thunar showing a text icon for iso images rather than a CD icon. Assogiate made this really easy, but it's long gone these days. This took a bit of trial and error to figure out. It works 100% on my current Arch system and should work on any others.

You'll need to place 2 identical .xml files within the .hidden files of your home directory.

Call the files: 

 override.xml 

Most of the contents were copied from /usr/share/mime/packages/freedesktop.org.xml , with a few additions.

This is what was added to copied part to make it work:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">  
  <mime-type type="application/x-cd-image">
    <comment>raw CD image</comment>
     ...
     ...
     ... a bunch of code...
     ...
     ...
    <icon name="media-optical"/>
  </mime-type>
</mime-info>


Put the override.xml files in the following directories:

~/.local/share/mime/

and

~/.local/share/mime/packages/


Copy and paste the code below and put in in:
override.xml

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">  

  <mime-type type="application/x-cd-image">
    <comment>raw CD image</comment>
    <comment xml:lang="ar">صورة CD خامة</comment>
    <comment xml:lang="be@latin">suvoraja vyjava CD</comment>
    <comment xml:lang="bg">Изображение — raw CD</comment>
    <comment xml:lang="ca">imatge de CD en cru</comment>
    <comment xml:lang="cs">surový obraz CD</comment>
    <comment xml:lang="da">rå cd-aftryk</comment>
    <comment xml:lang="de">CD-Roh-Abbild</comment>
    <comment xml:lang="el">Εικόνα περιεχομένου ψηφιακού δίσκου</comment>
    <comment xml:lang="en_GB">raw CD image</comment>
    <comment xml:lang="eo">kruda lumdiskbildo</comment>
    <comment xml:lang="es">imagen de CD en bruto</comment>
    <comment xml:lang="eu">CD gordinaren irudia </comment>
    <comment xml:lang="fi">raaka CD-vedos</comment>
    <comment xml:lang="fo">rá CD mynd</comment>
    <comment xml:lang="fr">image CD brute</comment>
    <comment xml:lang="ga">amhíomhá dhlúthdhiosca</comment>
    <comment xml:lang="gl">imaxe de CD en bruto</comment>
    <comment xml:lang="he">תמונת דיסק גולמית</comment>
    <comment xml:lang="hr">Osnovna CD slika</comment>
    <comment xml:lang="hu">nyers CD-lemezkép</comment>
    <comment xml:lang="ia">Imagine CD brute</comment>
    <comment xml:lang="id">citra CD mentah</comment>
    <comment xml:lang="it">Immagine raw CD</comment>
    <comment xml:lang="ja">生 CD イメージ</comment>
    <comment xml:lang="kk">өңделмеген CD бейнесі</comment>
    <comment xml:lang="ko">CD 이미지</comment>
    <comment xml:lang="lt">raw CD atvaizdis</comment>
    <comment xml:lang="lv">CD jēlattēls</comment>
    <comment xml:lang="ms">Imej CD mentah</comment>
    <comment xml:lang="nb">rått CD-bilde</comment>
    <comment xml:lang="nl">ruw CD-beeldbestand</comment>
    <comment xml:lang="nn">rått CD-bilete</comment>
    <comment xml:lang="oc">imatge CD brut</comment>
    <comment xml:lang="pl">Surowy obraz CD</comment>
    <comment xml:lang="pt">imagem em bruto de CD</comment>
    <comment xml:lang="pt_BR">Imagem bruta de CD</comment>
    <comment xml:lang="ro">imagine de CD brută</comment>
    <comment xml:lang="ru">необработанный образ компакт-диска</comment>
    <comment xml:lang="sk">Surový obraz CD</comment>
    <comment xml:lang="sl">surovi CD odtis</comment>
    <comment xml:lang="sq">Imazh raw CD</comment>
    <comment xml:lang="sr">сирова слика ЦД-а</comment>
    <comment xml:lang="sv">rå cd-avbild</comment>
    <comment xml:lang="tr">Ham CD görüntüsü</comment>
    <comment xml:lang="uk">образ raw CD</comment>
    <comment xml:lang="vi">ảnh đĩa CD thô</comment>
    <comment xml:lang="zh_CN">原始 CD 映像</comment>
    <comment xml:lang="zh_TW">原生 CD 映像</comment>
    <sub-class-of type="application/x-raw-disk-image"/>
    <alias type="application/x-iso9660-image"/>
    <glob weight="80" pattern="*.iso"/>
    <glob pattern="*.iso9660"/>
    <icon name="media-optical"/>
  </mime-type>
</mime-info>

After you get the files placed, run the following commands. First as user, second as root.

$ update-mime-database ~/.local/share/mime/
# update-mime-database /usr/share/mime/

So as I said, trial and error. I think a few of these steps may be unnecessary, but it's what I did to get it working.

Last edited by jeff story (2016-10-23 01:29:42)

Offline

#8 2023-03-19 17:37:59

jeff story
Member
From: Shelton, WA, USA
Registered: 2011-05-09
Posts: 26
Website

Re: How To Change .iso Icons In Thunar [Solved]

I just used the post #7 method on a new install. Still works 7 years later.

Anyone know if there's an easier way to do this now?

Last edited by jeff story (2023-03-19 17:39:14)

Offline

#9 2023-03-19 19:05:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: How To Change .iso Icons In Thunar [Solved]

If the icon theme provides an icon for the mime type, it will be used. If not, you can either add/replace the icon or use a process similar to the one you've outlined in post #7 to override the mime entry.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

Board footer

Powered by FluxBB