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! ;).
Recent Comments