[Nice] Is libnice suitable for remote control?

Youness Alaoui youness.alaoui at collabora.co.uk
Fri Mar 2 15:31:16 PST 2012


Sorry for the late response, I've been a bit busy lately.
Yes, libnice is indeed a good solution for you. However, there is no readily
available software that does this for you, you would have to write your own
using libnice, and if you want to release it as an open source project, I'm sure
it will be useful to others!
I don't know what people use, I personally never had a need for such a thing.
I think having a tool with libnice that would provide something like netcat
would be very useful and would give a good example of code usage too, however
the exchange of candidates will still be a bit troublesome.
STUN/ICE/TURN are not just for doing VoIP, while they were primarily created for
that, they are actually independent of that technology and they can be used for
other stuff. For example, gtalk also uses ICE to do file transfers, and they
implemented a TCP-Over-UDP protocol for that (which libnice also supports and is
compatible with).
If you create a reliable nice agent, it will act like TCP, which should allow
your remote controlling to work without issues, so what you want is definitely

There is however another possible solution: Telepathy Tubes. That's a solution
by the Telepathy framework that allows setting up a socket between two IM
contacts. It currently only supports TCP connection (and dbus connection) and
doesn't use ICE, but will still establish a connection by having a fallback
through the XMPP server as a proxy.
It has already been used by Collabora to create an ssh client using Telepathy
Tubes and you can read about it here :
http://blogs.gnome.org/xclaesse/2010/07/12/ssh-your-im-contacts/ and here
(The repository moved to freedesktop though and is available here :
http://cgit.freedesktop.org/telepathy/telepathy-ssh-contact/ )
Also using Telepathy Tubes, there are the projects Vino and Vinagre which
implement VNC remote control, and they have been patched to integrate with
telepathy tubes. If you use Empathy, you can click on a contact and the option
"Share my desktop" will be available that will set up everything for you.
You can see how it works here :
http://people.collabora.co.uk/~cassidy/blog/vnc-tube-offer.ogv and

I hope this helps you.

On 02/29/2012 06:13 PM, Аскар Сафин wrote:
> Hi, I have a problem: there is a computer A and a computer B. And I want A to remoute control B via something like ssh. But A may use private IP address and B may use, too. (Of course, NATs are not mine, so I cannot configure it or cannot use direct connection, Internet providers gives to us this NATs)
> Is there a solution? Is there complete program to do this? (I mean free software. There is non-free Hamachi and Teamviewer)
> Or I need to write such program myself?
> If there is no complete program, WHY?
> This is a very actual problem, so (I think) there must be such program.
> How typical users or companies solves this problems usually? Do they use proprietary solutions? Or they buy public IP addresses? Or they uses some own middle server with public IP?
> Is there program for TCP/UDP connection between two hosts which can have private IP address? Something like netcat?
> If there is something like netcat, I will make simple dummy insecure remote control scripts:
> Server script:
> mkfifo fifo
> nc -l ... < fifo | sh > fifo
> Client script:
> nc ...
> Is it good idea to use STUN/TURN/ICE protocols? Is it good idea to use libnice? Or STUN/TURN/ICE/libnice suitable only for media/VoIP/IM/signal/game applications?
> I think remote controlling has TCP nature (not UDP).
> Is it possible to create SSH tunnel over ICE?
> I know that if I use ICE I need to send two initial messages via some alternative protocol. This is not problem for me
> Askar Safin
> _______________________________________________
> nice mailing list
> nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/nice/attachments/20120302/3eccd03d/attachment.pgp>

More information about the nice mailing list