Custom mime types

i am using iplanet web server 6.0 sp3 and iplanet application server 6.5 enterprise edition. i have jsp pages with extension as .msp and all my servlets have extension .msv. now i want to add the mime types .msp and .msv in iplanet web server and whenever the web server gets .msp and .msv requests i want the web server to redirect such requests to iplanet application server. how do i do this? i know i need to add the mime types to mime.types file and i need to change the obj.conf file. but i do not know what function to call in obj.conf? can anybody help me? thanks in advance."

if your portlet is in C# use this before building the HMTL table
Response.Buffer = true;Response.ContentType = "application/vnd.ms-excel";Response.AddHeader("content-disposition", "attachment; filename=YourFileName.xls");this.EnableViewState = false;Response.Charset = String.Empty;
next, use a string builder System.Text.StringBuilder strBuilder = newSystem.Text.StringBuilder();
add the HTML table , and return strBuilder (all this stuff must be on yourFunction() )
On the portlet HTML have a call like this <%#yourFunction() %> placed betweenn <form> and </form>
I hope this help!Val

Similar Messages

  • Custom MIME with Verity

    I am attempting to index a directory of BusinessOjbects
    reports, ext .rep. I set up a custom mime type in IIS 6.
    The extension is rep. I've used several mime types to index
    the reports. text/plain, application/x-rpt,
    application/octet-stream. It looks as though verity is searching
    the directory, but it comes up with no records for the collection.
    Does anyone have any ideas on how I can index these reports?
    Thanks. for the help.

    if your portlet is in C# use this before building the HMTL table
    Response.Buffer = true;Response.ContentType = "application/vnd.ms-excel";Response.AddHeader("content-disposition", "attachment; filename=YourFileName.xls");this.EnableViewState = false;Response.Charset = String.Empty;
    next, use a string builder System.Text.StringBuilder strBuilder = newSystem.Text.StringBuilder();
    add the HTML table , and return strBuilder (all this stuff must be on yourFunction() )
    On the portlet HTML have a call like this <%#yourFunction() %> placed betweenn <form> and </form>
    I hope this help!Val

  • Automatically open file based on MIME type and file extension

    We have an app that is registered to handle custom MIME type and file extension. This works perfectly on IE and FireFox causing them to download the file to a temp folder and then launch our app associated with MIME type and file extension with command line to the downloaded file. On Safari however this does not work. It opens up a download window and shows that it has downloaded the file with no option to open it.

    hello, you can file a bug on bugzilla.mozilla.org if you want to include your plugin in the plugin finder service...
    [https://wiki.mozilla.org/PFS]

  • Prompting a "Save As" dialog for an accepted mime type

    Hi ,
    I am using the following code to prompt a "Save As" dialog bod for an xls file:
    response.setHeader("Content-disposition","attachment; filename=test.xls");
    This does work, it prompts the save as dialog box with the name "test.xls" if i click on save. However if i click on open, it displays an error saying the file could not be found.
    Any idea how to specify a custom file name for an accepted mime type?
    Thanks in advance

    Ok let me try & be more clear.
    I have a JSP page. In this page there is an "Create Excel" link. When this link is clicked, the JSP dynamically creates the data. Then the following code:
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-disposition","attachment; filename=test.xls");
    This causes the file save dialog box to be created. This dialog box has "open" & "save" options.
    When the save option is clicked, the user is prompted to save a file named test.xls. However if the user clicks on the "Open" dialog box, then the file is not opened,i get an error message saying the file does not exist.
    If i dont specify the
    response.setHeader("Content-disposition","attachment; filename=test.xls");
    Then the file save dialog box displays a default filename which is the same as name of my servlet. This works for both Open as well as save options.
    I hope i have not confused you further..:)
    Please help!

  • Image size and mime type.. non-java guy needs help

    Image size, mime type.. non-java guy needs help
    Im not at all familiar with java so this is really weird for me to work out. I?ve been doing it all day (and half of yesterday).
    Im trying to write a custom clodFusion tag in java that gets the width, height, size and MIME types of a given file. I?ve been trying to get it to work on the command line first. I can get the width and height but cant get the size and the MIME type.
    Here is what I got
    /*import com.allaire.cfx.*;*/
    import java.awt.image.renderable.*;
    import javax.media.jai.*;
    import com.sun.media.jai.codec.*;
    import java.io.*;
    import java.util.*;
    public class ImageInfo {
    private RenderedOp image = null;
    private RenderedOp result = null;
    private int height = 0;
    private int width = 0;
    private String type = "";
    private String size = "";
    public void loadf(String file) throws IOException
    file = "80by80.jpg";
    FileSeekableStream fss = new FileSeekableStream(file);
    image = JAI.create("stream", fss);
    height = image.getHeight();
    width = image.getWidth();
    System.out.println(height + "\n");
    System.out.println(width);
    System.out.println(type);
    public static void main(String[] args) throws IOException {
    ImageInfo test = new ImageInfo();
    test.loadf(args[0]);
    can anyone please help me out to modify the above so I can also print the mime type and the file size to screen.
    thanks for any help

    any suggestions?

  • How to determine mime-type of a file using OSB

    I was working on a requirement where in it requires to use FILE/ FTP adapters using OSB or BPEL as solution. The idea is to pick up files from one location to another location for certain legacy platforms. The real issue is, someone can put a JPEG file in the upload/download location(s), merely by changing the extensions. When this happens the systems will not process since the mime-type is incorrect.
    I know of an open-source API (Apache-Tikka) to determine the mime-types, but then if we use open-source why would customer buy from us.
    The intention is to pick-up the file and simply pass-it (and not parse) on to next system using File or FTP adapter, but in the process, cross check the MIME-TYPE before doing so.
    Any solution using Oracle Service Bus or BPEL would help

    HI Birender,
    Kindly go through the metalink doc for processsing jpeg/xml/pdf etc any atachement using bpel :Understanding XPATH functions for processing MIME attachments with BPEL PM in SOA Suite 11gR1 [ID 1272093.1]
    Regrds,
    olety

  • Mime types / wsrp

    Hi all,
    I'm trying to display an excel spreadsheet from within a jsp in a portlet over wsrp.
    Whenever I make a request from the consumer, I get the error:
    java.lang.IllegalArgumentException: MIME type [application/vnd.ms-excel] is not supported by the consumer/portal. Supported types(s) is(are) [ text/html  text/xml  application/xml  application/xhtml+xml  text/plain  image/png  */* ].
    and looking at the wsrp request sent over by the consumer, the mimeTypes it says it supports are:
    <v1:markupParams>
    <v1:secureClientCommunication>false</v1:secureClientCommunication>
    <v1:locales>en-GB</v1:locales>
    <v1:locales>en</v1:locales>
    <v1:mimeTypes>text/html</v1:mimeTypes>
    <v1:mimeTypes>text/xml</v1:mimeTypes>
    <v1:mimeTypes>application/xml</v1:mimeTypes>
    <v1:mimeTypes>application/xhtml+xml</v1:mimeTypes>
    <v1:mimeTypes>text/plain</v1:mimeTypes>
    <v1:mimeTypes>image/png</v1:mimeTypes>
    <v1:mimeTypes>*/*</v1:mimeTypes>
    <v1:mode>wsrp:view</v1:mode>
    My question is how do I get my consumer to support additional mimetypes?
    I am using WLP 10 MP1.
    Thanks

    This can be solved in different ways.
    1) You can use custom data transfer.please go through the below link
    http://edocs.beasys.com/wlp/docs81/wsrp/custxfer.html
    2) Use resource url tag library in your view on producer.
    3) User resource proxy servlet on Consumer.
    <!-- Proxy servlet to serve resources from producers -->
    <servlet>
    <servlet-name>com.bea.wsrp.consumer.resource.ResourceProxyServlet</servlet-name>
    <servlet-class>com.bea.wsrp.consumer.resource.ResourceProxyServlet</servlet-class>
    <init-param>
    <param-name>resourceHeaderFilter</param-name>
    <param-value>com.bea.wsrp.consumer.resource.CustomResourceHeaderFilter</param-value>
    </init-param>
    </servlet>
    CustomResourceHeaderFilter.java:
    package com.bea.wsrp.consumer.resource;
    //import com.bea.p13n.util.debug.*;
    import com.bea.wsrp.consumer.resource.ResourceHeaderFilter;
    import com.bea.wsrp.consumer.resource.ResourceHeaders;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.ServletContext;
    import java.util.*;
    public class CustomResourceHeaderFilter implements ResourceHeaderFilter
    private static final HashSet requestHeadersToSkip = new HashSet();
    // Debug
    //private static final Debug debug =Debug.getInstance(DefaultResourceHeaderFilter.class);
    private static final Logger LOGGER = LoggerHelper.getLogger(CustomResourceHeaderFilter.class);
    // By default, the following request headers will not be proxied private static final HashSet requestHeadersToSkip = new HashSet();
    static
    //requestHeadersToSkip.add("get");
         //requestHeadersToSkip.add("post");
         //requestHeadersToSkip.add("host");
         //requestHeadersToSkip.add("cookie");
         //requestHeadersToSkip.add("expect");
    public ResourceHeaders getPassThroughHeaders(HttpServletRequest request, ServletContext context, String url)
         //request.getSession().getId()
    ResourceHeaders passThroughHeaders = new ResourceHeaders(); List passThroughValues;
    // All headers
    Enumeration headerNames = request.getHeaderNames();
    while(headerNames.hasMoreElements())
    String name = (String) headerNames.nextElement();
    if(requestHeadersToSkip.contains(name.toLowerCase()))
    continue;
    passThroughValues = new LinkedList();
    Enumeration values = request.getHeaders(name);
    while(values.hasMoreElements())
    String value = (String) values.nextElement();
    LOGGER.info("[Sending] " + name + ": " + value);
    passThroughValues.add(value);
    if (passThroughValues.size() > 0)
    passThroughHeaders.addHeader(name, passThroughValues);
    return passThroughHeaders;
    }

  • 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

  • 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)

  • Webstart - Registering a custom file type

    I'm trying to use a jnlp file to register a custom file type (*.flf) with Windows XP / Vista. I have added the following line to the jnlp file near the bottom (right by the main class tag):
    <association extensions="flf" mime-type="application-x/flf" />On some sites I have found this listed as mime type first and extensions second and also with just a > no the end without a />. Neither seems to be working. I also found it listed inside the information section but this didn't work either.
    Am I missing something blindingly obvious? For reference heres the entire jnlp file
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for SimpleExample Application -->
      <jnlp codebase="http://ukpcw032:8080/jclock" href="jFreelancer.jnlp">
        <information>
           <title>CVC Freelancer Time Sheets</title>
           <vendor>CVC</vendor>
           <description>CVC Freelancer Time Sheets - Program to allow freelancers to generate their time sheets for submission.</description>
           <description kind="short">Fee</description>
           <offline-allowed/>
           <icon href="images/overview.png" />
           <icon kind="splash" href="images/splash.jpg" with="365" height="260"/>
           <shortcut>
           <desktop/>
           <menu submenu="CVC"/>
           </shortcut>
         </information>
         <resources>
           <j2se version="1.6"/>
           <jar href="jFreelancer.jar"/>
           <jar href="libs/mysql-connector-java-5.1.6-bin.jar"/>
           <jar href="libs/iText-2.1.3.jar"/>
           <jar href="libs/DateChooser.jar"/>
           <jar href="libs/dsn.jar" />
           <jar href="libs/imap.jar" />
           <jar href="libs/pop3.jar" />
           <jar href="libs/smtp.jar" />
           <jar href="libs/mailapi.jar" />
         </resources>
         <security>
           <all-permissions/>
         </security>
         <association extensions="flf" mime-type="application-x/flf" />
         <application-desc main-class="freelancer.UserLogin"/>
    </jnlp>

    That JNLP file is invalid. Try this variant..
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for SimpleExample Application -->
      <jnlp codebase="http://ukpcw032:8080/jclock" href="jFreelancer.jnlp">
        <information>
           <title>CVC Freelancer Time Sheets</title>
           <vendor>CVC</vendor>
           <description>CVC Freelancer Time Sheets - Program to allow freelancers to generate their time sheets for submission.</description>
           <description kind="short">Fee</description>
           <icon href="images/overview.png" />
           <icon kind="splash" href="images/splash.jpg" width="365" height="260"/>
           <offline-allowed/>
           <shortcut>
           <desktop/>
           <menu submenu="CVC"/>
           </shortcut>
         <association extensions="flf" mime-type="application-x/flf" />
         </information>
         <security>
           <all-permissions/>
         </security>
         <resources>
           <j2se version="1.6"/>
           <jar href="jFreelancer.jar"/>
           <jar href="libs/mysql-connector-java-5.1.6-bin.jar"/>
           <jar href="libs/iText-2.1.3.jar"/>
           <jar href="libs/DateChooser.jar"/>
           <jar href="libs/dsn.jar" />
           <jar href="libs/imap.jar" />
           <jar href="libs/pop3.jar" />
           <jar href="libs/smtp.jar" />
           <jar href="libs/mailapi.jar" />
         </resources>
         <application-desc main-class="freelancer.UserLogin"/>
    </jnlp>I also have a demo of the [FileOpen/SaveService|http://pscode.org/jws/api.html#fs] that you might also test, but I just noticed that launch file is also slightly invalid. I have seen it work on Win XP using Java 1.6 though.
    Edit 1:
    I used YAXV to validate the launch file against an XSD that is based on the DTD distributed by Sun. YAXV is freeware, and I highly recommend* using it to check the JNLP file(s) for any JWS launch that does not work as expected.
    * OK - I wrote it, so I might be biased. ;-)
    Edited by: AndrewThompson64 on Aug 12, 2008 11:05 PM

  • CLM Mail MIME Type Issue

    Users are entering special characters in the instructions to the signatory, and when the string is picked up into the custom email, the system is mis-translating the characters in the CLM.We suspect on the custom java mail util not setting up the MIME Type.
    Any help would advise on this

    In custom email, you manually set the content type. Here is an example:
    msg.setContent(txt,"text/html");
    where txt is the formatted string.
    and msg is of type MimeMessage.
    Incase you are using the method "setText", change it as shown above and it should work fine
    Regards,
    Immanuel

  • How to check if filetype or MIME type is supported on windows phone 8 or above ?

    Hi, 
    I want to write a simple functionality to know if filetype/MIME type is supported on device.
    This function will take filetype (e.g. pdf) and MIME type (e.g. application/pdf) as input parameter and returns true or false according to result.
    I searched for sample with this functionality but couldn't get one. If anyone have any idea or sample for this, that will be a great help.
    Thanks in advance !
    Regards,
    Anurag 
    Anurag_24

    Hi Anurag,
    >>I want to write a simple functionality to know if filetype/MIME type is supported on device.
    It seems like that there are some misunderstanding here, if a filetype can be opened by an app, it does not mean that the OS supports this type, it should be in application level.
    I think you expect that there are some places to store all supported filetype/mime type in OS, but I've not heard that the OS forced an application to register supported filetype/mims type.
    So your idea is good, but firstly, as far as I know, there is no such API to retrieve all available file types, secondly, even if there are some ways, they should not get all information you expected.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Howto: turn off pesky MIME type handling enforced by some programs

    I finally did something about this on my system. You know how file managers like Thunar and Nautilus give multiple MIME types to the same file? Openoffice text will be treated as an openoffice document as well as a compressed tar for instance. There could also be multiple programs capable of viewing a file that has one MIME type. e.g. GIMP becomes the default "image viewer" even though you have a lightweight program that you'd rather use instead.
    Of course none of this is a pain if you use the command line but for the times when I click on files in Thunar, I don't want to have to always worry about whether I should've right clicked and gone "open with." Anyway, here's how I deleted ALL the default MIME handlers and re-instated my own.
    #!/bin/bash
    # The pieces inside ### should be in your cron or pacman wrapper if you want this to stay
    cd /usr/share/applications
    ls | grep desktop | xargs sed -i -e '/MimeType=/d'
    ls | grep desktop | xargs sed -i -e 's/StartupNotify=true/StartupNotify=false/g'
    for file in `ls | grep desktop`; do
    cp $file ~/.local/share/applications/${file/.desktop/-usercreated.desktop}
    done
    rm ~/.local/share/applications/mimeinfo.cache
    rm ~/.local/share/applications/defaults.list
    Then I recreated defaults.list as (not exhaustive but still growing):
    [Default Applications]
    audio/x-wav=audacity-usercreated.desktop
    application/x-shockwave-flash=swfdec-player-usercreated.desktop
    application/x-java-jnlp-file=java-web-start-usercreated.desktop
    audio/mpeg=audacity-usercreated.desktop
    application/x-bittorrent=deluge-usercreated.desktop
    application/javascript=medit-usercreated.desktop
    application/rdf+xml=medit-usercreated.desktop
    application/zip=xarchiver-usercreated.desktop;squeeze-usercreated.desktop
    application/x-compressed-tar=xarchiver-usercreated.desktop;squeeze-usercreated.desktop
    video/mp4=mplayer-usercreated.desktop
    text/html=medit-usercreated.desktop;chromium-usercreated.desktop;firefox-usercreated.desktop
    application/postscript=evince-usercreated.desktop
    application/x-cbr=evince-usercreated.desktop
    text/plain=medit-usercreated.desktop
    video/x-msvideo=mplayer-usercreated.desktop
    application/x-cbz=evince-usercreated.desktop
    image/gif=mirage-usercreated.desktop;gimp-usercreated.desktop
    audio/x-flac=audacity-usercreated.desktop
    application/vnd.ms-powerpoint=impress-usercreated.desktop
    application/x-java-archive=xarchiver-usercreated.desktop;squeeze-usercreated.desktop
    application/smil=kino-usercreated.desktop
    application/vnd.oasis.opendocument.text=writer-usercreated.desktop
    video/x-flv=mplayer-usercreated.desktop
    application/vnd.oasis.opendocument.spreadsheet=calc-usercreated.desktop
    application/x-gnumeric=gnumeric-usercreated.desktop
    image/png=mirage-usercreated.desktop;gimp-usercreated.desktop
    application/x-audacity-project=audacity-usercreated.desktop
    video/x-ms-wmv=mplayer-usercreated.desktop
    image/jpeg=mirage-usercreated.desktop;gimp-usercreated.desktop
    application/msword=writer-usercreated.desktop;abiword-usercreated.desktop
    image/bmp=mirage-usercreated.desktop;gimp-usercreated.desktop
    video/mpeg=mplayer-usercreated.desktop
    application/pdf=epdfview-usercreated.desktop;evince-usercreated.desktop
    application/vnd.oasis.opendocument.presentation=impress-usercreated.desktop
    I know that's out of order, but if I put it in order, it gets screwed up again the next time Thunar edits it.
    I found out the mime type names in the first place by clicking on a file I wanted to open and typing in the custom command /usr/bin/dummy.  /usr/bin/dummy is a script I made which simply deletes the newly created dummy-usercreated.desktop file. Then I just go into defaults.list and change the appended
    foo/x-bar:dummy-usercreated.desktop
    to
    foo/x-bar:whatever-i-want-usercreated.desktop
    And yes the "-usercreated" suffix does seem to be special. The next step would be converting firefox to use this I think.
    One other thing I did was delete /root/.local/share/applications and I made a smylink /root/.local/share/applications -> ~/.local/share/applications so root file managers get the benefit for free. Of course then you must be careful to run:
    #!/bin/bash
    cd ~/.local/share/applications
    ls | grep desktop | xargs sed -i -r 's/Exec=(.*)/Exec=sudo -u your_user \1/g'
    Last edited by ConnorBehan (2010-09-13 23:22:41)

    First caveat noticed:
    I had to recompile thunar-archive-plugin and hardcode it to use xarchiver. Before the only way for it to discover xarchiver was to use the mime database which I deleted in the OP. I don't know how to reimplement this plugin as a Thunar action because the Thunar vfs doesn't have an easy way to distinguish archive types.

  • Servlet application MIME type browser window issue

    Hi,
    I am writing a servlet that launches an application on a citrix server and as such the MIME type is as below:
    response.setContentType("application/x-ica");
    The user is supposed to click an internet explorer link on their desktop and the application will open, however currently a browser window opens and remains blank while the application launches and does not close until done so manually. I have seen examples where users can click a link and the browser window closes itself straight away, and the application continues to launch.
    Can anyone advise how to correct this problem?
    Thanks.

    I've found out what the problem was, wasn't related to the servlet itself it was a client side custom component making multiple requests, which the app replied to with different content types.
    Thanks.

  • 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?

Maybe you are looking for

  • Questions on user security etc

    Hello, we are getting ready to implement an SOA strategy within our company and have decided to use XI as the interface to SAP from any other system.  We have some (I have) questions on what some of the different approaches are for security. If anyon

  • Wordpress xml file from local to remote MySQL

    I am developing a php site with an attached WordPress blog using Dreamweaver CS6 on my localhost test server. My php pages contain echos from private blog posts with an average of several divs per page. Heres my problem, when I export the xml from my

  • Tone Curve in Profile Help

    Hey all, Hoping the more talented tech gurus can help me out a bit here? I have custom camera profiles for each of my cameras, so that my colour is consistent across bodies.  They're all dual illuminant, some made in the old DNG profile editor, more

  • Apply MacBook display settings to external monitor

    Hi. The display on MacBooks and other Macs is beautiful, and I wish I can bring those display and color settings to my external monitor, because no matter how much I calibrate using the one under system preferences or adjust the setting directly on t

  • Tag does not evaluate expression

    Here is the tag I am using: <lst:select name="country" table="country" column="name" key="id" selected="<%= rsNetwork.getString("country_id") %>" /> The selected attribute does not return the value of "country_id" instead it results the entire expres