Hi,

in KDE cvs in kdenonbeta/fuse_kio/ you can find a fuse-kio-bridge/daemon/whatever you wanna call it.

What is fuse ? Filesystem in Userspace

With fuse you can implement file systems for Linux in user space (instead of kernel space)
The code in kdenobeta makes it possible to mount ioslaves or a general
ioslave-gateway via fuse and make them this way available to all linux
apps :-)

Current state: everything should work, except that file mode flags (e.g. for creating files) are still ignored.

For the impatient: a SCREENSHOT is at the bottom of the page.

How to get it working

Get the code for fuse:

Fuse download area

download the sources for fuse 1.0 or better fuse 1.1.

Unpack, configure, make, make install.
Once this is completed, you'll have a static library libfuse.a and a kernel module named fuse.o.
You have to load this kernel module:

modprobe fuse

Get and compile the sources from kde cvs and compile and install fuse_kio.

Create a working directory from Subversion and do all the following inside

svn co -N svn://anonsvn.kde.org/home/kde/trunk/kdenonbeta
cd kdenonbeta
svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
svn co svn://anonsvn.kde.org/home/kde/trunk/kdenonbeta/fuse_kio

make -f Makefile.cvs

./configure --prefix=`kde-config --prefix`

make


(Can someone please provide some simple commands to do this?)

When everything is compiled and installed, you have a binary called fuse_kio.
fuse_kio implements the KDE ioslave support for fuse.
You have two options how to use it.

1. option: mount a remote host

You can do this e.g. via the fish-ioslave:

fuse_kio --nice-mtab /your/mountpoint fish://user@host/

(--nice-mtab works only with fuse 1.1)

and then browse there with any app you want, open files, write files,
basically everything should work (of course there are probably bugs)

2. option: mount a general kio gateway

You can also use fuse_kio so that it acts as a "gateway" to all KDE ioslaves at once.
This is somewhat more advanced and useful and you have to prepare some things.

Create a directory where you want to mount the fuse_kio gateway, e.g.
$HOME/fusemounts/gateway

Then set the environment variable FUSE_KIO_GATEWAY_MOUNTPOINT to point to this directory. A good place to do this is for instance the startkde script:

export FUSE_KIO_GATEWAY_MOUNTPOINT=$HOME/fusemounts/gateway/

Once KDE is running mount the general ioslave - fuse "gateway":

fuse_kio --nice-mtab --gateway $FUSE_KIO_GATEWAY_MOUNTPOINT

(--nice-mtab works only with fuse 1.1)

Use konqy and search a remote file, e.g. fish://you@wherever/tmp/tux.png

replace the "://" with ":__" (two underscores) and prepend $FUSE_KIO_GATEWAY_MOUNTPOINT

and now open this file e.g. with gimp:

gimp $FUSE_KIO_GATEWAY_MOUNTPOINT/fish:__you@wherever/tmp/tux.png &

and see what happens :-))

So, this was somewhat much stuff to type. Of course we can automate all this :-)

In the sources you can find a file kdenonbeta/fuse_kio/ioslave_helper .
This is a python script, there is also a ruby version ioslave_helper.rb.
Btw. Ruby is is really cool, visit ww.ruby-lang.org.
Dominic Chambers <dominic@enkasa.com> was so nice to translate the original ruby script to python :-)

Anybody there who would like to translate it to perl or plain shell ?

Install this script somewhere in your path, e.g. /opt/kde3/bin

Then edit the desktop files of the apps which don't support KDE ioslaves, probably OpenOffice.org, Gimp and some others.

So, open the file gimp.desktop and look for the line "Exec"
Replace it with the following:

Exec=ioslave_helper gimp ]placeholder ]url %u

ioslave_helper is the ruby script, its first argument is the application name.
At the position where the application expects the file, insert "]placeholder"
as you can see here. At the end of the command insert "]url %u".

Save the file.
Use konqi to browse to a remote location, e.g. with the fish protocol, and look for a picture, e.g. tux.png. Now right click on the picture, select "open with" and chose Gimp. Now Gimp should load with the remote picture via fish smile

For OOo writer it's the same (writer.desktop):
Exec=ioslave_helper /opt/OpenOffice.org1.1.0/program/swriter ]placeholder ]url %u

and also for xpdf (xpdf.desktop):
Exec=ioslave_helper xpdf ]placeholder ]url %u

And finally here's a screenshot

What you see in the picture:

konqy showing fish://alex@marathon/home/htdocs/

via "Open with" and the modified gimp.desktop file I opened olaf190.jpg with gimp and main.html using OOo swriter :-))

This can be verified by the output of ps -ax|grep gateway in the konsole on
the upper right corner. You see the fuse_kio gateway process, and the gimp
and swriter processes accessing files located under the mountpoint given to
fuse_kio :-)

In the lower right corner you can see the debug output of the running
fuse_kio.


So, right now testers are what's needed most.
... waiting for your bug reports :-)
(patches or commits to cvs are not bad either)

Contact:
Alexander Neundorf <neundorf AT kde.org>
Stefan Bund <asbund AT gmx.de>

Bye
Alex