RE: links



> > 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.
> 
Sure it is.  Anything you can store in a .lnk file can be embedded in
the comments of a script file.
When the desktop/file manager sees a .lnk (or whatever) file (that is
really a script), it looks in it for program attributes embedded in the
comments, including icon and such.  (Of course, the desktop/file manager
(GUI Shell (gshell)) would be smart enough to normally not to show the
".lnk" part of the filename.)
This would work with any script file without a special extension, but
then the gshell would have to actually open the file to know it has
embedded properties.  Naming it .lnk or something (I personally like
".gsh") would enable the gshell to know it has embedded attributes from
the name, without opening the file.

> 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.
> 
All of which can be done from comments in a .gsh script just as well

> 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.
	...

Basically, anything a .lnk file can do, a script with comment-embedded
gshell commands can do equally well with the advantage that the .gsh
script will work with the manager.  (This is as good as EAs for
programs; too bad it doesn't work with non-script files as well.)


Paul



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