Libreoffice mime-type icons

Hi,
i'm curious to know if i'm the only that have ugly mime-type icons for LibreOffice files (.odt .doc .ods ...)
Before
I like to see the original LibreOffice mime-type icons, so after a lot of research on the web i've found the solution.
Following this http://standards.freedesktop.org/shared … atest.html
The applications mime-type action are stored under /usr/share/mime/packages.
Here you can find /usr/share/mime/packages/libreoffice.xml the LibreOffice mime-type file and if you open it you'll find something like that:
<mime-type type="application/vnd.oasis.opendocument.text">
<comment>OpenDocument Text</comment>
<glob pattern="*.odt"/>
<magic>
<match type="string" offset="38" value="application/vnd.oasis.opendocument.text"/>
</magic>
</mime-type>
In order to see the original icon in Nautilus / Dolphin you simply have to add a line of code that call the proper mime-type icon for example:
<icon name="libreoffice-oasis-text"/>
You have to do this for every mime-type type.
The follow example is for "OpenDocument Text"
<mime-type type="application/vnd.oasis.opendocument.text">
<comment>OpenDocument Text</comment>
<glob pattern="*.odt"/>
<icon name="libreoffice-oasis-text"/>
<magic>
<match type="string" offset="38" value="application/vnd.oasis.opendocument.text"/>
</magic>
</mime-type>
And after this work you can see something like this in Nautilus / Dolphin
After
If someone if interested i can post the updated libreoffice.xml file.
mod edit: Hello gspe, please read Forum Etiquette: Pasting Pictures and Code. Thanks. --fsckd
Last edited by fsckd (2011-11-07 20:05:21)

After a bit more research i've found the correct solution for the problem.
The problem actually is that the libreoffice mime-type icons follow a wrong naming.
For example if you go in /usr/share/icons/gnome/48x48/mimetypes
libreoffice-oasis-text.png
shoud be
application-vnd.oasis.opendocument.text.png
And so on for all entry in /usr/share/mime/packages/libreoffice.xml

