Opening linked files with chosen application

  • m3tr0g33k

    m3tr0g33k - 2008-10-04

    I like to attach files to my nodes.

    I use Linux, so there are not necessarily any file suffixes (like .txt, .doc).

    Some of my files are little text files, scripts, and source code, which I want to open in an editor like vim, not in a browser. Even if I do open in a browser, I don't get an editor when I want one, and it is important not to change the browser's file associations to work just with Freemind.

    So, I have written a script for bash which opens an associated application when passed a file. It uses *nix 'file' to get the mime type of the file, not any assumptions about the file type from the file name.

    So far, it opens text files in gvim, and pdf files in xpdf. These associations are hard coded into the script and can easily be altered and added to.

    Is this a useful script for others too? Download and instructions are available at the script is called oma (Open My Application).

    So far (oma 0v2) this is tested with Freemind 0.8.1 on Arch 64-bit Linux.
    Please test on other systems and let me know.



    • Eric L.

      Eric L. - 2008-10-06


      two things:

      1. the packaged FreeMind (RPM/DEB) comes with a script called 'urlsee' which does exactly what you've described.

      2. starting with version 0.9.0.BetaSomething (Something << 20), FreeMind uses a command called xdg-open which came already standard with all major distros one year ago. You might need to install a package called something like xdg-utils, see for example

      Check also

      So, I fear your effort was unnecessary, but mine with urlsee as well, if it makes you feel better ;-)


  • Toni

    Toni - 2009-11-01

    Hello forum,

    It's 2 days I've been looking for a solution to this same problem.

    I followed the instructions in the other thread (

    I made a file 'freemindrc' to which I added following lines:


    export FILEMGR


    export BROWSER


    export SEECMD

    When I click a link, it's only opera which has taken effect. Text files don't get opened with scite (or any other editor).

    The syntax should be correct, I think, at least for the browser, because without BROWSER-variable, linked files get opened with iceweasel.

    I have read every other post on this subject, but haven't become any wiser to what I am doing wrong.

    My OS: Debian Lenny

    Relevant apps: Fluxbox, FreeMind 0.8.1., Opera, Iceweasel, Rox-Filer

    Is there anyone who is still following this thread who can advise me on what I should try to get this working?



  • Toni

    Toni - 2009-11-01

    I'm sorry, I just realize this is the wrong thread to post this question in :~/


  • Eric L.

    Eric L. - 2009-11-02


    that's a very old thread. In the mean time, FreeMind uses  to open links. To get this utility installed on your system, you need to install a package generally called xdg-utils.



  • Toni

    Toni - 2009-11-02


    Thanks for the reply. I deleted freemindrc and changed the preferences from urlsee {0} to xdg-open {0}. The clicked link is still opening in iceweasel.

    I found an interim solution in the meantime.

    I just point the BROWSER-variabel to opera, where I *can* add new mime-types, unlike firefox/iceweasel. The downside is that this way I get a blank page in opera each time I open a text-document, since it is treated as a download, but at least I can move on.

    Thanks anyway, I'll sweat it out like this until v0.9 final is out.




Log in to post a comment.