This part looks at an advanced and one of the major KDE technology - KIO. If you're a KDE Workspace user, you're using it pretty much every day.
So what is KIO? It is a technology that makes arbitrary resources available in form of files (if it makes sense to be files) which any KDE application can seamlessly access and use. Let's have FTP server as an example. It's a remote server somewhere on the other side of the country. How would you normally access it? Install some FTP client, create new connection, enter your credentials, connect, browse the server in the client, do some work. With KDE KIO all this is not needed.
KIO makes the remote content available like normal (local) folders, which you can access from any KDE application like Dolphin or Gwenview and just work with the files. All the magic like downloading the file locally, uploading the file back once saved etc. is handled automatically in the background and it is happening in separate process, so it does not block GUI while working. But it's not just remote content.
Thanks to KIO's modular architecture it is very easy to create KIO for pretty much anything one might need. By default, KDE ships over 40 different KIO plugins, among which we can find the already mentioned FTP, FISH, NFS, SFTP, Samba, SVN, but also POP3, IMAP, KIO for installed fonts and programs, settings, audio cd, man pages, searching in your semantic data and others. You can check at least some of your KIOs by opening KDE Help Center (fire up kickoff and type "help" in the search field) and looking for "Kioslaves" in Contents list. There you can also find help for using some of them.
Any application can take advantage of KIO. Among KDE applications, Dolphin is probably the most logical one to make use of KIO, so let's take a look at some of KIOs and Dolphin.
Audio CD
Remember the FTP access example above? Think about the same for ripping audio CDs. How would you most probably proceed? Install a ripping software, install codecs, run the software and let it rip the audio CD. Not anymore. That's how it's done on...well, other systems.
When you insert any audio CD into your computer, one of the actions the Device Notifier offers is "Open with File Manager". You ask "why would I do such thing"? Well, just try it ;) You'll see several folders - CDA, FLAC, Full CD, Information, Ogg Vorbis and whole bunch of wav files. If you have the Lame libs installed, you'll see even MP3 folder. You might think that the CD authors are just awesome for giving you all this right on their CD, but no. That's KIO's authors who's awesome.
So you want to have your CD in mp3 quickly? What's easier than dragging the MP3 folder to wherever you want it? It will start converting on the fly. And for bonus points - it will also fill in id3 tags from cddb (if the CD was identified). The same goes with you wanting a FLAC quality music, or the libre format OGG. Just drag the folder and you're done. No need for CD rippers anymore.
Remote files access
Here belongs KIOs for (S)FTP, NFS, Samba, FISH and all remote file access. You want to copy some files from a computer in other room where you have SSH access? No problem, FISH KIO takes care of that. You need files from your Windows machine? Samba KIO got you covered. KIO for FTP was absolute bless when I was doing web development. For quick fixes, I just fired up Dolphin, entered server address, opened up the file (without the need to download it first), fix stuff, save (it gets uploaded back), close Dolphin and I was done. Just perfect.
To access remote server, all you have to do is type the protocol and its IP address to Dolphin's address bar and hit Enter. In case it needs authorization, you'll be asked for your credentials. After that you can browse and open the remote files just like those on your hard drive, right inside Dolphin. You can even use the breadcrumb navigation to navigate. Of course you can copy & paste files to these remote locations.
Archvies
We've all been there. You download an archive, navigate to your Downloads folder and you want to browse that archive, not opening special application for that, because that's just an unwanted delay for you. That's how great archive KIOs are. They enable you to browse the archives with ease. By default KDE ships KIOs for ZIP (bzip, bzip2, gzip..) and TAR, which covers the most used archives in Unix world. You can open files straight from the archives, you can copy them out, but you can't paste files in. I confess that my archives knowledge is only that limited and I don't know why you can't do that.
Applications, Fonts, Settings and friends
These are great examples of the reusability of KIOs throughout the system. If you put "applications:/" or "settings:/" in your Dolphin's address bar, I'm pretty sure that you'll recognize these things. Yep, it's the same you see in Kickoff menu and in System Settings. This is a great example of technology reuse and applying different visualisations on the same data set.
From these KIOs you can either run the application or the System Settings config module. Fonts ("fonts:/") displays all your Personal or System fonts, which allows you to easily copy them and share or add new ones. Other similar KIOs are "desktop:/", which shows your desktop contents, "trash:/", which shows your trashed files, or "floppy:/", which lets you access your floppy disk (oh the nostalgia..). Also Konqueror and Rekonq are using KIO for http protocol. So basically you're viewing pages through KIO as well.
Timeline
Very interesting and little known KIO is Timeline. This is a KIO based on Nepomuk and it contains all your edited files. Currently there's no "easy" access (depends on how you define easy) and as far as I know the only way to access it right now is by entering "timeline:/" into Dolphin address bar. Hopefully someone will make a great use of this KIO soon.
So what great features does Timeline bring to the table? Instead of trying to remember what file it was that you edited on Wednesday, you can simply browse the Timeline to get all files edited on Wednesday. Yep. Simple as that :) It simply lists all created or edited files separated by days. It is not /that/ useful when you need broader search parameters, but it illustrates nicely the power of KIO connected with KDE's semantic capabilities. For this to work you have to have the Semantic desktop search enabled (aka Nepomuk).
Man pages
Advanced users quite often use "man" in terminal for displaying Unix manual pages. For that we also have a KIO. You can get quick access to man pages by launching KRunner (Alt+F2 by default) and typing what manpage you want - "man:/find". If you want some particular section, you can add it in parenthesis - "man:/find(3)". Or you can also just display index of that section - "man:/(3)".
This should give you some overview what is KIO all about. As I repeated few times in the article, any KDE application can take advantage of KIO. For example the Folder view widget on desktop can display KIO content. The open/save file dialog can browse KIOs. Also DigiKam internally uses several KIOs for working with albums. These however can't be easily used in Dolphin as they have quite complex syntax, but it would be really cool if your DigiKam albums were simply reusable elsewhere.
There are more KIOs. You can find some on the interwebs (though possibly outdated), like a KIO for browsing Flickr or a "TV KIO", both done by David Edmundson. And it's very easy to write your own shiny KIO. If you have ideas and time, there's nothing easier than jumping to #kde-devel at freenode and asking for help. I'm sure someone will point you to the right direction.
If you're using a KIO which wasn't mentioned above and you think it should deserve a mention (my day has only 24 hours ;), you can share it in comments. I may add it to the article later as well.
At the end I'd like to revive one older and a bit related post of my friend Alex Fiestas about Smart Folders (as it is called in OS X). Basically it is about having folders where you have a related content. It can do more, just sit down and have a play with it ;) Check out the video in his blog, it's definitely worth it! As an update to that - the UI for what Alex is describing still wasn't done yet :/ So if you'd like to improve KDE Software, this could be your great starting point!
And as usual - if you like the KDE Software, please consider support by joining the game (you'll get a gift! ;).
Hi man, what theme/style do you use. It is awesome.
Posted by: Jasmin_rahimic | Sunday, 11 December 2011 at 23:00
@Jasmin_rahimic - All credit goes to the Oxygen developers as that's what I'm using (the default KDE Applications style with slightly tweaked scrollbars). The color style is an older one I have lying around for so long, that I'm not sure where it came from. I /think/ it's one of Bespin's color schemes, not sure though.
Posted by: Marty | Sunday, 11 December 2011 at 23:15
As a long-time KDE user I'm also a user fan of kio, but I must say that I miss a great feature from gvfs (which is gnome's kio-equivalent): mounting remote filesystems locally using FUSE.
This way, any application can use gvfs, even from the shell. With kio, for most users, it's not clear when you'll be able to stream something, or when it's going to be copied.
This is especially bad at the usecase "click on some video, and instead of starting and streaming in the background, you have to completely download it before you can start watching".
I also find that for some reason I can never get the same speeds with kio-fish or kio-sftp than I get with scp over gigabit networks.
But thanks for the blog -- I got to know some extra kio's that I didn't know about, and was a pleasure reading!
Posted by: Knuxblog.blogspot.com | Sunday, 11 December 2011 at 23:54
You can access man pages even quicker by just typing "#fopen" in krunner.
Also the info-pages are available this way: info:bash. I'm not quite sure whether "##bash" is still support in KDE4, it redirected to info:bash in KDE3.
Posted by: Alexander Neundorf | Monday, 12 December 2011 at 10:04
Hoping that the archive KIOs get a bit more extended (such as extracting password protected archives) to make the incredibly broken Ark finally obsolete.
Posted by: Kai Uwe B | Monday, 12 December 2011 at 12:26
timeline:/ ... :-)
Nepomuk continues to impress. The KIO slaves are one of the great features of the KDE architecture. Not quite a hidden gem, but not bragged about as much as they possibly could be. They are the "information at your fingertips" enabler, giving you access to any information in a transparent way - you don't have to care whether it is on an FTP server or on a local drive.
Posted by: kjetil-kilhavn | Monday, 12 December 2011 at 12:28
I like the idea of KIO a lot, but I feel it is severely under-utilized. I feel there are so many places it would be useful or even natural to use KIO slaves but where they isn't used.
For example: kipi plugins are used to transfer pictures and videos to and from hosting and social media websites. Wouldn't it be great to be able to browse your facebook pictures or picasa picture albums right from your file manager rather than having to go through a series of dialogs to transfer them back and forth? There are no kio slaves to access your dropbox account, google documents, or other cloud storage accounts.
You already mentioned that the compressed file KIO slaves only support a few formats and don't support writing or creating new compressed formats. Formats like rar, 7zip, and even rpms or debs are commonly-used in Linux, but cannot be browsed from the file manager.
KIO slaves for hardware devices are also very limited. There is no KIO slave for accessing MTP media devices or iPods. Even Windows XP has a way to write files to a simple CD or DVD from the file manager, but there is no such KIO slave for KDE. Having a scanner kio slave would make it a cinch to do a quick scan job, and having a printer kio slave could allow to keep track of your print jobs or even start a print job by dropping a document, picture, or link into the kio slave without needing to open another program.
KDE programs also don't use KIO slaves as much as they could. Digikam technically uses kio slaves, but doesn't let you browse your photo collection from your file manager. Why doesn't amarok or bangarang let you browse or modify your music playlists using a kio slave? Why is there no KIO slave to browse your plasma widgets that can be opened in a window like there is for applications? There isn't even a KIO slave to see a list and manager your internal and external drives.
There is also support lacking on the front-end side. For instance Knuxblog already mentioned that there is no way for non-KDE applications to access data from KIO slaves, unlike GNOME's VFS which mounts them using FUSE so any program, even commandline applications, can access the files transparently. Similarly, Gstreamer is the default Phonon backend, but KDE does not provide a KIO plugin for gstreamer that lets gstreamer-based applications access files from KIO slaves (there is a GNOME VFS plugin that lets Gstreamer access files over VFS), which might be what leads to Knuxblog's issue with not being able to stream media.
Posted by: Todd Rme | Monday, 12 December 2011 at 13:45
Once again a great blog post :-) And I do hope that those move also to userbase. Btw. my favorite KIO Slave is clearly sftp.
Posted by: Mgraesslin | Monday, 12 December 2011 at 22:40