Warning, /system/kio-fuse/README.md is written in an unsupported language. File is not indexed.

0001 # KIO FUSE
0002 
0003 [FUSE](https://www.kernel.org/doc/html/latest/filesystems/fuse.html)
0004 interface for [KIO](https://api.kde.org/frameworks/kio/html/).
0005 
0006 ## Build and Install KIO FUSE
0007 
0008 Here we describe how to compile, test, run and install KIO FUSE from source.
0009 
0010 ### Build Dependencies
0011 
0012 To install build dependencies on Arch Linux:
0013 
0014     pacman -S base-devel fuse3 cmake extra-cmake-modules qt5base kio
0015 
0016 (and `kio-extras` for running certain tests)
0017 
0018 To install build dependencies on Fedora 32:
0019 
0020     dnf install cmake extra-cmake-modules kf5-kio-devel fuse3-devel 
0021     qt5-qtbase-devel pkg-config
0022 
0023 (and `kio-extras` for running certain tests)
0024 
0025 To install build dependencies on openSUSE Tumbleweed:
0026 
0027     zypper install extra-cmake-modules 'cmake(KF5KIO)' 'pkgconfig(fuse3)' 
0028     kio-devel 'cmake(Qt5Test)' 'cmake(Qt5Dbus)'
0029 
0030 (and `kio-extras5` for running certain tests)
0031 
0032 To install build dependencies on Ubuntu 19.04:
0033 
0034     apt install fuse3 libfuse3-dev build-essential cmake extra-cmake-modules
0035     pkg-config libkf5kio-dev
0036 
0037 (and `kio-extras` for running certain tests)
0038 
0039 ### Build Steps
0040 
0041 Once you have installed the build dependencies one can build KIO FUSE
0042 itself.
0043 
0044 In the root of the git repository run the following:
0045 
0046 ```
0047 mkdir build; cd build; cmake .. && make`
0048 ```
0049 
0050 ### Running Tests
0051 
0052 In the build directory run the following:
0053 
0054 ```
0055 make test
0056 ```
0057 
0058 For more verbose output run the following:
0059 
0060 ```
0061 make tests ARGS=-V
0062 ```
0063 
0064 ### Installing KIO FUSE
0065 
0066 In the build directory run the following:
0067 
0068 ```
0069 make install
0070 ```
0071 
0072 ## Usage
0073 
0074 This section describes how to start KIO FUSE via DBus activation and
0075 by simply running it manually.
0076 
0077 ### KIO FUSE DBus Activation
0078 
0079 KIO FUSE is a DBus activated service, so for permanent installation the
0080 installed service file has to be in a directory used by `dbus-daemon`.
0081 If you're installing into a custom prefix, you may want to link
0082 `[prefix]/share/dbus-1/services/org.kde.KIOFuse.service` into
0083 `~/.local/share/dbus-1/services/` and
0084 `[prefix]/lib/systemd/user/kio-fuse.service` into
0085 `~/.local/share/systemd/user/`.
0086 
0087 To make sure that the installed version is actually used, stop any already
0088 running instance with `killall kio-fuse` and log out and in again.
0089 
0090 For quick testing, installation and DBus activation can be skipped. Instead,
0091 after stopping any previously running instance, start the built `kio-fuse` binary
0092 with the `-f` parameter and possibly other options.
0093 
0094 The DBus service is automatically used by KIO (5.66+) when opening a file on a
0095 KIO URL with a KIO-unaware application.
0096 
0097 ### Running KIO FUSE manually
0098 
0099 Create a new directory somewhere, make sure that no daemon is going to clean
0100 up after it (like `systemd-tmpfiles` in `/run/user/...`) and run `kio-fuse -d $dir`.
0101 The `-d` means that it shows debug output and does not daemonize - that makes it
0102 easier to use it at first.
0103 
0104 In your session bus you'll find a `org.kde.KIOFuse` service with an interface that
0105 allows one to communicate with the `kio-fuse` process.
0106 
0107 Let's assume you want to make the files at
0108 `ftp://user:password@server/directory` accessible in your local file system.
0109 To send the corresponding mount command, you can use our utility script [`utils/mount-url.sh`](./utils/mount-url.sh) as follows:
0110 ```
0111 mount-url.sh ftp://user:password@server/directory
0112 ```
0113 Alternatively, you can simply use `dbus-send` (which is what `mount-url.sh` uses anyway):
0114 ```
0115 dbus-send --session --print-reply --type=method_call \
0116           --dest=org.kde.KIOFuse \
0117                  /org/kde/KIOFuse \
0118                  org.kde.KIOFuse.VFS.mountUrl string:ftp://user:password@server/directory
0119 ```
0120 
0121 If it failed, KIO FUSE will reply with an appropriate error message. If it
0122 succeeded, you will get the location that the URL is mounted on as a reply. In
0123 this case it would be `$dir/ftp/user@server/directory` and the directory will be
0124 accessibly at that URL.
0125 
0126 After your work is done, simply run `fusermount3 -u $dir` to unmount the URL and
0127 exit `kio-fuse`.
0128 
0129 Have a lot of fun!