List Info

Thread: opening linked files




opening linked files
country flaguser name
Italy
2007-07-27 04:28:39
<posted & mailed>

I would like konqueror to start a program when selecticng a
link file,
rather that opening  file the link is pointing to.
That would allow to start a script that chances to the
directory, before
opening. 

Any ideas?

thank you 

--
Pol 

___________________________________________________
This message is from the kde mailing list.
Account management:  https://ma
il.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.h
tml.

Re: opening linked files
country flaguser name
United States
2007-07-27 17:36:46
On Friday, July 27, 2007 2:28:39 am pol wrote:

> I would like konqueror to start a program when
selecticng a
> link file, rather that opening  file the link is
pointing to.

If I understand correctly, you want to maybe run a script
instead 
of the program usually associated with files of that type?

> That would allow to start a script that chances to the
> directory, before opening.
>
> Any ideas?

Write a shell script that changes to the directory you want,
then 
runs the program and loads a file from its command-line 
arguments.

Then open the settings dialog for the filetype in question
and 
specify your shell script as the program to run when opening

files of that type.

Does that answer your question? Not sure I understand, but
that 
seems to be what you want to do.
-- 
Scott
___________________________________________________
This message is from the kde mailing list.
Account management:  https://ma
il.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.h
tml.

Re: opening linked files
country flaguser name
Italy
2007-07-28 01:26:27
Scott Bicknell wrote:

> 
> Does that answer your question? Not sure I understand,
but that
> seems to be what you want to do.

What i need is changing to the directory the file is
pointing to, then
opening that file with the proper file association.
Currently, file
association is ok, but links are opened in the directory
where they are.
I would like to write a script that chances to the dir the
actual file is,
then open it.   
I could associate a script to that file type, that opens the
file the usual
way, if that is a real file or changes to the right
directory before
opening, How to pass the path to the directory to the
script?

thank you

--
Pol 

___________________________________________________
This message is from the kde mailing list.
Account management:  https://ma
il.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.h
tml.

Re: opening linked files
country flaguser name
United States
2007-07-28 06:05:05
Hi,

> I would like konqueror to start a program when
selecticng a link
> file, rather that opening  file the link is pointing
to.

| What i need is changing to the directory the file is
pointing to,
|

I can answer only this question.  If I remember correctly,
a
(symbolic) link cannot be edited.  That is, you can't change
what a
link points to.  This is a limitation of Linux/Unix. 
(There's no
system call for that task.)  All you can is delete the link
and create
a new one:

   $ ln -s /usr/bin/bash foo
   $ rm foo
   $ ln -s /bin/sh foo

But, this isn't your *purpose*.  You seem to want to do it
to
accomplish something else, but I'm afraid I don't
understand
what it is.

Regards,
Ryo
___________________________________________________
This message is from the kde mailing list.
Account management:  https://ma
il.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.h
tml.

Re: opening linked files
country flaguser name
Germany
2007-07-28 07:10:11
On Sat, Jul 28, 2007 at 08:26:27AM +0200, pol wrote:
> but links are opened in the directory where they are.

Are you talking about file symlinks, or are you talking
about
.desktop files? The latter have a field to set the working
directory.

Peter
___________________________________________________
This message is from the kde mailing list.
Account management:  https://ma
il.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.h
tml.

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )