[NCLUG] gnome-open configuration or alternative

John Gilmore jgilmore at glycou.com
Sun Sep 9 02:28:30 MDT 2007


On Wednesday 05 September 2007 19:19, S Luke Jones wrote:
> Brett Johnson wrote:
> > I think most distros support the "update-alternatives" concept now.  For
> > your particular situation, you'd likely want to type:
> >
> > "sudo update-alternatives --config gnome-text-editor", and pick the text
> > editor you want gnome to use.  "sudo update-alternatives --all" will
> > take you through the whole list of alternatives (there are a lot).
> >
> > Also, in gnome, you can use nautilus (the gnome file browser) to set up
> > file opening preferences.  Simply open a directory with a .txt file
> > (from your "Places" menu), then right click on a .txt file.  Choose
> > "Properties" from the drop-down menu, and select the "Open With" tab.
>
> Thanks, Brad. That's more information than I had before. I'm 100%
> gnome-clueless. (Also KDE. The last window manager I learned how to
> configure was fvwc.)
>
> So I did this, as you suggest, and yes, I can see it's doing what I need
> to have done. But so far as I can tell it doesn't provide a command line
> interface to _use_ the data I just configured. It only sets up file
> associations for the windowing system/file manager/desktop environment
> to use.
>
> But.
>
> That's my point. I don't care about the windowing system. I live inside
> a terminal.
>
> What I'm looking for is a single command-line tool (on the Mac it's
> called "open") that is aware of this update-alternatives-kind of
> database of filetype:application associations, and that lets me open the
> different sorts of file from the command line with a single command. So
> I don't type 'gv' or 'acroread' or 'gvim' or 'epiphany -some -weird
> -options' but simply 'open' and the tool looks up those commands and
> exec's them appropriately.
>
> Is there anything like that in gnome? (Or better yet,
> windowing-system-agnostic?)

There is! I remember using it a couple of times. No idea what it was called 
though. And I think the one I was using was gnome-specific. Or was it KDE? 
But I'm sure it was associated with one of those.

Spectacularly helpful, I know. But I didn't have a use for it, and only used 
it a couple of times - enough to say "Oh, that's kinda cool" but not enough 
to really remember it. But it's installed on your computer, and it's the 
script/entry point for when you click on something in the file manager to 
open it. It may have been something like "konqueror -q" or some such, I don't 
remember. 

But it DOES exist. keep looking, and you'll find it. At worst, you'll be able 
to set up an alias for it "open='foo -y'" or whatever.



More information about the NCLUG mailing list