Open file with default application from terminal (Ubuntu/Gnome)
Posted on July 6, 2007
If you want to open up a file or folder using the default application from your terminal in ubuntu (or any linux distrib using gnome), just use gnome-open. Like this:
gnome-open ~/docs/something.pdf
Gnome will use it’s file association tables to open it in the correct application, and you won’t have to worry about remembering what your pdf viewer is called.
» Filed Under gnome, linux. howto, ubuntu
Comments
4 Responses to “Open file with default application from terminal (Ubuntu/Gnome)”
Leave a Reply
Thanks a lot!!!
hi,
gnome-open smb://servername/shared/filename -U domain\username%password
this works only after opening file once from run command.
and it is opeing file for user but for root it is throwing some unknown error.
i am not getting why it is not able to open with root.
What if another program is opening a file. My issue is using a Linux program Xilinx to open a Windows program ModelSim. I need exe files to default to Wine so I don’t get the error: run-detectors: unable to find an interpreter for… It was working in a different version of Wine, but I had to recompile it work with another needed program. In the process I lost this default.
Kenneth, you need to change the default application for exes. When you (presumably) uninstalled your previous Wine installation to add the self-compiled version, it removed the association. I think you can do by right clicking on a .exe file in Nautilus and selecting Properties.