Skip to content

Linux Magazine: Conference Report + Scripting KDE with DCOP

Monday, 6 October 2003  |  Binner

In its November 2003 issue, Linux Magazine publishes several KDE related articles of which two are also available online in PDF format. The first, titled "There's an aim called 3.2" looks back on the KDE Contributor Conference and asks again several developers what they really accomplished during the hack fest. In "Boost your efficiency" Scott Wheeler describes how you can easily write scripts which use DCOP to control your KDE desktop and help you save much work.

Comments:

That's all right, but... - Roberto Alsina - 2003-10-06

...what's the picture of the guy with the weird shirt and the iron about????

Re: That's all right, but... - Scott Wheeler - 2003-10-06

I guess my "pale geek with long hair" look wasn't quite exciting enough to make it. I would have even been willing to hold an appliance on request though as I'm currently inbetween (cough) irons it would have had to have been a coffee grinder or something. :-)

Re: That's all right, but... - Roberto Alsina - 2003-10-06

I understand your position, since I have not owned an iron in... well, I have never owned an iron. I suggest in your curriculum you include a copy of this article and say it came from "irons monthly".

Re: That's all right, but... - Navindra Umanee - 2003-10-06

But what do you do when your ties get crumpled? ;)

Re: That's all right, but... - Roberto Alsina - 2003-10-06

If I gave away my sister at her wedding without a tie, I think I can get through life without ties :-) Here's some ideas: a) T-shirts, Mao shirts, polo shirts, other shirts b) neck braces c) Borrow a tie e) buy a new tie if I really really really need one I've never tried b) yet, and only got to e) once. Then I had to beg someone to tie my tie for me, because I have forgotten how it's done :-) But that was like two years ago.

Re: That's all right, but... - Navindra Umanee - 2003-10-06

Yep. I had this crappy job when I was very young where ties were compulsory, but otherwise I'm as anti-tie as they get and I've since never worn a tie for any other social or work reasons... > Then I had to beg someone to tie my tie for me, because I have forgotten how it's done Do you know of any ties that don't require tying? Like, elastic or buttoned or something? That could come in useful for emergencies. Btw, I don't have an iron either... :)

Re: That's all right, but... - Gigi, il gaio - 2003-10-07

He is cute, half Matrix look, and that jeopard couch must be confortable per fare l'amore.

Re: That's all right, but... - a.c. - 2003-10-08

Actually, change him out for konqi. Might make for an interesting pix.

The DCOP aritlce rocks! - Alex - 2003-10-07

I learned a lot ;)

Re: The DCOP aritlce rocks! - ac - 2003-10-07

DCOP is not *half* as famous as it should be. People talk all the time about Bonobo and never use it. People never talk about DCOP but DCOP is used to do *magic*. Magic, I tells ya.

Re: The DCOP aritlce rocks! - anon - 2003-10-07

bonobo is not the same thing as dcop anyways. it's more like gnome's equivalent of kparts. gnome uses CORBA/ORBiT instead of dcop. there is no equiv of dcop's CLI or GUI frontends however.

Re: The DCOP aritlce rocks! - Haakon Nilsen - 2003-10-07

Yes, a famous saying goes like "Any sufficiently advanced technology is indistinguishable from a really cool DCOP script."

Re: The DCOP aritlce rocks! - JohnFlux - 2003-10-07

Does anyone know how I can get the window that is currently in focus? I want to grab the web page that a person is viewing when they do. Then look up the associated rdf file for the web page, and provide a list of the rdf links for that web page in a small app. This is for people who find it hard to move their hands. They could navigate a web page like slashdot by saying the title number (e.g. 1. 'title 1..' 2. 'title 2...' and so on)

Re: The DCOP aritlce rocks! - Scott Wheeler - 2003-10-07

Well, here's a bash script to get the currently active Konqueror. What you're talking about becomes non-trivial, but this might get you going. Sorry for the lack of formatting -- the Dot's text input doesn't allow formatting characters (i.e.  ) == BEGIN SCRIPT== #!/bin/bash for i in `dcop | grep konqueror` ; do for j in `dcop $i | grep mainwindow` ; do if [ `dcop $i $j isActiveWindow` == "true" ] ; then echo $i is the currently active Konqueror. exit fi done done echo There is no currently active Konqueror.

Re: The DCOP aritlce rocks! - Dee - 2003-10-07

Thanks, but my konqueror doesn't know the function isActiveWindow $ dcop konqueror-2885 konqueror-mainwindow#1 isActiveWindow no such function Kde 3.1.3 This is what I get from $ dcop konqueror-2885 konqueror-mainwindow#1 QCStringList interfaces() QCStringList functions() void openURL(QString url) int viewCount() int activeViewsCount() DCOPRef currentView() DCOPRef currentPart() DCOPRef action(QCString name) QCStringList actions() QMap<QCString,DCOPRef> actionMap()

Macro recorder - tofu - 2003-10-07

I think for newbies, it will be nice if all KDE applications has a macro recorder that can generate DCOP scripts. But maybe it will be duplicated of what QSA can offer?

Re: Macro recorder - Shane Simmons - 2003-10-08

I have this horrifying vision of someone naming it kASS. The Mac zealots in the audience will get the joke.

put content of file into clipboard - anonymous coward - 2003-10-07

dcop klipper klipper setClipboardContents "`cat file_you_want_to_copy`" nice article

