KDE 3.1: Desktop Sharing in Practice

Desktop Sharing is a KDE service that allows you to share your desktop using the RFB protocol, better known as VNC. This new feature of KDE 3.1 allows a friend or administrator to fix problems on your computer, or you can use it to show your desktop to somebody else at a remote location. It is compatible with all regular VNC / RFB clients.

Tim Jansen has created an overview page where he explains how to set up the Desktop Sharing, together with a nice interactive demo.

Dot Categories: 


by Alistair Mann (not verified)

There is definite value in connecting to another desktop on the same host.

The value in for me would be the seperation of accounts for different purposes: I have an account that I use for work, and a second account I'd like to use for personal stuff. I can log in to both; I can start simultaneous X sessions for both; one can swap between both sessions. By supporting single host connections, one could keep both accounts seperate in the filesystem but in one place on the desktop.

ATM, I can VNC from one account to the other but see just a bunch of garbage in the connection window. If loopback support would solve this problem, it would get a vote from me!

by Tim Jansen (not verified)

The garbage that you are seeing is a limitation of the X11 driver that you are using. If the screen is not in the framebuffer XGetImage doesn't work. I havent seen a XFree driver that is able to do this.
And for this use case I would rather use Xnest, no need for VNC.

by Alistair Mann (not verified)

Tim, thank you so much -- Xnest is exactly what I needed!

Thanks also for your work with rdc -- I've found it a vital tool in deal with real VNC (adminning remote Wintel) situations!

All the best

by Boo (not verified)

Would like to know what too you used to create demo. Was impressed with the cursor being captured as well.

Desktpo sharing looks like a great tool. It may allow me to drop WebEx which is very expensive


by Anonymous (not verified)

Are the artifacts in the demo due to VNC, the capturing or the conversion to Flash?

by fault (not verified)

I don't see any artifacts here.. are you using gplflash or macromedia flash?

by Anonymous (not verified)

It's using /opt/netscape/plugins/libflashplayer.so of SuSE 8.1 here. See the screenshot showing the artifcacts.

by Tim Jansen (not verified)

swf2vnc has an option '-nommhack' which is a work-around for a problem that you describe - however, when the option is enabled, it doesn't work on those systems that play the movie fine now. (I am using Flash 6, downloaded from Macromedia)

by Jim (not verified)

I think this is awesome. I do have a couple questions:

1) Is this as bandwidth efficient as tightvnc server?

2) How can I set this up to stay on for more than 1 hour? I connect via ssh from work and it would be great to use this, however, I don't know of a way to either turn this on via command line (remember I'm in via ssh) and/or leave it on all day and just connect to it from work.

Any opinions/thoughts?


ps. I understand the security implications, but I don't need to be protected via locked out options .. ;)

by Tim Jansen (not verified)

1. Yes, more or less. It uses the tightvnc encoding, and the compression should be similar to the Windows server (but not as good as the unix/X11 vncserver server, which has far more information about the screen changes). Latency is quite bad because of X11 limitations. This may improve with future XFree versions.
2. in KControl/Network/DesktopSharing enable "uninvited connections" and set a password. The UI is not optimized for this use case though, and I personally prefer a regular vncserver for this use case (because of bad latency and I don't want to be logged in all the time).

by Rex Dieter (not verified)

1. uses tight encoding?
I was under the impression that the vnc implementation in kde-3.1 did *not* include any advanced encoding methods, only the good 'ol classic hextile-n-friends encodings. Can you confirm the use of tight encoding?

by Tim Jansen (not verified)

Yes, definitely :)
(It is easy to check with krdc in medium quality mode - look at images with many colors and you can see the jpeg artifacts)

by Rex Dieter (not verified)

OK,thanks... I had just assumed that the performance problems I had been seeing were related to bandwidth... guess not. It's just plain slow. (-:

You're answer for #2 isn't quite as satsifactory as I'd like.

I had a nice script that would let me say "remotehost blah.whatever.org" and it would ssh to the box, setup a ssh tunnel and run krfb. Then it would spawn a local vncviewer that would use the tunnel to securely transmit the data. It was really slick.

Now I'm not sure how to do the equivlent. There seems to be no way to remotely start krfb for a single session. I'd really rather not have it listening for connections all the time.

Any ideas?

thanks (its a very cool app!)

by Tim Jansen (not verified)

You can enable/disable kded/kinetd using dcop, but I wouldnt recommend this, since it is rather internal (and future krfb versions may have other kinetd modules).

Better would be to write a command line tool that modifies the configuration (krfb/configuration.cpp) like kcm_krfb does. I accept patches :)

by gonzalo (not verified)

