FEB
10
2004

NewToLinux: KDE is so cool because...

Following the release of KDE 3.2, a friend and I have put together a series of articles promoting features of KDE that might change the way you work. We all know about the features of KDE that are promoted in press releases and demonstrated in screenshots, but the enormous power that lies "under the hood" of KDE in technologies like kioslaves, view profiles and kparts is often overlooked. So far we have three complete articles: Managing Websites, Extending Konqueror with View Profiles, and Using KPrinter in Any App. We hope to develop this into a decent series of promotional articles, beyond the "tips and tricks" already available, so comments and suggestions are welcome!

Comments

I've used KDE off and on since before 1.0, and I can honestly say I learned one thing already. :-D I don't see me using kprinter from every app, but I can see the benefit, I suppose.


By regeya at Tue, 2004/02/10 - 6:00am

I have to agree!
Very nicely put together and already some very good content. I'm also a long time KDE user but I still find useful things in this text (or maybe because).
I think there has been a lack of things like this, what I have found anyway.
Off the top of my head I recall one thing that irks me from time to time;
kioslaves!
I know there is a whole bunch of these, but I'm not sure what they are and how to use them. Of course I know of and use several of them, but my point is that my knowledge has come through the grapevine, I haven't found any actual documentation or even a listing of which are available. Is there any documentation? I'm probably lousy at searching.


By spamatica at Tue, 2004/02/10 - 6:00am

"... or even a listing of which are available. "

Have a look in "K-Menu -> System -> Info Center -> Protocols"

That's a list of the installed ioslaves, and some of them are even documented! ;)


By teatime at Tue, 2004/02/10 - 6:00am

Ah, took some searching but there it is! :)

Thanks!


By spamatica at Tue, 2004/02/10 - 6:00am

awesome.
now why isn't that sort of thing in the kde tips page.

shame it doesn't offer any options to remove/install slaves. oh well.


By c at Tue, 2004/02/10 - 6:00am

very nice! How do you configure the protocols or add new ones? I am asking because there is telnet: and rlogin:, but not ssh: for opening a remote shell. Any way I could add this?

Roman


By Roman Maeder at Wed, 2004/02/11 - 6:00am

Have a look at the fish:/ protocol. :)


By teatime at Wed, 2004/02/11 - 6:00am

but the fish: protocol gives me file manager type access, just like ftp:, smb:,
etc. I want a remote shell, like telnet:host or rlogin:host gives me. I looked at the configs and both are implemented in terms of ktelnetservice. If ktelnetservice could handle ssh:host URLs in the same way it now handles telnet: and rlogin: URLS, this would work.


By Roman Maeder at Thu, 2004/02/12 - 6:00am

KIO is the "big KDE secret". They just work. They were announce with the unveiling of KDE 2 as one of the coolest new features and since have been like an underground secret. You should not feel bad not knowing about them. As I've said before this should be promoted more on the KDE site and in docs. Since I lead the Quanta project and of course web developers expect to connect (but calendar users don't even though they can) we seem to be the "dumping ground" for user requests of "why don't you have an FTP manager?" My all time favorite. ;-)

Here's the simple explanation. Open Konqueror and look at the location bar. It will say "file:/home/user". File is the protocol, ":" means it's accessing a machine by protocol (okay this may be a loose definition). The "/" means local and root since it precedes everything after :. If it uses "//"it means remote essentially. Using KIO for ftp would look like "ftp://user@domain[/path]file]]" and what is cool is that you can do this on the top of the file dialog and see the directory listed. This is where KDE needs to indicate that something other than "file:/" is available. The "user@" means that this is a password protected account and it will prompt you for a password. This can be bypassed with "fish://user:passwd@domain". This will autopass. Fish BTW is SSH/SCP.

If you want to know what is on your system look on the system menu for "Info Center". I can't promise it will be there because distros sometimes muck with stuff like this but if you select "Protocols" you will see a list on the left with with a list of protocols and on the right you will be able to read about them. I'll include a screenshot of mine.