Re: put content of file into clipboard - Scott Wheeler - 2003-10-07

Tried that, oh, say with a file with more than one line? ;-)

Re: put content of file into clipboard - Debian User - 2003-10-07

Hi, I use that regularily that way I believe at least :-) Yours, Kay

Re: put content of file into clipboard - anonymous coward - 2003-10-07

yes. tried it again with a file which has 213 lines. works fine

Re: put content of file into clipboard - Scott Wheeler - 2003-10-08

Ah, doesn't work with all shells (I use tcsh.), but it does seem to work with bash (after one test).

Re: put content of file into clipboard - Debian User - 2003-10-08

Hi, if it works with POSIX shells, it's good enough. The csh family is a bastard anyway ;-) Yours, Kay

did anyone look at the doc summary of the pdf? - Mike - 2003-10-08

It really urks me that so many Linux related pdfs are written using non-Linux tools. Are we production quality or not?

Re: did anyone look at the doc summary of the pdf? - Debian User - 2003-10-08

Hi, when we stoped using Linux to proof it could be used, we showed it was ready for production. Honestly, why have to use Linux for relatively simple tasks like that?! Yours, Kay

Re: did anyone look at the doc summary of the pdf? - Haakon Nilsen - 2003-10-09

Are you saying that the only reason to use Linux is to "prove" something? I'm sure you're not, but that's easy to read into your statement. We use Linux because we prefer it over the alternatives for various reasons, and the reason some alternative was used for the PDF has probably got to do, as was suggested, with workflow processes or something other instead.

Re: did anyone look at the doc summary of the pdf? - Debian User - 2003-10-09

Hi, English makes it hard to recognize conditional things some time. I of course meant "when we would stop" which can be expressed as "when we stoped". But I also wanted to express that we stoped actually already. Nobody needs to use Linux over other platforms to prove it can do something the other can. I can. But we are still free to take work flow preferences. Yours, Kay

Re: did anyone look at the doc summary of the pdf? - Patricia Jung - 2003-10-09

In this particular case, the answer is simple: workflow. The pdfs are generated out of the DTP program we use, and as for today there is no such thing as a production ready Linux DTP program suitable for magazines. We hope, Scribus <http://web2.altmuehlnet.de/fschmid/> will get there one day, but for the moment we have to stick to MacOS for this task. (FYI: This publisher is a MS free zone, everything apart from layout related tasks is done using Linux :)

Re: did anyone look at the doc summary of the pdf? - Mike - 2003-10-09

For DTP, I guess I can understand it. However, I see a lot of other Linux related pdfs that could have easily been written in OOo or LaTeX if the time had been put into it. Here we are telling the world how great our software is, and then we don't even use it.

Re: did anyone look at the doc summary of the pdf? - Jeff Johnson - 2003-10-09

>>However, I see a lot of other Linux related pdfs that could have easily been written in OOo or LaTeX if the time had been put into it.<< The problem is not that it is impossible. The problem is that it is too difficult and uncomfortable, especially LaTex. But also OOo is, while certainly not bad for its costs, much worse than MS Word. Many people use the tools that make them most productive and do not use free software just for the sake of it.

OpenOffice.org? - Moritz Moeller-Herrmann - 2003-10-09

I can't see your case for MS Word being better then OOWriter. For almost all uses many people comfortable with both programs prefer the latter. Only people who don't really know and use OOwriter, such as you, would claim that it is "much worse". As we are talking about PDF creation: This is impossible to do using MSWord. Microsoft software can't do it. (I know distiller and Freepdf, but those are not part of MSWord, you might as well use CrossOver and kprinter....) In OpenOffice it is one click!

Re: did anyone look at the doc summary of the pdf? - Jeff Johnson - 2003-10-09

Sorry for telling the truth, but we're definitely not. 'Linux' stuff works, but it can not compete. At least if you compare the price of the commercial offerings.

A bit of documentation... - Vodka - 2003-10-10

on DCOP calls woudn't hurt... For example, ksmserver->ksmserver->logout(int, int, int) does not tell me what each int means... The first time I tried this it promptly rebooted the ltsp server, while there were people logged in...

Re: A bit of documentation... - PinguinPfleger - 2004-05-05

The first int is the parameter, which turns interactivity on or off. If it is 0, the ksmserver does not ask if logout command should be executed or not. If the first param is != 0 the ksmserver asks. The second param is the logout command. 0 means 'logout' from currentkde session. 1 means 'reboot of system and 2 means shutdown of system. The third param is still unknown for me. Maybe it is some kind of timer, but I am not sure. I will look through the sources (if I find them) and try to find out what this third param means. I hope that that was a little bit of help for you.

kdebindings for Mandrake 9.1? - Frustrated - 2003-10-10

Bit late posting, but does anyone know if there's a kdebindings binary rpm floating around for Mandrake 9.1, without forking out for Mandrake club? I realise KDE has nothing to do with building binary releases - just curious if anyone could help - Rpmfind doesn't seem to find anything.

dcop and nmblookup? - james - 2003-10-13

I wonder if a perl script could be written to "discover" a local samba network and automatically create links in the kfmclient (kde file manager) for the shares? Similar to the way the old Corel file manager "self discovered" and configured itself for windows networking. I really think that would be a good thing.

Re: dcop and nmblookup? - Rube - 2003-11-10

What's wrong with lisa? Shares are automatically in the "network" tab, as long as your samba's working.