Re: What to do with fuse Was: Re: [devel] Smb4K (and Lisa)

Alexander Neundorf <[email protected]>
Newsgroups gmane.comp.kde.debian
Message-ID <[email protected]>
On Tuesday 06 January 2004 23:46, Simon Edwards wrote:
> On Tue, 6 Jan 2004 09:59 pm, Kévin 'ervin' Ottens wrote:
> > Le Mardi 6 Janvier 2004 20:37, Alexander Neundorf a écrit :
> > > Hmm, and how to get these url's ?
> > > The user won't type them...
> > > Maybe it can work, I'll have to try.
>
> But that is the exact same situation with normal URLs + KIO in KDE. And yet
> it works...
>
> > It would be a good thing... What about typing:
> > /mnt/kio/ftp:/somewhere.org/my/directory
> >
> > In OOo, to open or save a file? :)
>
> If the OOo file dialog is replaced with the one from KDE, then we can hide
> that detail and just show URLs the same ways as in todays KDE apps. The KDE
> file dialog in OOo would have to translate from scp:/foo.com/ to
> /mnt/kio/scp:/foo.com for OOo. The user sees scp:/foo.com/, but OOo gets
> /mnt/kio/scp:/foo.com .
>
> Yes, it's a trick. ;-)
>
> cheers,

Ok, with some work, it is possible.
(what a statement, imagine what this means...)

What we need to do is to create a wrapper to start non-kde apps, a script will 
do the job.
E.g. instead of starting "swriter fish://alex@marathon/tmp/somefile" konqueror 
(or KRun or whatever) has to start "to_be_written_wrapper_script swriter 
fish://alex@marathon/tmp/somefile". This is possible by adjusting the desktop 
files. No big deal.

And what does to_be_written_wrapper_script do ?
It checks whether the path argument points to a local file or not.
If yes, it simply starts the program swriter with the path.
If not (now it gets interesting), it changes the path to e.g. /home/user/
fusemount/kio_gate/fish://alex@marathon/tmp/somefile. (Maybe we have to do 
something with the special characters (:@//).

Ok, now swriter tries to open damn_long_path/somefile.
When doing this, every parent directory of ...kio_gate/fish://alex@marathon/
tmp/somefile will be stat'ed.
Now the not yet completely written fuse-kio gate has to answer for the not 
really existing directories "yeah, of course this directory exists". And 
finally it can feed the file into swriter :-)

I don't see a reason why it shouldn't work :-)

...starting to code....

Bye
Alex
-- 
Work: [email protected] - http://www.jenoptik-los.de
Home: [email protected]                - http://www.kde.org
      [email protected]               - http://www.neundorf.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.