<< What's In Your History | Home | Breaking Version Inertia: Ant: import and macrodef >>

[DISCUSS] Open appropriate GUI from terminal?

This may be something that a casual GNOME user doesn't know.

A Sluug-discuss Thread (login is discuss/freely):
On 06:56 Mon 14 Apr, Weiqi Gao wrote:
> Nathan Neff wrote:
> > I'm running GNOME/Ubuntu.
> > 
> > Let's say I'm in a terminal, and want to open a PDF document, but don't 
> > know the name of the PDF reading program.
> > 
> > I can run "nautilus ." (don't forget the dot) and nautilus will start, 
> > pointing at the current working directory in the terminal.  You can then 
> > just double-click the file you want to open.
> > 
> > However, I'd like to avoid jumping to nautilus.
> > 
> > Is there a command that I can issue that will find the type of the file, 
> > and open it using the appropriate program?
> > 
> > In Windows, you can use the 'start' command, and I think in OSX you can 
> > use the 'open' command.
> 
> In GNOME, you can use the 'gnome-open' command from the command line. 
> It does the same thing that Nautilus does when you double click the file.

Cool! Is there an equivalent command for KDE?

-Jeff

I'd appreciate it if you can let me know what the corresponding command in KDE is.

(As I mentioned 609 days ago, in Cygwin the command is cygstart.)



Re: [DISCUSS] Open appropriate GUI from terminal?

I believe that "kfmclient exec $FILENAME" does what you desire. For that matter, kfmclient can do a number of cool things, all with any of the kioslaves in the paths. Try "kfmclient --commands" to see them all.

Re: [DISCUSS] Open appropriate GUI from terminal?

Thank you for the quick feedback.


Add a comment Send a TrackBack