Similar Messages

  • Mime-types icons in java code

    Hi all,
    I use a custom developed iView for viewing a list of KM documents.
    I now need to add an icon next to each document according to its mime-type.
    I want to use the table in System Administration -> System Configuration -> Knowledge Management -> Content Management -> Utilities -> Icons.
    Since I couldn't find a way to access it, I "copied" it to my code:
    private String getIconPath(IResource r){
         String filename = "unknown.gif";
         try{
              String mimeType = r.getContent().getContentType();
              if (mimeType.equalsIgnoreCase("application/msword")){
                   filename = "document.gif";
              else if (mimeType.equalsIgnoreCase("application/pdf")){
                   filename = "pdf.gif";
              else if (mimeType.equalsIgnoreCase("application/vnd.ms-excel")){
                   filename = "spreadsheet.gif";
              else if (mimeType.equalsIgnoreCase("application/vnd.ms-powerpoint")){
                   filename = "presentation.gif";
              else if (mimeType.equalsIgnoreCase("application/vnd.visio")){
                   filename = "vectorgraphics.gif";
              else if (mimeType.equalsIgnoreCase("application/vnd.wcm-folder")){
                   filename = "standard_folder.gif";
              else if (mimeType.equalsIgnoreCase("application/vnd.wcm-weblink")){
                   filename = "html_link.gif";
              else if (mimeType.equalsIgnoreCase("audio/basic")){
                   filename = "audio.gif";
              else if (mimeType.equalsIgnoreCase("audio/midi")){
                   filename = "audio.gif";
              else if (mimeType.equalsIgnoreCase("audio/mpeg")){
                   filename = "audio.gif";
              else if (mimeType.equalsIgnoreCase("audio/x_mpeg")){
                   filename = "audio.gif";
              else if (mimeType.equalsIgnoreCase("image/")){
                   filename = "image.gif";
              else if (mimeType.equalsIgnoreCase("link.application/msword")){
                   filename = "document_link.gif";
              else if (mimeType.equalsIgnoreCase("link.application/octet-stream")){
                   filename = "unknown_link.gif";
              else if (mimeType.equalsIgnoreCase("link.application/pdf")){
                   filename = "pdf_link.gif";
              else if (mimeType.equalsIgnoreCase("link.application/vnd.ms-excel")){
                   filename = "spreadsheet_link.gif";
              else if (mimeType.equalsIgnoreCase("link.application/vnd.ms-powerpoint")){
                   filename = "presentation_link.gif";
              else if (mimeType.equalsIgnoreCase("link.application/vnd.visio")){
                             filename = "vectorgraphics_link.gif";
              else if (mimeType.equalsIgnoreCase("link.application/vnd.wcm-folder")){
                   filename = "standard_folder_link.gif";
              else if (mimeType.equalsIgnoreCase("link.audio/basic")){
                   filename = "audio_link.gif";
              else if (mimeType.equalsIgnoreCase("link.audio/midi")){
                   filename = "audio_link.gif";
              else if (mimeType.equalsIgnoreCase("link.audio/mpeg")){
                   filename = "audio_link.gif";
              else if (mimeType.equalsIgnoreCase("link.audio/x_mpeg")){
                   filename = "audio_link.gif";
              else if (mimeType.equalsIgnoreCase("link.default")){
                   filename = "unknown_link.gif";
              else if (mimeType.equalsIgnoreCase("link.image/")){
                   filename = "image_link.gif";
              else if (mimeType.equalsIgnoreCase("link.text/html")){
                   filename = "html_link.gif";
              else if (mimeType.equalsIgnoreCase("link.text/plain")){
                   filename = "plaintext_link.gif";
              else if (mimeType.equalsIgnoreCase("link.text/xml")){
                   filename = "xml_link.gif";
              else if (mimeType.equalsIgnoreCase("link.video/vdo")){
                   filename = "video_link.gif";
              else if (mimeType.equalsIgnoreCase("sap-crt/state-error")){
                   filename = "s_s_ledr.gif";
              else if (mimeType.equalsIgnoreCase("sap-crt/state-not-init")){
                   filename = "s_s_ledi.gif";
              else if (mimeType.equalsIgnoreCase("sap-crt/state-ok")){
                   filename = "s_s_ledg.gif";
              else if (mimeType.equalsIgnoreCase("sap-crt/state-warn")){
                   filename = "s_s_ledy.gif";
              else if (mimeType.equalsIgnoreCase("text/html")){
                   filename = "html.gif";
              else if (mimeType.equalsIgnoreCase("text/plain")){
                   filename = "plaintext.gif";
              else if (mimeType.equalsIgnoreCase("text/xml")){
                   filename = "xml.gif";
              else if (mimeType.equalsIgnoreCase("video/vdo")){
                   filename = "video.gif";
         } catch (Exception e){
              e.printStackTrace();
         try {
              IURLGeneratorService urlgen = (IURLGeneratorService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);                         
              return urlgen.getImageUri(filename).toString();
         } catch (Exception e) {
              e.printStackTrace();
              return "";
    Is there a way to access that table and avoid this (ugly) duplication?
    Thanks ahead,
    Yoav.

    Hi,
    try using the mimeHandler service for getting the SRC of image for a resource in KM:
    IMimeHandlerService mh = (IMimeHandlerService)
      ResourceFactory.
      getInstance().
      getServiceFactory().
      getService("MimeHandlerService");
    String imagePath = mh.get(res).getImagePath();
    where 'res' is IResource object of the resource in KM.
    Hope this helps.
    Romano

  • Item Type Icon

    I added an icon to my URL "Item Type Properties". But, I don't see the icon on any URL items. I added every attribute to the "Displayed Attributes" for the region, and I still don't see any item type icons. The "Available Attributes" in "Edit Region" doesn't list anything like "Item Icon" anyway.
    Oracle Portal Version: 10.1.2.0.2
    How can I show the item icon? Or, what is it used for?
    Thanks.

    Hi Brian,
    You're talking about a mime type icon, and those are shown for a File Item. Those work fine. I'm talking about the Icon associated with the Item Type, where you specify the Icon in the "Item Type Properties" when you edit the Item Type.
    For example, I made an "External URL" Item type:
    Base Item Type: Base URL
    Name: EXTERNALURL
    Display Name: External URL
    Description: <none>
    Icon: <this is where I added my icon, and it's displayed in the properties here...>
    Help URL For Add Item Wizard: <none>
    Help URL For Edit Item Wizard: <none>
    In this Edit Item Type area, there are also tabs for "Item Type Attributes" and "Procedures". I don't think those apply.
    When I make an External URL item, there's no icon.
    Again, the portal version I'm using is 10.1.2.0.2.

  • How can I use one Add-on prior to another for specific MIME-types?

    I'm using Shockwave Flash plugin to watch some videos on YouTube, StreamCloud, etc. It also handles .mkv and .mp4 files/streams. After installing VLC Web plugin to handle MIME-types like mp3/4, mkv additionally and prior to the Flash plugin, Firefox keeps using Flash to handle those types insted. I cannot find options to set the desired priorities. Only disabling the Flash plugin solves my problem, but also keeps me from watching Flash contents, which Is not acceptable.
    Did I miss something or is this Firefox's fault?

    If you type or paste '''about:plugins''' in the address bar and press Enter, you can see which plugins are associated which various content types.
    I do not know how to prioritize one over the other for the same content type if the plugin settings (plugins often have an interface outside of Firefox to adjust their settings) do not allow that.
    As for MP4, I don't think Flash normally would be selected. I suspect the website is specifying a Flash media player and streaming the MP4 through that. If you want to hide the Flash plugin from a particular website, you can use the Permissions tab of the Page Info dialog.
    Click the padlock or globe icon in the address bar, then More Information, then Permissions. The top section of the Permissions panel should be "Activate Plugins". Here you can select Block for Flash for the current site. After reloading the page, does the media play using a different plugin?

  • Setting MIME type in IIS 4 & 5

    Well I am very impressed with this Web Start technology but it was a little slow downloading via sun's site.
    I set about trying to set it up on my company Intranet server before I demonstrated to my IT director.
    I saved the swingset2.jnlp file from the sun demo's page, used the Swingset2.jar file from the JDK 1.3.1 demos and got the swingset2.jnlp images and put them in an images subdirectory. Next I amended the swingset.jnlp to my own web server by changing the cobebase parameter. I then created a simple web page wrapper with a link to the jnlp file.
    In my directories I have the following files:
    swingset2.html
    swingset2.jar
    swingset2.jnlp
    images\swingset2.small
    On the server side IIS 5.0, I go into master properties for my web server, go to HTTP headers and hit the file types button.
    I then add a new entry with associated extension .jnlp and content type of application/x-java-jnlp-file
    Also found and changes the IIS.inf file just in case.
    Rebooted the web server to make sure everything is initialised correctly.
    When I launch the jnlp file from a client PC "Java Web Start" starts but I get the following error "Unable to launch Swingset2", details "category: download error. Bad MIME type returned from server when accessing resource: http://Newgreg/jaws/Swingset2.jnlp - text/html.
    The jnlp used is listed:
    <!--
    # @(#)template.jnlp     1.2 01/04/25
    # JNLP File for SwingSet2 Demo Application
    -->
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+"
    codebase="http://NewGreg/jaws/apps"
    href="SwingSet2.jnlp">
    <information>
    <title>SwingSet2</title>
    <vendor>Sun Microsystems, Inc.</vendor>
    <homepage href="../demos.html"/>
    <description>SwingSet2 Demo</description>
    <description kind="short">A demo of the capabilities of the Swing Graphical User Interface.</description>
    <icon href="images/swingset2.small.jpg"/>
    <offline-allowed/>
    </information>
    <resources>
    <j2se version="1.3+"/>
    <jar href="SwingSet2.jar" main="true" download="eager"/>
    </resources>
    <application-desc main-class="SwingSet2"/>
    </jnlp>
    Can anyone help??? I would love to start using this technology, it looks very promising.
    Email: [email protected]

    Have you been able to write your own java app and deploy it on that same server by any chance? It's hard to say whether it's something to do with the swing start demo configuration or whether it's your server's configuration. Since it's reporting bad MIME type I'm wondering if it's more related to the web server configuration.

  • Evince and mime types

    Since the last update of evince to 0.83 it won't open pdf files no more - I get:
    Unable to open document
    Unhandled MIME type: "application/pdf"
    Is this a bug?
    I can open pdfs using kpdf or kghostview without a problem.

    This one seems to be back, newest version.
    $ pacman -Qi evince
    Name : evince
    Version : 2.22.2-2
    URL : http://www.gnome.org
    Lizenzen : GPL
    Gruppen : gnome-extra
    Stellt bereit : Nichts
    Hängt ab von : libspectre>=0.2.0 gsfonts poppler-glib>=0.8.3
    libdjvu>=3.5.20 gnome-icon-theme>=2.22.0 t1lib
    libglade>=2.6.2 gnome-keyring>=2.22.2
    shared-mime-info
    Optionale Abhängigkeiten: Nichts
    Benötigt von : Nichts
    Konflikt mit : Nichts
    Ersetzt : Nichts
    Installationsgröße : 4696,39 K
    Packer : Unknown Packager
    Architektur : i686
    Erstellt am : So 08 Jun 2008 16:19:28 CEST
    Installiert am : So 29 Jun 2008 19:09:16 CEST
    Installationsgrund : Ausdrücklich installiert
    Installations-Skript : Ja
    Beschreibung : Simply a document viewer
    EDIT: Rolling your own as suggested by phorgan1 worked, again.
    Last edited by Captain Spaulding (2008-06-29 17:17:03)

  • Trouble shooting- MIME type "application/x-shockwave-flash"

    I am experincing a problem with watching youtube videos. This problem is exactly like Subtitlemewrong's problem which stated...
    "I received only the December '07 update of Quicktime (7.4) and Security Update (2007-009 1.1). That's it. And then my life went to shambles and flash content no longer displays on the web!"...
    "A website with flash content won't load, instead I get a block icon with a question mark and a message saying, "The page "Page Title X" has content of MIME type "application/x-shockwave-flash". Because you don't have a plug-in installed for this MIME type, the content can't be displayed." Sometimes I get directed to the Adobe site for Flash, which I'll download. But that doesn't do anything either."
    I tried the solution that was given by Klaus1 and it didn't work. I uninstalled using http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14157&sliceId=2
    Then I tried to install using http://www.adobe.com/shockwave/download/download.cgi?P1ProdVersion=ShockwaveFlash. I clicked on powerpc -based mac and started to install and recieved taht same message that I didn't have the plug-in installed this MIME type.
    Thanks for you help.

    Yeah, I already tried it under a different account. Unfortunately the new account had the same problem. I appreciate the suggestion. My only logical guess is that the new update to quicktime doesn't mix with 10.3 Panther. I am planning on upgrading to Leopard next week after I get my paycheck. Who knows, maybe those guys will know how to fix it, but so far...no luck. Thanks.

  • Content of MIME type "application/x-shockwave-flash"

    Hey, im not that advanced with this stuff but I keep on getting this message recently and I cannot remember any recent major downloads/updates:
    This page has content of MIME type “application/x-shockwave-flash”, but you don’t have a plug-in installed for this MIME type.
    This happens on Youtube, facebook and stuff like that. Also, Ive noticed that apple trailers using quicktime isnt working. I have installed the new plugins for flashplayer and Quicktime but still no result.
    Any help PLEASE? I hate using firefox coz i love safari!
    Cheers!
    Pratik

    Have you by any chance moved Safari from its proper place in the Applications Folder to a sub-folder, or renamed it?
    Try this routine:
    Repairing permissions is an important part of regular maintenance, and should always be carried out both before and after any software installation or update.
    Go to Disk Utility (this is in your Utilities Folder in your Application folder) and click on the icon of your hard disk (not the one with all the numbers).
    In First Aid, click on Repair Permissions.
    This only takes a minute or two.
    Background information here:
    http://docs.info.apple.com/article.html?artnum=25751
    and here:
    http://docs.info.apple.com/article.html?artnum=302672
    If you were having any serious problems with your Mac you might as well complete the exercise by repairing your hard disk as well. You cannot do this from the same start-up disk. Reboot from your install disk (holding down the C key). Once it opens, select your language, and then go to Disk Utility from the Utilities menu. Select your hard disk as before and click Repair.
    Once that is complete reboot again from your usual start-up disk.
    More useful reading here:
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck
    http://support.apple.com/kb/TS1417

  • Exporting AAC m4a podcast mime type problem

    Hi All,
    I have a podcast that I use GB3 to produce the enhanced podcast with (artwork podcast with links).
    When I upload this file to my server it shows up as application/octet-stream for mime type. The extension is still m4a but the desktop icon is now a quicktime movie whereas in the past it was always an iTunes icon, when I used ChapterToolMe, for instance.
    As a result my podcast/rss feed on the iTMS no longer updates the more recent shows (i've tried all the tricks to get that end of things working)
    I'm guessing there is some setting in GB3 that is changing the mime-type behind the scenes under the GUI. Can anyone suggest anything? Converting in iTunes all over again?

    Nathan,
    I wonder if you've found a solution yet? I'm having the same issue with my picture and link enhanced podcast. Whenever i post an m4a to my RSS feed, it breaks my subscription in iTunes????
    I hope someone has some knowledge on a fix for this.
    Adam

  • Changed mime type associations !

    I recently installed gimp, and now when I open any downloaded pdf files, they are opened in gimp.
    Files previously downloaded and saved are however opened in 'evince'. I use open-box, Chromium, Rox-filer and evince, as DE, browser, file-manager and document viewer respectively.
    I searched the wiki and found two entries that I thought might help, Default Applications and Custom file associations, I've tried both user specific options in these pages, here are the files I created:-
    [bance@archbox ~]$ cat .local/share/applications/defaults.list
    [Default Applications]
    pdf=evince.desktop
    [bance@archbox ~]$ cat .local/share/applications/evince.desktop
    [Desktop Entry]
    Name=Evince
    Exec=/usr/bin/evince
    MimeType=application/x-evince
    Icon=evince
    Terminal=false
    Type=Application
    Categories=DocumentViewer
    Comment=
    Neither of these has worked, do the files look ok? Have I made a mistake somewhere?
    OK whilst writing this post, I noticed that I have a file /usr/share/applications/mimeinfo.cache, It contains a list of mime type associations, would editing this work?
    TIA Steve

    you need!! the inode/directory setting in the mimetype list.  That's what chromium reads to autopen your file manager. 
    Make sure it matches the .desktop file appropriate for your file manager.  In the case of spacefm, it is not spacefm.desktop as you might expect, it is spacefm-folder-handler.desktop.
    Check your .desktop files for your fm.
    If you're still having trouble, you might want to post your mimeapps.list
    I noticed in post1 you were using defaults.list instead.  Reading the wiki is not super clear on this, but since I downloaded the pkg 'mimeo' I used mimeapps.list instead.
    I assume you read the file extension portion of the chromium part of the wiki:
    https://wiki.archlinux.org/index.php/Ch … sociations
    Moderator: Please take care to not duplicate entries when you forgot some information. Use the "Edit" button instead. And if you did inadvertently as in this case, please notify the moderators with the "Report" button so they can take action.
    Deleting the doubled entry. -- bernarcher
    Last edited by bernarcher (2013-02-03 02:00:49)

  • Mime-type question Gnome

    In Gnome I noticed something very strange. If I take an HTML file and name it helloworld.htm or helloworld.html then it shows up as a Mozilla bookmark with a mozilla bookmark icon. If I change the name to just "helloworld" then it lists as an html page.
    This isn't a huge problem, mostly aesthetic because the html icon is nicer, but does anyone have any idea of how to get the files with html extensions to show up as html pages and not bookmarks?
    I have the following mime related files installed:
    current/mime-types 1.0-1
        Provides /etc/mime.types
    extra/gmime 2.2.10-1
        Core mime parsing library
    extra/gnome-mime-data 2.18.0-3 (gnome)
        The base MIME and Application database for GNOME
    extra/nail 11.25-2
        A mail user agent derived from Berkeley Mail 8.1 and contains builtin
        support for MIME messages and IPv6
    extra/perl-file-mimeinfo 0.14-1
        Determine file type
    extra/perl-mime-lite 3.01-1
        Perl module that provides lightweight MIME generator
    extra/shared-mime-info 0.22-1
        Freedesktop.org Shared MIME Info
    community/mime-editor 0.5-1 (rox-desktop)
        Shared-mime info database editor, useful for changing MIME-type info in rox
        applications
    community/pantomime 1.2.0pre2-1
        A set of Objective-C classes that model a mail system
    community/perl-mime-parser 5.420-2
        Perl/CPAN Module MIME::Parser : Parses streams to create MIME entities
    community/perl-mime-types 1.19-2
        Perl/CPAN Module MIME::Types : Information and processing MIME types
    community/synce-libmimedir 0.4-1
        provide a means of communication with a Windows CE device - library that
        parses MIME Directory Profile.

    neodreams wrote:I have the same problem, you're not alone
    That does make me feel better... but no one honestly has any idea of how to fix this???

  • Missing file type icons in nautillus 2.14

    Since upgrading nautilus has been missing icons for several types of text file, so far I've noticed patch, plain text and html aren't correctly showing their icons and are instead just showing the default icon. I've scoured google and only found one other mention of this on the gentoo forums but no fix.
    At first I thought it could be related to some sort of error with the mime types but both pcmanfm and thunar show all icons correctly so I think it's more a nautilus thing.
    Any ideas?

    Those work for me, but I recently had a similar thing happen with my 'COPYING' file, which appears to be of type 'license terms'. This is with thunar. It's mildly annoying because the icon sticks out like a sore thumb, and this never used to be the case.

  • MIME type set but IE plugin doesn't like mp4

    Hi,
    I've made sure mp4 is checked in the MIME types list in the Quicktime control panel. Still mp4 files won't play in IE 6. FF plays them just fine, but I get the ugly broken plugin icon when I try see them in IE. I have reinstalled quicktime and rebooted to no effect.
    Thanks

    This is just a test I am making. I don't want to just open some file in Quicktime. I want to put an mp4 file in my website and have people see it.
    The final result will be that users will go to some page and the player will be embedded in code, but for now I am just accessing the file using the url. If I can't see it using the url in the browser much less I will be able to see it embedded in code.
    So basically the file is already there in my site but when I go to the url nothing happens. I'll worry about the code later. If I can't see the movie myself or if don't know how to fix this then I won't be able to solve similar issues for my users.
    Hope that clarifies things a bit

  • How to fix the "MIME types" problem  !

    Hello !
    How to fix the problem of "MIME types", Windows doesn't want to keep the APPS by default !!!
    When I try the application by default (for ex. right clic on .PSD files and "open with"), then I validates the selection program (Photoshop.exe), it does not appear in the selection of programs by default in windows!
    Result, even dynamic objects no longer open in my applications and all adobe files icon don't appear in explorer
    Thx

    I find a solution who works for me (Win7 64bit) !
    Use a Registry cleaner (ccleaner) and kill old file format entry !
    Now restart association with a .AI file, because the way to .exe is in another place like other apps !
    Try this:
    First, right click on your illustrator apps icon (desktop or Start menu) and choose "open the file location" and copy the dir ("C:\Program Files\Adobe\Adobe Illustrator CC 2014\Support Files\Contents\Windows" for me )
    Right clic on your .AI file and select "Open with", now click on "browse" to "C:\Program Files\Adobe\Adobe Illustrator CC 2014\Support Files\Contents\Windows" for 64bit system.
    "Windows" say "you've got problem with registry file association" the correction's automaticatly and the illustrator icon appear in the list of default apps.
    Select and valid him
    Now, do the same for all your "unknown files type" with the good apps !

  • Unable to launch application from my machine:Bad MIME Type

    Hi,
    The following error message was printed when I tried to access the SwingSet2 demo from the Java Web Start site.
    An error occurred while launching/running the application.
    Title: SwingSet2
    Vendor: Sun Microsystems, Inc.
    Category: Download Error
    Bad MIME type returned from server when accessing resource: http://java.sun.com/products/javawebstart/apps/SwingSet2.jnlp - text/html
    Can you please suggest what is to be done to rectufy this problem?
    Regards,
    Satish

    Bad MIME type returned from server when accessing
    resource:
    http://java.sun.com/products/javawebstart/apps/SwingSet
    .jnlp - text/htmlit should return application/x-java-jnlp-file.
    My guess is that you use proxy which messes up headers.
    Otherwise try to reinstall Web Start, then enable the console and log output in Web Start's advanced preferences to get more clues what's going on.
    Regards,
    Marc

Maybe you are looking for