Random techie babbling...

Help, Adobe Air for Linux ate my mimetypes?

**note** – I would have posted this in the bug list, but I can’t find it, the link from the FAQ just goes to the products page?

**fixed** – Ashutosh from Adobe provided a working fix in the comments below, nice one!

After installing the new Alpha of Adobe Air for Linux yesterday on Ubuntu 7.1 the mime types for .zip files seem to be broken and I can’t figure out how to fix them. When I clicked on a standard .zip file it used to open in FileRoller, it now gives me an error that the filename indicates it’s a zip but the contents indicate it’s an Air Application. I need to use ‘Open With’ to select FileRoller. Not the end of the world but a bit of a pain. Also, the files have a zip icon but this changes to a .air icon when I click it.

Poking around a bit I found xdg-mime included in the files installed with Air (side note, why? I’ve already got these installed, isn’t that the point of using the package manager to install this stuff?) and also an accompanying AdobeAir.xml file…

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
 
  <mime-type type="application/vnd.adobe.air-application-installer-package+zip">
    <comment>Adobe AIR Application</comment>
    <glob pattern="*.air"/>
    <magic priority="100">
      <match type="string" value="PK\003\004" offset="0"/>
    </magic>
  </mime-type>
</mime-info>

…not sure what the magic stuff does but it looks ok? Also testing with xdg-mime seems to point to the mime types being correct?

adam@ubuntu:~$ xdg-mime query filetype ~/Desktop/08_04_02.zip 
application/zip
adam@ubuntu:~$ xdg-mime query default application/zip
file-roller.desktop
adam@ubuntu:~$ xdg-mime query default application/vnd.adobe.air-application-installer-package+zip
AdobeAIR.desktop

There’s also an air.mime file that also looks ok to me..

application/vnd.adobe.air-application-installer-package+zip
        ext: air

I’ve also just spotted, the files have been simlinked incorrectly into /usr/share/mime-info/ …

ls -la /usr/share/mime-info/air.*
 
adam@ubuntu:~$ ls -la /usr/share/mime-info/
lrwxrwxrwx   1 root root      54 2008-03-31 20:26 air.keys -> /opt/Adobe AIR/Versions/1.0/xdg-utils/support/air.keys
lrwxrwxrwx   1 root root      54 2008-03-31 20:26 air.mime -> /opt/Adobe AIR/Versions/1.0/xdg-utils/support/air.mime

the links should be to /opt/Adobe AIR/Versions/1.0/support/* , no xdg-utils, so I’ve tried …

adam@ubuntu:~$ sudo unlink /usr/share/mime-info/air.keys 
adam@ubuntu:~$ sudo unlink /usr/share/mime-info/air.mime 
adam@ubuntu:~$ sudo ln -s /opt/Adobe\ AIR/Versions/1.0/support/air.keys /usr/share/mime-info/air.keys 
adam@ubuntu:~$ sudo ln -s /opt/Adobe\ AIR/Versions/1.0/support/air.mime /usr/share/mime-info/air.mime

but this doesn’t seem to fix anything. Any other ideas anyone?

———
note to self, may be time to look at a liquid layout for the blog :)

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

24 Comments

Got something to say? Feel free, I want to hear from you! Leave a Comment

  1. Matt Osbun says:

    Are you using Gnome or KDE?

    I use both, and AIR has dome the same thing with me on my Gnome installation. Archive files as well as OpenOffice files are now, by default, handled by AIR.

    I am not having any of these issues with KDE, however.

  2. oldskool73 says: (Author)

    Yeah, Gnome here.

  3. Dan Councill says:

    I also get this when trying to open Filezilla :
    10:06:11 PM: can’t open file ‘/usr/share/mime-info/air.mime’ (error 2: No such file or directory)
    10:06:11 PM: can’t open file ‘/usr/share/mime-info/air.keys’ (error 2: No such file or directory)

  4. oldskool73 says: (Author)

    @Dan, yeah, seems like the installer writes the symlinks to the wrong places, you can unlink them and re-link them by hand (see the bottom of the post) but it doesn’t seem to fix the issue for me anyway?

  5. Hi,

    We’re actively looking at this issue for the next drop/release – some other users have also reported this problem on some

    distributions.

    To fix this, please try the following:

    1. Run the following command as root (use the “xdg-mime” at /opt/Adobe AIR/Versions/1.0/xdg-utils/xdg-mime) -

    xdg-mime uninstall –novendor “/opt/Adobe AIR/Versions/1.0/support/AdobeAIR.xml”

    2. Remove the following three lines from “/opt/Adobe AIR/Versions/1.0/support/AdobeAIR.xml” -

    <magic priority=”100″>

    <match type=”string” value=”PK0304″ offset=”0″/>

    </magic>

    3. Run the following command as root (use the “xdg-mime” at /opt/Adobe AIR/Versions/1.0/xdg-utils/xdg-mime) -

    xdg-mime install –novendor “/opt/Adobe AIR/Versions/1.0/support/AdobeAIR.xml”

    Do let us know if this does not fix the problem (at the AIR Linux forum –

    http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=677)

    - Ashutosh

    Adobe Systems Inc.

  6. oldskool73 says: (Author)

    @Ash – ahh, so maybe it was the magic lines after all? I’ll give that a try when I get home, thanks.

  7. oldskool73 says: (Author)

    I can confirm the fix above from Ashutosh worked for me (although there needs to be two ‘-’s before novendor.)

    Cheers!

  8. Arno Gourdol says:

    The bug tracker for AIR related bugs is at http://www.adobe.com/go/wish.

    The jira bug base is only for Flex, Tamarind and BlazeDS.

    Cheers,
    Arno.
    Adobe AIR Team

  9. Marco Filipe says:

    That fix didn’t work for me. I’m using Ubuntu 8.04 and It only happens when I run pgAdmin III.

  10. Marco Filipe says:

    Guess I spoke too soon, I your solution at the bottom of the post fixed my problem.
    Thanks

  11. fox says:

    I cannot yet solve the problem in CentOS5.

  12. Derick says:

    It worked for Ubuntu 7.10, thanks!

  13. flavin says:

    @Ashutosh amazing, thanks!!! it worked perfectly

  14. Serverless says:

    No luck with ubuntu hardy, still problems when opening a zip file from firefox’s download dialog…

  15. Serverless says:

    Unfortunately it doesn’t solve the problem on Ubuntu Hardy.

  16. Steve says:

    The unlinking / linking did it for me. Editing AdobeAIR.xml did not.

    I am using Kubuntu 8.04.

    The affected application is Junglediskmonitor, which was affected when run and whenever one entered the configuration dialog. It is fine now that I have changed those symlinks.

  17. Pretto says:

    The fix worked on ubuntu 8.04 just changing the –novendor preceding with two -

  18. Pretto says:

    By the way.. no need to unlink files :D

  19. Martin Vazquez says:

    You only have to run as root:
    xdg-mime uninstall –mode system /usr/local/share/mime/packages/AdobeAIR.xml

Trackbacks for this post

  1. Fuzzy Logic
  2. » Errori mime-key in Filezilla su Ubuntu 8.04 » pietrodigiorgio.it
  3. Errori mime-key in Filezilla su Ubuntu 8.04 | Yourpage live news aggregator
  4. Errori mime-key in Filezilla su Ubuntu 8.04 | Yourpage live news aggregator

Leave a Comment

Let us know your thoughts on this post but remember to place nicely folks!