Re: links




Josh Yelon <jyelon@cs.uiuc.edu> writes:

> Why not just generate small scripts?

[description snipped]

I agree that's a good approach if all you want to do is launch an app
in a modified environment.  It's not really sufficient if you want to
map a different icon onto a link.

The best way to think of KDE link files is that they are
mini-documents that describe a way to launch other docs.  kfm (the
file manager) just recognizes the type, loads the code to parse it and
set up an environment, and then execs the appropriate application.

Launching an app is really no different than your 'wrapper' shell
script approach.  The kernel recognizes the file magic "#! 
/bin/foobar" at the top of an executable file, launches the foobar
shell to to parse the file - and the 'wrapper' shell script sets up
the environment.  Of course, this approach is probably a bit slower
than doing the whole thing in-process like kfm does - but it is also
much more flexible.

I think we can have it both ways - even have compatibility with
.kdelnk files.

When we get a document-type service in Gnome, your choice of file
manager could look at a .kdelnk file (or the Gnome equivalent), and
recognize it.

When you clicked on it, it would call some code (via CORBA) for the
.kdelnk document type editor to parse it, which in turn would launch
the appropriate program.

Our file managers would also be able to work with normal symlinks,
executable files (which may be wrapper shell scripts), and other
document objects too.  Actually, they already do work this way for
symlinks and executables.  I'd personally prefer a file manager which
exposes ugly unix stuff like symlinks and executable files to the user
- but, I'll admit, that is an arguably less newbie-friendly approach.

The .kdelnk files are documents, because they do more than just launch
files.  They contain pointers to icons, names (in multiple languages),
options, and all sorts of other things.  The .kdelnk documents have
limited value outside of the realm of kfm.  But that's not a problem
if you intend to do all your work through the "one, true, file
manager" a.k.a. kfm.

In short, I'd prefer it if our file managers (mc, emacs dired mode,
etc.) would not litter the filesystem with little .kdelnk-style
document files describing how to launch apps, unless the user really
wants to do that.

Cheers,

 - Jim




PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]