É, eu sei, eu não gosto de textos em inglês em canais de informação em Português, mas como escrevi o post abaixo para o fórum do dropline GNOME e estou morrendo de preguiça de passá-lo para o Português, vai em inglês mesmo. Quem usa a linha de comando do Linux e possui o GNOME instalado pode gostar. O resto, melhor ignorar mesmo ;)

Some time ago I bought a macbook (I didn’t want my money to go to MS, then I preferred to “give” it to Apple) and started to use Mac OS X to see if it was as good as people said. I found out that although it is a nice OS, I still preferred Linux (slackware) + GNOME, then I installed slackware + DLG on the macbook and now I rarely boot into OSX.

While I was using that thing, I got used to the “open” command line application. Its behavior is quite simple, you type “open somefile” then it would figure out what was the filetype associated to that file and the default application that was supposed to open that file. Then, it would simply open the file inside that application.

Every now and then, when I was working with the command line (which tends to be VERY frequent), I remembered that the “open” command didn’t exist (at least by default) in Linux and got frustrated. I even looked for similar tools, but wasn’t able to find one. Knowing that programs like Nautilus already implemented such behavior, it was clear that it should be available to the rest of the GNOME desktop.

Well, I was lucky, as gnomevfs implemented everything I needed to create my own “open” command. The only hard part was to figure out what the functions did, since they were mostly undocumented.

I don’t know if anybody is interested in such an application, but since I wrote mine (in a quick, dirty and undocumented way) and found it useful, I thought that it would be nice to share it. If you want to take a look at it, please check [http://dlg64.redos.si/trac/browser/open/trunk/open], download it to your PC, make it executable and run it.

Update (2011-07-23): The above link is broken and since I am not a dropline GNOME developer any more, I don’t really know where to find it. Moreover, the APIs the script depended on are long gone, rendering the script unusable. For a similar program with less funcionality, check xdg-open.

Related content