Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed the standalone Flash debug player to /usr/lib/flashplayerdebugger and I can now use it to test within Flash Builder (Eclipse), but I can't make an SWF open with it from Nautilus. If I right click and select Open With Other Application it is not in the list of programs, and I can't see how to add it. How can I make it the default application for SWF files opened in Nautilus?

Update - *.desktop file

[Desktop Entry]
Name=Flash Player Debuger
Type=Application
Exec=/usr/lib/flashplayerdebugger
Categories=GNOME;Player;AudioVideo;
MimeType=application/x-shockwave-flash;
share|improve this question
add comment

1 Answer

Well, I hadn't noticed this myself. In the previous Ubuntu version, you were able to specify as a command an application you wanted to open a specific file-type with in the Properties > Open With window, but now that doesn't seem possible. You might as well file a bug report for this - it is a very important function that got lost.

I can think of a couple of workarounds though.

1. Desktop file approach

This is one "hacker" way of doing it. In order to start, you must first find out the mimetype name of the SWF file:

  1. Right-click the file and open Properties and stay in the Basic tab. Look for the line that says Type and write down somewhere the last part of that line that is between parenthesis. It should be named something like application/swf-flash or something in that fashion.

  2. Now you must create (unless it already exists, in which case you would edit) a *.desktop file in one of the working applications directories mentioned below:

    • /usr/share/applications/
    • /usr/local/share/applications
    • ~/.local/share/applications [recommended]

    and in the MimeType field include the mimetype you found in the previous step. To do this, simply create new line and write the following:

    MimeType=application/swf-flash;
    

    if you are editing an existing desktop file, append the mimetype you found and a semicolon to the line:

    MimeType=mimetype1;mimetype2;application/swf-flash;
    

    This is a working desktop file that I have come up with while you read:

    [Desktop Entry]
    Name=Flash Player Debuger
    Type=Application
    Exec=/usr/lib/flashplayerdebugger
    Categories=GNOME;Player;AudioVideo;
    MimeType=application/swf-flash;
    

    Remember to change application/swf-flash for the working mimetype!

    Once completed this step, the application you created a *.desktop file for should appear in within the other applications in the Open With tab in the Properties window of any SWF file.

2. Assogiate application

I don't know if this method still works, but I remember an application called assogiate which would let you change all the file associations made by the system among other things. You might want to install this, its in the Software Center.

share|improve this answer
    
I've followed point 1, replacing the mimetype with application/x-shockwave-flash. After a restart SWF files are still opening with Movie Player. Actual ~/.local/share/applications*.desktop is in question. –  shanethehat Nov 12 '11 at 23:46
    
Oh yes, I forgot something in option 1. I put it right before the beginning of option 2. Why is the directory in question? Mind that *.desktop refers to any file name with extension desktop. –  Wolter Hellmund Nov 13 '11 at 8:08
    
Sorry, I meant that the file contents are in the question. I have actually named the file *.desktop and I'm unsure what to replace the wildcard with. –  shanethehat Nov 13 '11 at 10:53
    
Well, I'm sure flash-player-debugger.desktop will do just fine then. –  Wolter Hellmund Nov 13 '11 at 17:45
    
I renamed the file as you suggested. It hasn't made the option appear in 'Open With' list, but it has automatically added the folling line to the end of the file: Name[en_GB]=flash-player-debugger –  shanethehat Nov 13 '11 at 21:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.