Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: kde4 mime-list is broken for iso file associations -- they appear as text files

  1. #1
    Join Date
    Jul 2008
    Location
    Toronto, Canada
    Posts
    1,253

    Default kde4 mime-list is broken for iso file associations -- they appear as text files

    Has any one noticed the before and after download of an ISO file? During the download it initially shows a cd/dvd icon representation for the ISO file.
    But, upon completion of the download, it changes to a text-plain file association.

    I just downloaded the openSUSE-13 1.1-KDE-Live-x86_64.iso and it appears as a plain text document.
    The applications associated with it are kate, kwrite, LibreOffice Writer

    When I type:
    Code:
    file --mime-type openSUSE-13\ 1.1-KDE-Live-x86_64.iso
    The result is:
    Code:
    openSUSE-13 1.1-KDE-Live-x86_64.iso: application/octet-stream
    In Configure Desktop-->Common Appearance and Behavior-->File Associations-->application/octet-stream is unknown.

    This is a bug which KDE4 devs have marked as fixed. The problem is that I remember this working in openSUSE 13.1 and earlier releases of KDE4 i.e. KDE4.11- 4.12x - 4.13x- 4.14.1.
    My Linux Box
    OS:
    openSUSE 51.1 - Plasma 5.12.8
    OS:
    Tumbleweed Plasma 5.16.4
    ASUS P5Q | Intel Quad 6600 @3.02 GHz | 8GB G.SKILL RAM | Nvidia GeForce 750 Ti

  2. #2

    Default Re: kde4 mime-list is broken for iso file associations -- they appear as text files

    I've noticed the same thing. Very odd, indeed. I have the same thing on both my desktop and laptop, both running 13.2
    I'm confused...No, wait...Maybe I'm not...

  3. #3
    Join Date
    Jul 2008
    Location
    Toronto, Canada
    Posts
    1,253

    Default Re: kde4 mime-list is broken for iso file associations -- they appear as text files

    I have an ISO folder where I've stored some iso image files for VirtualBox.
    The iso files downloaded with openSUSE 13.1 where shared-mime-info v1.1 was used are okay. That is if they are on a partition running openSUSE 13.1.

    I've submitted a Bugzilla report: http://bugzilla.opensuse.org/show_bug.cgi?id=904100
    However, the freedesktop creators of shared-mime-info database say it may not be a bug from their end.
    GNOME's nautilus file manager does not have this problem.

    See: https://bugs.freedesktop.org/show_bug.cgi?id=80877

    So, the problem has been forwarded upstream to the KDE/dolphin devs. See: https://bugs.kde.org/show_bug.cgi?id=337035

    A simple workaround is to make a file association with k3b and acetoneiso2.
    My Linux Box
    OS:
    openSUSE 51.1 - Plasma 5.12.8
    OS:
    Tumbleweed Plasma 5.16.4
    ASUS P5Q | Intel Quad 6600 @3.02 GHz | 8GB G.SKILL RAM | Nvidia GeForce 750 Ti

  4. #4

    Default Re: kde4 mime-list is broken for iso file associations -- they appear as text files

    Thanks for the info, and for following through with the bug report!
    I'm confused...No, wait...Maybe I'm not...

  5. #5
    Join Date
    Jul 2008
    Location
    Toronto, Canada
    Posts
    1,253

    Default [FIX] kde4 mime-list is broken for iso file associations -- they appear as text files

    FIX HAS BEEN FOUND

    I found a fix for the broken ISO file associations. A special thanks to margueritesu who found the patch that created this mess.
    A patch that was added between 1.2 and 1.3 referring to "x-wii-rom" broke the ISO.

    Here are the steps:
    1. Open konsole and type kdesu kwrite -- then your password
    2. Navigate to /usr/share/mime/packages/freedesktop.org.xml
    3. Open freedesktop.org.xml
    4. In kwrite navigate to Edit -->Go to Line
    5. Type in: 7951 and press <enter>
    6. At the beginning of the line 7951 type <!-- in front of <mime-type type="application/x-wii-rom">
    7. Type in: 7972 and press <enter>
    8. At the end of line 7972 -- add this --> after </mime-type> -->
    9. Save your changes and close kwrite


    The entire "application/x-wii-rom" and "application-x-gamecube-rom" block example appears below:
    Code:
     <!--  <mime-type type="application/x-wii-rom">
        <comment>Wii disc image</comment>
        <alias type="application/x-wii-iso-image"/>
        <alias type="application/x-wbfs"/>
        <alias type="application/x-wia"/>
        <generic-icon name="application-x-executable"/>
        <glob pattern="*.iso"/>
        <magic priority="50">
          <match value="0x5d1c9ea3" type="big32" offset="24"/>
          <match value="WBFS" type="string" offset="0"/>
          <match value="WII\001DISC" type="string" offset="0"/>
        </magic>
      </mime-type>
      <mime-type type="application/x-gamecube-rom">
        <comment>GameCube disc image</comment>
        <generic-icon name="application-x-executable"/>
        <alias type="application/x-gamecube-iso-image"/>
        <glob pattern="*.iso"/>
        <magic priority="50">
          <match value="0xc2339f3d" type="big32" offset="28"/>
        </magic>
      </mime-type> -->
    Once the entire "Wii disc image" and "GameCube disc image" block has been commented out the ISO image files return to the correct association.

    Note: You may have to run in konsole or xterm:
    Code:
    update-mime-database /usr/share/mime/
    My Linux Box
    OS:
    openSUSE 51.1 - Plasma 5.12.8
    OS:
    Tumbleweed Plasma 5.16.4
    ASUS P5Q | Intel Quad 6600 @3.02 GHz | 8GB G.SKILL RAM | Nvidia GeForce 750 Ti

  6. #6

    Default Re: kde4 mime-list is broken for iso file associations -- they appear as text files

    Thank you both for the work around! I can confirm this works.
    I'm confused...No, wait...Maybe I'm not...

  7. #7
    Join Date
    Jul 2008
    Location
    Toronto, Canada
    Posts
    1,253

    Default Re: kde4 mime-list is broken for iso file associations -- they appear as text files

    I would like to follow up on my title " FIX HAS BEEN FOUND ". This is not an official openSUSE fix.
    This is a fix recommended by me on the openSUSE forum and margueritesu on bugs.kde.org.

    A very big thank you to margueritesu. The discrepancy was found with one of the patches.
    Ref: http://cgit.freedesktop.org/xdg/shared-mime-info/log

    One of the Archlinuxwiki users downgraded an arch package for shared-mime-info v1.2 and it fixed the problem.

    Since openSUSE did not have that package as an rpm package, I downloaded shared-mime-info v1.2 from the freedesktop.org website.
    Download from: http://freedesktop.org/wiki/Software/shared-mime-info/

    Used the steps below:
    1. First back up /usr/share/mime/packages/freedesktop.org.xml
    2. Download and extract the package shared-mime-info-1.2.tar.xz.to your /home directory
    3. Copy the freedesktop.org.xml file to /usr/share/mime/packages/ directory
    4. Overwrite the original freedesktop.org.xml file

    This really works!

    This is an alternate option for users that do not want to search for "Wii disc image" and "GameCube disc" image entry and commenting it out.
    IMHO It's still faster to comment it out.

    For reference, please read: https://bugs.freedesktop.org/show_bug.cgi?id=80877#c5
    And: https://bugs.kde.org/show_bug.cgi?id=337035
    Ref: https://bugzilla.opensuse.org/show_bug.cgi?id=904100
    My Linux Box
    OS:
    openSUSE 51.1 - Plasma 5.12.8
    OS:
    Tumbleweed Plasma 5.16.4
    ASUS P5Q | Intel Quad 6600 @3.02 GHz | 8GB G.SKILL RAM | Nvidia GeForce 750 Ti

  8. #8

    Default Re: kde4 mime-list is broken for iso file associations -- they appear as text files

    Hi,

    Running 13.2 with stock KDE here and i ran into that issue as well. Editing

    Code:
    /usr/share/mime/packages/freedesktop.org.xml


    and running

    Code:
    update-mime-database /usr/share/mime/
    after that does the job/fix completely.

    Here is how i did it.

    First backup any file you are editing no matter how/which editor you are using.

    Code:
    cp -v /usr/share/mime/packages/freedesktop.org.xml /tmp

    Now you can edit that file. I use Unix command based editor ed. (as root)

    Code:
    printf '%s\n' '7951s/^/<!-- /' w .  '7972s/$/ -->/' w . | ed -s /usr/share/mime/packages/freedesktop.org.xml
    Update the mime database

    Code:
    update-mime-database /usr/share/mime/
    Just in case you did something wrong the backup is in

    Code:
    /tmp/freedesktop.org.xml


    or just reinstall the package.

    Code:
    shared-mime-info
    Again that is how i solve that issue and I'm not saying it is the correct/official fix
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  9. #9
    Join Date
    Jul 2008
    Location
    Toronto, Canada
    Posts
    1,253

    Default Re: kde4 mime-list is broken for iso file associations -- they appear as text files

    Very nice. Simple and effective. Thanks for providing an alternative.

    TIP: If you delete freedesktop.org.xml rather then reinstalling the package just run:
    Code:
    update-mime-database /usr/share/mime/
    This will recreate another copy of the same file.

    The problem stills exists with KDE4. Why is GNOME's nautius not having this problem yet dolphin and other file managers do?
    Hopefully we will be able to resolve this before the next release of openSUSE in 2015.

    I would encourage KDE4 users to test this on Plasma 5.
    My Linux Box
    OS:
    openSUSE 51.1 - Plasma 5.12.8
    OS:
    Tumbleweed Plasma 5.16.4
    ASUS P5Q | Intel Quad 6600 @3.02 GHz | 8GB G.SKILL RAM | Nvidia GeForce 750 Ti

  10. #10
    Join Date
    Jul 2008
    Location
    Toronto, Canada
    Posts
    1,253

    Default Re: kde4 mime-list is broken for iso file associations -- they appear as text files

    Follow Up

    I have found a third option on repairing the broken association with ISO files. It has been submitted to the people maintaining the "shared-mime-info" package.

    1. Open "dolphin -super user mode"
    2. Start kate or kwrite
    3. Navigate to Edit --> Go to Line and type 7200. Press the enter key.

    This is the entry for x-cd-image. You will be editing lines 7200 and 7201.

    The original entries appears as:
    Code:
    <glob pattern="*.iso"/>
    <glob pattern="*.iso9660"/>
    Change it to:
    Code:
    <glob weight="60" pattern="*.iso"/>
    <glob weight="60" pattern="*.iso9660"/>
    Click on Save, close your editor and dolphin.

    Open konsole or xterm and log in as "su -" (without the quotes).

    Copy and paste the line below and press enter.
    Code:
    update-mime-database /usr/share/mime/
    Open dolphin and check the ISO files. You will see the correct CD icon has returned and the files are now recognized as x-cd-image files.
    My Linux Box
    OS:
    openSUSE 51.1 - Plasma 5.12.8
    OS:
    Tumbleweed Plasma 5.16.4
    ASUS P5Q | Intel Quad 6600 @3.02 GHz | 8GB G.SKILL RAM | Nvidia GeForce 750 Ti

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •