An occasional blog about my recently discovered Linux gems!
Gnome-open
Posted 04-18-2011 at 12:56 PM by myklmar
Tags command line, tips, tricks, ubuntu
Open a text file in CLI
If you are working on the command line and you want an application to open a text file, do it
running a command.
However, this requires you to know the name of the application, which can be difficult to remember,(bad memory!) Especially if you don't know what application it was written in! But Linux has a solution for people like us. Its called gnome-open.
Gnome-open actually makes use of the gnome file handlers to decide what kind of application should be used to open a particular kind of file.
Suppose you want to open some file, say "file.ext" and you are not sure of the application that
handles the file format "ext", or you want to open a file called "news", then you can use gnome-open to ease your job.
First move to the directory in which the file is located: (ie Documents)
$ cd Documents
then type :
gnome-open news
voila!
_____________
If you are working on the command line and you want an application to open a text file, do it
running a command.
However, this requires you to know the name of the application, which can be difficult to remember,(bad memory!) Especially if you don't know what application it was written in! But Linux has a solution for people like us. Its called gnome-open.
Gnome-open actually makes use of the gnome file handlers to decide what kind of application should be used to open a particular kind of file.
Suppose you want to open some file, say "file.ext" and you are not sure of the application that
handles the file format "ext", or you want to open a file called "news", then you can use gnome-open to ease your job.
First move to the directory in which the file is located: (ie Documents)
$ cd Documents
then type :
gnome-open news
voila!
_____________
Total Comments 7
Comments
-
Great tip, it even works on my Suse kde desktop. That makes it a lot easier than trying to remember all the default programs.
Posted 04-18-2011 at 06:58 PM by Larry Webb -
I just found out that it will not open Photos.
Posted 04-19-2011 at 03:44 AM by Larry Webb -
Need to clarify above comments, first one checked out on laptop (Suse 11.2 kde), everything including pics opened
Second on a desktop on (Suse 11.3 kde) and (linux-mint gnome). That command did not work on the second computer, will check later today to see if there is a dependence or setup different.Posted 04-19-2011 at 06:49 AM by Larry Webb -
Thanks Larry.
Let me know what happens with your checking.Posted 04-19-2011 at 11:57 AM by myklmar -
I guess I was too tired the other day. I went back to check today and it worked on all my other distros.
Posted 04-19-2011 at 08:15 PM by Larry Webb -
Ok here is my findings
gnome-open worked on four of the major distros I tried (2 gnome and 2 kde)
kde-open only worked on the two kde distrosPosted 04-20-2011 at 09:53 AM by Larry Webb -
Thanks for the update.
I will include that info. in next updated version of tips.Posted 04-20-2011 at 02:00 PM by myklmar