I've been searching all over the net for a way to start krfb from a ssh terminal and this thread is the closer i've got but still can't do it :( . Did someone succeed on this?

by ant (not verified)

Here's how I do it (using DCOP as alluded to above):

1) ssh in
2) make sure your ~/.kde3.4/share/config/kfrbrc (or whatever) allows uninvited connections, and doesn't ask for confirmation for them.
3) in your ssh session, 'dcop kded kinetd setEnabled "krfb" 1'
4) connect with vnc, krfc, remote desktop etc
5) 'dcop kded kinetd setEnabled "krfb" 0' to stop the service

by fredi (not verified)

I've tryed using krfb to connect to another desktop with win2k, but for getting the login screen I've to enter ctr+alt+canc (which is possible using vncviewer) . So, how can I enter this kind of key-combinations in krdf?? I've googled without result and the help does not say nothing about this. So for now i'll continue using vncviewer.

by Tim Jansen (not verified)

In the 3.1 version this is only possible in fullscreen. The CVS version (that will be in 3.2) already has a special-key function in window mode (see the screenshots).

by fredi (not verified)

Good, is it possible to build krdf3.2 with kde3.1 ?

by Tim Jansen (not verified)

Should be possible, yes. Currently it does not use any new 3.2 features.

by Stof (not verified)

How much bandwidth does this exactly consume? Is it more or less bandwidth than X?

by Tim Jansen (not verified)

It is hard to say how much bandwidth it consumes, it takes all bandwidth that is available and adapts the framerate accordingly. In general it is less efficient than X11, especially when you compress X11 using ssh or use lbx. But this depends on the number of pixmaps you transmit using X11. VNC is better at that (if you use a low quality setting and can tolerate the artifacts of JPEG compression).

by Jonas (not verified)

So, we have a super-duper-desktop environment running under a network transparent windowing system... so where does VNC fit in? Our windowing system is already networked, so just using programs on other computers should be no fuzz.

As for connecting to running desktops, that is a bit harder but still no new problem. It is almost a decade old code out there that does this. Why not use that?

by Tim Jansen (not verified)

The main reason for VNC is that it is much easier to implement. It's a small, bitmap-based protocol.
VNC does not have the capabilities of X11 (e.g. 3D stuff) and it usually consumes more bandwidth. That's why I plan a X11-based system for accessing remote computers (without sharing, one user per desktop). I won't make any promises about the timeframe though.

by Eric Williams (not verified)

VNC is a remote control applictation; X11 is not: It's a window system that happens to be network transparent. 2 completely different roles with just a smidge of conceptual overlap, as I understand it.

by Tim Jansen (not verified)

Yes. VNC would not be able to coordinate several applications that use a common screen, manage windows, let apps do IPC and so on... that would require an additional protocol (or massive extensions).

by John Jones (not verified)

ok in a lab in cambridge (UK) they thought that having a low powered machine display whats on the big server hence VNC

ok in a lab in cambridge Mass(US) they thought that having a low powered machine display whats on the big server hence X windows

really the differance after many years is that VNC is a frame grabber and gets the whole desktop and can export MSwindows X11 WinCE Acorn and others while an X can only show an Xserver AFAIK their are no X servers that export the MSwindows desktop let alone a MacOS desktop


John Jones

First of all I want to say great job guys. I love this new feature.

I was hoping someone tell me a way to change the IP address on my invitation. I am behind a firewall and I need a way to set/type in the correct IP address for my machine.

by Tim Jansen (not verified)

If you are behind a NAT, getting your IP is quite difficult. But usually it is not even the biggest problem: your firewall will not forward connections to you. Beside manual solutions (looking up the address in the router/firewall, forwarding ports manually), the following developments may solve this problem in the future:

1. the IETF midcom is working on a solution for problems like this. But right now the only result is the STUN protocol, which only works for UDP (VNC requires TCP). STUN also requires a server in the internet.
2. There is the UP'n'P Internet Gateway Device specification that you can find it at www.upnp.org. If you have a IGD-enabled router (linux-igd.sf.net, some DSL routers and WinXP internet connection sharing), UPnP can be used to acquire the public IP address and forward a TCP port to your computer. IGD has its problems, beside being ugly. For example it does not have any authentication, so anybody in your LAN would be able to reconfigure your firewall. In home networks this shouldn't be a problem though. I looked at it, but it seems to be quite complicated. But if somebody wants to implement it, I will gladly accept the patch :)
3. If you do the invitation over IM and the remote side is not behind a NAT, it would be possible to create the connection. (Because both sides could negotiate using the IM protocol and then the server creates a connection to the client). But IM invitations are not possible as long as there is no IM infrastructure in KDE.