On KDE "file:/" is "just another protocol". ;-)

Eric Laffoon
http://quanta.sf.net/


By Eric Laffoon at Tue, 2004/02/10 - 6:00am

on the subject of fish:// is there a way to get konqueror to open a konsole window (Window/Show Terminal Emulator) on the remote site rather than (or maybe as well as) the local one? This after all is the main reason for using ssh rather than ftp


By Peter Robins at Tue, 2004/02/10 - 6:00am

Try kssh.

There should also be an option in konsole's selection list when you open a new console tab.


By Bart at Tue, 2004/02/10 - 6:00am

are we talking about the same thing? From a konqueror window in file:/ protocol I can press CTL-T or Window/Show Terminal Emulator to get a konsole window - fine. If I'm in fish:// protocol I can also get a konsole window but on the local machine not the remote. It would be nice if I could get a remote prompt as well. I don't want to open a new ssh session - I already have one open!


By Peter Robins at Tue, 2004/02/10 - 6:00am

It's a great idea, however bugs.kde.org is probably the most appropriate place for it -- files under wishlist probably.

(still bored? read my blog at http://tblog.ath.cx/troy)


By Troy Unrau at Tue, 2004/02/10 - 6:00am

Agreed. I've pointed this out to friends quite a bit, and most don't get it. I have to admit that the idea of KIO is great, it is a 'hidden' feature and sometime frustrating to use consistantly. (Till 3.2, I avoided Konqueror and used Nautilus on the network since I couldn't connect to SMB shares reliably. Nautilus would crash after 5 minutes or so, though it would connect. Now, Konq is working quite well!)

Here are some ideas that come to mind to make it more visible and practical;

1. Add it explicitly to the KDE file open dialog.

Some apps are more likely to use certian protocols. Just as you can filter by file type, filter by KIO type. There are a variety of ways to pull this off -- from radio buttons through to small changes in the Location field or adding history pick lists to the dialog itself (not bookmarks!).

2. In the file dialog, lock the KIO type so that it isn't so easily erased.

* Click on the URL to edit, click twice and it should select everything after the :/ or ://. Click again and select everything.

* If the URL typed is "file:/ftp://ftp.mydomain.com/pub/website", chop off the "file:/" automatically, and execute the rest of the line.

3. Remember and guess what protocol to use.

Examples;

* If someone types in a non-local address, ask them if they ment a network address, and what type. Provide a list or offer to guess some destinations (FTP, WebDav, ...).

* Integrate the history of other apps (shell and X) so that they work with KDE KIO-aware apps and bisa-versa. An often used URL in one place should appear automatically other places. (I know, not trivial...though that brings me to the next comment...)

4. Integrate or wrap other non-KDE applications.

I've typed in KIO URLs in a variety of programs by reflex, and only after hitting enter and getting a rude reminder did I realize that -- duh -- Mozilla Composer or whatever doesn't understand them. (erm, not that I use Composer...)

I really wish this integration 'just worked'!

5. Support KIO at the shell prompt.

Same as 4, though it would be nice if Bash were KIO-aware.

* * *

That's all I can think of right now. As you can see, I'm full of great ideas! People say to me "Andy, you're full of it" all the time!


By Andy Longton at Tue, 2004/02/10 - 6:00am

Please file separate reports at http://bugs.kde.org if not already filed.


By Anonymous at Tue, 2004/02/10 - 6:00am

Personally, I have filed on #1 several times, and it has been kicked back to me as well that it was a waste of time.

In fact the whole concept is partially broken in my mind. There should be no difference between saving to a file, to ftp, to http, to e-mail, to fax, to IM, etc.
Likewise, opening a data stream should be the same way.

The filedialogs should consist of a pluggable approach. A file selection should be a simple plug-in, as should DB, ftp, http, e-mail, fax, IM etc. This would allow for some interesting ways to search in the openings.
For example, the addressbook would become a great deal more important, if we could simply look in there for somebodies e-mail, im, fax, phys. addr, etc.
Likewise, doing a google search(or any other engines) for a network data stream would make sense.

The concept of location is so right on the money, but then we break out printers from disk. Yet, they are one and the same. You are saving data to something.

I would love to see the words "open" and "save" replaced with "get from..." and "send to...".


By a.c. at Wed, 2004/02/11 - 6:00am

I had a discussion with Waldo Bastion on this the other day and he thought it made sense. Because Quanta focuses on web development this is a much bigger issue for us than other projects. In fact it is a never ending pain, and that is the surest way to know that you have a problem in your interface design!

I am really busy this week. Shortly I have a few things to bring to core KDE developers. This one is on the top of my list. You can count on something happening here by the next major release!

If anyone has a really good clear interface design for the dialogs that they could send a partial mock up of in a ui file or graphics feel free to send it to me.


By Eric Laffoon at Wed, 2004/02/11 - 6:00am

http://www.windbournetech.com/~rraab/io.tgz

This is from 3 years ago, when I had time and first started pushing this.
I have actually submitted this (and a slight re-design on kio) 3 times.

I was looking for the code that I had with this, but ....

I seem to have lost some other code as well.

rraab ( AT ) windbournetech.com


By a.c. at Thu, 2004/02/12 - 6:00am

The answer to 4 and 5 are the same: What we really need is to have kernel support for kioslaves! There is a user space file system that can do this today, check out the KIO-FUSE-Gateway, http://kde.ground.cz/tiki-index.php?page=KIO+Fuse+Gateway . We need to push for something similar in the standard kernel in the future.

Another kernel space project that is interesting for KDE is Supermount(-NG.sf.net), and of course the new hotplug/udev-framework that is appearing. I want hardware and removable media to become immideately visible in KDE directly on connect!


By Jonas B. at Tue, 2004/02/10 - 6:00am

It's not fully transparent, but you can use kioexec to use kioslaves from a shell prompt. Try this:

kioexec cat http://www.microsoft.com/


By AC at Wed, 2004/02/11 - 6:00am

Very nifty! What protocols does it work on? Here's something I just tried;

kioexec cp audiocd:/MP3/* .

...and no luck. Oddly enough, doing this;

kioexec cp audiocd:/track01.cda .

starts the copy process, pushes it to a /tmp directory, and then Bash shows "cp: missing file argument".


By Andy Longton at Thu, 2004/02/12 - 6:00am

> kioexec cp audiocd:/MP3/* .

Maybe lowercase mp3 as directory?

> kioexec cp audiocd:/track01.cda .

Maybe it has problems to translate the dot as current directory? Could you try it with a full path as destination directory? If it works with the full path you could then file bug report.


By Anonymous at Thu, 2004/02/12 - 6:00am

I believe the wildcard expansion is done by the shell when you type enter, not by "cp" later on in the process. Since bash doesn't know about ioslaves, it can't expand the wildcard properly. kioexec is a hack and it will probably only work with single files, not wildcards or directories. If you really want to do this you can use the new kio_fuse module to mount ioslaves directly onto the filesystem.


By Spy Hunter at Sat, 2004/02/14 - 6:00am

Is there any other plain command line tool which also
allows to list and create directories, get file sizes,
delete files etc.?

I'm really missing something like that at the moment.
Just a plain little program that doesn't need any setup
or other tweaking.

This shouldn't be very hard, so I can't believe that
something like that doesn't exist already.


By Fred Schättgen at Sat, 2004/03/27 - 6:00am

You're damned right it should exist! I want it badly :( Any devs care to take a shot


By kimo at Wed, 2004/11/24 - 6:00am

Hi,

to point #4 and #5:
as somebody else pointed out, this can be done either via the kio-fuse gatway (first hit in google), or somebody else made some simple bash aliases to work with kfmclient.

#1: basically easier access to remote hosts.
The lan-ioslave shows you all hosts, and which shares they provide (smb, ftp, http, fish). Use lan:/ as root and browse from there where you want.
Maybe we could also add this capability to the smb-ioslave, i.e. below the host level not to show the shares, but the services available on this host. Shouldn't be too hard.

Bye
Alex


By aleXXX at Wed, 2004/02/11 - 6:00am

On the subject of KIO

My main use for KIO is accessing MP3s on remote SMB shares. I dont know about other IOSLaves but the SMB dosnt give a good impression of KIO.

1. It keeps asking for the password all the time when i have already told it.
2. I mainly used it in Noatun and It seemed to download all the MP3s I listened to, I ended up with 900mb of MP3s in my home directory!, Maybe this is a noatun problem.
3 suddenly it decides to tell me the files are accessed denied.

Could someone tell me whether #2 should be posted as a bug under Noatun or KIO.

Perhaps if KDE and GNOME could decide on a common standard then we could get it put into bash and such.


By Mike at Wed, 2004/02/11 - 6:00am

> 1. It keeps asking for the password all the time when i have already told it.

This happend to me with KDE 3.1.x to the point of making SMB:// useless. 3.2 is much happier and I rarely get asked for user name and password anymore. I did have to remove and re-add network logon details to the Control Center (Internet & Network ... Local Network Browsing ... Windows Shares tab). I don't know if turning on Lisa would help (see the other tabs).


By Andy Longton at Thu, 2004/02/12 - 6:00am

How can one maintain a copy on your local drive, and save using ftp:// to the remote server?

And do a cvs commit. Yes I know about the cervisia plugin.

Command line rules!

Derek


By Derek Kite at Tue, 2004/02/10 - 6:00am

What's wrong with Cervisia? Sorry couldn't resist. ;-)

> How can one maintain a copy on your local drive, and save using ftp:// to the remote server?

Did you try something like the following?

kfmclient copy index.html ftp://www.mysite.com/

> And do a cvs commit. Yes I know about the cervisia plugin.

cvs command line client????


By Christian Loose at Tue, 2004/02/10 - 6:00am

> How can one maintain a copy on your local drive, and save using ftp:// to the remote server?

How many zillion ways do you want? Along with file commands (cp -a) and dump I'm checking out DAR and KDAR. Very cool. Don't forget konserve.

> And do a cvs commit. Yes I know about the cervisia plugin.

> Command line rules!

Ah, then you're still a big Cervisa fan because now it runs on top of cvsservice and communicates with DCOP which, as you know, can be handled easily in a script or console. Have a look at kdcop when Cervisia is running. ;-)

So now Derek you can open Cervisa to your repository and set your script in motion to do what you want, checking cvsservice to insure that we're looking at the right repository. Hey, I'm guessing you'll want a Kommander dialog to run this. ;-)

If you really need help then let me know and our team of bash and perl wizards will whip it up with a nice Kommander interface so you aren't stuck on that nasty command line. ;-)

DCOP with Kommander RULEZ!


By Eric Laffoon at Wed, 2004/02/11 - 6:00am

> Ah, then you're still a big Cervisa fan because now it runs on top of cvsservice and communicates with DCOP which, as you know, can be handled easily in a script or console. Have a look at kdcop when Cervisia is running. ;-)

I guess another well-kept secret of KDE. :-)

For more info about the cvsservice and an example how to use it in a script you might want to take a look at http://tinyurl.com/2v82y.


By Christian Loose at Wed, 2004/02/11 - 6:00am

> I guess another well-kept secret of KDE. :-)

It's new. It has an excuse. ;-)


By Eric Laffoon at Thu, 2004/02/12 - 6:00am

"Windows" in this text must be "Ms-Windows"


By Andre at Wed, 2004/02/11 - 6:00am

I like to use kprinter from acroread (Acrobat Reader). What bugs me is, that acroread displays the stderr output from kprinter after sending the print job in an annoying message box.
I've made short wrapper for kprinter like

kprinter $1 2>/dev/null

and calling it instead of kprinter directly. This empties stderr to null, hence suppressing the annoying message box afterwards. But I think it's not an ideal solution. maybe somebody knows how to do it better?


By thomas at Tue, 2004/02/10 - 6:00am

I submitted a bug report to bugs.kde.org that offered essentially the same solution, though implemented in the kprinter source itself. I don't know if anyone has implemented the fix yet, though.


By Bob at Tue, 2004/02/10 - 6:00am

I'm compiling 3.2 right now. I like the look of the view locking in konqueror while searching google. I have been using multiple windows. Can't wait to try it.


By Echo6 at Tue, 2004/02/10 - 6:00am

You probably don't have to wait for that compile. it works fine for me in 3.1.5


By John Kraft at Tue, 2004/02/10 - 6:00am

In fact, Konqueror view locking has been a feature since KDE 2. It's just very well hidden.


By Spy Hunter at Tue, 2004/02/10 - 6:00am

would be great to develop this into a "KDE how-to" series.


By weapons of mass... at Tue, 2004/02/10 - 6:00am

Yes, how about "kde-tips.org"? Basically a community site where all kinds of tips can be found.. KDE is so huge that it boggles the mind.


By ac at Wed, 2004/02/11 - 6:00am

Why not use http://kde.ground.cz wiki?


By Anonymous at Wed, 2004/02/11 - 6:00am

Not enough visibility, I suppose. That, and Wikis are by design a bit hard to find our way around in. Now don't take me wrong, the KDE Wiki is great, but I think it just doesn't serve exactly the purpose expressed in the parent post...

Myself, I would LOVE a kde-tips.org kind of site! Especially with different sections about how to better use KDE, of course, but also how to code KDE apps (and panel applets and KControl modules and...), how to write patches for existing KDE code, etc.

Stuff like that. :)


By Anonymous Coward at Thu, 2004/02/12 - 6:00am

but:
-i never managed to be able to reach one of my sites that way because they force me to have a login with an "@" inside the name.
-the view locking in the case of google works better if you activate a big number of results, otherwise the locking/unlocking for the regular 10 results isnt much of a gain in term of time. It's great with images tho', or has been until gwenview integrated into konqui.
Actually, i prefer to open google links as background tabs, they load while i continue to scan the results, then i scan a few tabs while the next google resul page loads.
-audio cd is just great and has been for years. I would have believed more services like it would appear. What a great idea it was.
-fish: really deserves to be mentionned on the smb: page. This one also rocks


By djay at Tue, 2004/02/10 - 6:00am

> i never managed to be able to reach one of my sites that way
> because they force me to have a login with an "@" inside the name.

Have you tried writing %40 instead of the "@" in your user name?


By cm at Tue, 2004/02/10 - 6:00am

I had tried before and it didnt work.
The fun part is that it works now, but if I enter the adress of the site alone and the login and the passwd after, it doesnt.
Well, it's a progress, i guess.


By djay at Tue, 2004/02/10 - 6:00am

If the latter doesn't work any more I'd report that at bugs.kde.org.


By cm at Wed, 2004/02/11 - 6:00am

OK, it works but there are 3 small problems, and one of them was probably the reason to the whole difficulty.

1/ very annoying small bug:
when I bookmark the address that require the %40, it is immediatly replaced with a @, rending the bookmark useless.

2/ related very annoying bug:
impossible to edit the url in the bookmark, the %40 is immediatly replaced with an @ when hitting enter. As much as I understand this behavior, there should be a way to specify "keep that %40". Or maybe there is? Escape char? "\"?

3/ the one that got in the way: when typing the url with the @ instead of the %40 the url is "transformed" in the url bar:
ftp://login@site@urlofthemastersite.org
becomes
ftp://ftp//login@site@urlofthemastersite.
spoiling the history of konqueror. You can try with a fake url, it works.


By djay at Fri, 2004/02/13 - 6:00am

Hello!

Have you tried substituting the '@' by a '+', that seems to be a possibility with some providers.

Marc


By Marc Heyvaert at Wed, 2004/02/11 - 6:00am

Thanks man! And please don't stop ... :-)


By Stelian Iancu at Tue, 2004/02/10 - 6:00am

Pages