Konqueror Embeds Mozilla with XParts
navindra writes "KDE's component technology, KParts, has been extended to support out-of-process embedding of components theoretically including GTK components, Bonobo, and OpenOffice UNO components. Even better, the same technology could be potentially be used by GNOME to embed KDE components. Here are some screenshots of Konqueror embedding the Mozilla rendering component, and the whitepaper on XParts. This appears to be an important step forward in the interoperability of free desktops." The screenshots page has an excellent overview of what this does, and what it means. This is extremely impressive stuff people.
Just a thought... don't know whether that's realistic or not... but couldn't WINE be used (after some heavy modifications, I guess) with XParts to embed Windows apps info Konqueror (or any other app).
Opus: the Swiss army knife of audio codec
Just so you'll know, after looking over the white paper a little bit, it ends up that this is actually KDE playing catch-up to GNOME. X-Parts does not allow embedding of arbitrary GNOME component into KDE. It only allows embedding of out-of-process components into KDE, which GNOME has had for a long time. GNOME's embedding also does not require any specific toolkit (see OpenOffice as an example). No, Konquerer did not have to be modified to do this, but Mozilla _did_. This support has been in GNOME for some time.
Remember, this does not allow the arbitrary embedding of any GNOME component. It requires a wrapper for each GNOME component before being embedded. This is currently available for GNOME.
I'm not trying to discount what they've done - its very, very great! But I don't want people misunderstanding it either. I'm looking forward to the day when arbitrary components from either can be embedded. Whoever does it first will simply give the other person something to build from. Let's stop fighting, calling names, whatever. It's a great day, and let's be happy.
Engineering and the Ultimate
It seems that all the most exciting stuff is happening in KDE. The KDE 2.1 beta has a great deal of cool stuff, like HTML preview icons, text preview, and some very slick kio plugins. Things like seeing your Diamond Rio and digital camera as just a part of your directory tree is NICE. Drag a picture off of your camera right onto an FTP site. Isn't that how it should be??
Significantly, these features are being added with a minimum of pain. The embedded mozilla required NO changed to Konqueror. Adding digtal camera support to the Image Viewer (kview) didn't actually touch the kview code. KDE is built on *very* solid technical ground, with plenty of room for planned growth. It seems that having a high quality C++ architecture really helps.
This is really cool! I've always had a hard time deciding what desktop I liked best, because half of the applications I wanted was Gnome apps and the other half was KDE apps - those times may well be gone now (if I were to choose to use KDE2).
Remember Miguel De Icaza recently talked about getting more "reuseablility/code-reuse" under Unix (I know that is badly written, but you know what I mean!) - well it seems that the KDE-Team was listening.
As it says (here: story at dot.kde.org):
This is only a first step. Other possibilities include providing transparent access to OpenOffice components within KOffice, and embedding other Bonobo components, such as the various Nautilus components, inside, say, Konqueror... The goal is to provide the most powerful desktop for users by allowing them to pick and choose whatever software they like while still in the familiar and comfortable KDE environment. KDE is close to closing the schism within the Linux desktop environments by being the first project to allow users to utilize all the software written for different user interfaces within the KDE environment with unparalleled integration.
Also, people writing standalone applications that do not utilize any desktop technology can easily integrate with our environment in ways previously impossible.
What is cool too, is the this comment:
"It is important to note, that we did not have to modify a single line of source code in KDE or konqueror to get this running."
Greetings Joergen
It's based on DCOP. It allows you to do this in Python (and other languages, of course)
" )
//g'`
/kdesktop HTTP/1.0
----
#!/usr/bin/python
from dcop import *
from qt import *
app = DCOPApplication( "kspread" )
table = app.default.getDocuments()[0].map().table("Table1
table.setSelection( QRect( 2, 2, 4, 6 ) )
rect = table.selection()
print rect
print "done"
----
or you can do this to control a presentation!
----
# Python version of David Faure's dcop presentation automation script for kpresenter
#
# Simon Hausmann
from time import sleep
from dcop import *
app = DCOPApplication( "kpresenter" )
doc = app.KoApplicationIface.getDocuments()[0]
view = doc.firstView()
startAction = view.action( "screen_start" )
print "Starting Presentation %s" % doc.url()
startAction.activate()
sleep( 5 )
act = view.action( "screen_next" )
while startAction.enabled() == 0:
sleep( 10 )
if startAction.enabled() == 0:
act.activate()
print "Presentation finished."
------
This stuff is also expose via xmlrpc. That means that you can access it from ANY language that can open a socket and send text through. Here's one in shell script:
-------
#!/bin/sh
port=`sed -e 's/,.*//' ~/.kxmlrpcd`
auth=`sed -e 's/.*,//' ~/.kxmlrpcd`
cat > cmd.xml
KDesktopIface.popupExecuteCommand
$auth
EOF
length=`wc -c cmd.xml | sed -e 's/cmd.xml//;s/
cat > head.xml EOF
POST
Content-Type: text/xml
Content-length: $length
EOF
( echo open localhost $port
sleep 1
cat head.xml cmd.xml
) | telnet -8E