I have a simpler question. I am just using a linksys router where I am just doing IP forwarding and I know what my correct IP address is. I have been able to connect to my machine using VNC viewer with this address so I know it is correct.

My Problem:
When I create a personal invitation the Host(address and display) the IP address is wrong and I just want to be able to hand type/edit in the correct value.


by Tim Jansen (not verified)

The IP address is just a hint for you, so you can tell somebody your address. It is not used for anything else. So if the displayed IP is wrong, just ignore it and tell the invitee the correct one.

can you tell me what ports you had to forward in order to get this to work? i'm having a difficult time getting VNC to connect through my linksys router, myself.


Hi ibbie,
On my machine I needed to forward port 5900 to the machine that was hosting the desktop. If you want to change the port that host the desktop sharing go into the control panel->Internet & Network->Desktop Sharing. Choose the network tab and uncheck the automatically select network port.

I setup my Linksys router by opening TCP port 3389. I have no problems using Remote Desktop Sharing. Hope this helps!

by Kbeaumont (not verified)

I just installed KDE3.1 three days ago and am having problems with konqueror. It spawns a couple of artsd processes in filemanger profile when it starts even though arts is already running. When I close konqueror the process still remains unless I kill -9 either arts or konqueror. If I kill konqueror only, the arts processes remain and I can't log out until I kill arts. If I restart konqueror without killing arts, konqueror freezes and doesn't close or respond. If on the initial start of konqueror I hold the mouse over a sound file, konqueror freezes too. I installed via rpm's from Mandrake club but since have recompiled arts and kdelibs from scratch and still have the same problem. Other apps such as kaboodle have no problems with arts. It seems to be a problem specific to Konqueror in filemanger profile. If anybody out there has an idea of what to do about this I would be very grateful!

by ik (not verified)

if you don't need them, try disabling previewing (thumbnails) for sounds and movies ... its flaky here too.

by Dave (not verified)

Is their a windows VNC client that allows invitations compatible with the KDE implimentation. I would like to set this up to administer my users on win machines.

by Mark Hannessen (not verified)

check http://www.uk.research.att.com/vnc/download.html

next time try google first before posting, it took me only 1 sec to
find the site.

by Anon (not verified)

'think he's axin' 'bout KDE c'patible invitations, yer URL sez nuttin' 'bout dat. I don't know of anything like that. You can, after configuring the server to accept connections, have the user email you the IP after running winipcgf, or go to dyndns.org and get a mywindowsmachinename.dyndns.org name which resolves to the machine's respective dynamic IP.

by Dave (not verified)

I was refering to the SLP features of inviting users.

Next time try reading a post before you flame it, but that will take more than 1 sec...

by Anonymous (not verified)

Along this line, does anyone know of a Windows or Mac client which uses SLP to advertize itself, the way krfb does?

And is there a way to have krfb do a reverse-name lookup on the client's IP address, so that the hostname shows up in the Address field when browsing (I'm using the 0.7 version, BTW, in case that's been implemented in the KDE 3.1 version).

by Tim Jansen (not verified)

No, krfb is the only server with SLP support ATM. Actually I am happy that way, because I want to change a few things in the service template :)
(it will be backward compatible though)

You can announce a service running on another computer with OpenSLP's slpd though. Add the following in your /etc/slp.reg file (replace herry with the name of your computer, and change the description):

use default scopes

(Note that the description attribute exists twice)

by Daan (not verified)

Altough I do not use KDE desktop sharing yet, I like that I am now typing my mail on my other Linux computer from the Windows VNC client here. Monitoring the bandwidth usage, it does use all bandwidth (1 mbit/s) here...

by Nasry (not verified)

aku ada kirim desktop

by Gasbud (not verified)

Tak meg dit koyu buga. Trupavabi nepo desktop! Gasbud.

by Luke (not verified)

I use VNC all the time. Currently, I use it to abstract my small home network of cheap PCs into one workstation. I am still using KDE 3.0 on RH 7.3, but when I upgrade to KDE 3.1, I will definitely make use of this!

Now if only sharing files and printers (sambda stuff) was made this easy with KDE.

by Alain (not verified)

In the overview page, nothing is said about the packages that are necessary. I guess that it needs VNC, of course...
I have the first screenshot, but not the second. VNC is not installed but I have TightVNC installed and it seems similar, as said in the Mdk 9.0 documentation...
What I need to install ? Or perhaps a daemon to activate ??

by Tim Jansen (not verified)

You don't need anything (beside KDE and its requirements), everything is included in the 3.1 packages. There is no daemon to activate, everything is done with kded which is started when you log in.