dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] Embedding X applications in Xsharp


From: Rhys Weatherley
Subject: [Pnet-developers] Embedding X applications in Xsharp
Date: Sat, 01 Nov 2003 11:29:16 +1000
User-agent: KMail/1.4.3

Hi all!

I've been playing around with the XC-APPGROUP extension under X, using it to 
implement a kind of plugin mechanism for Xsharp.

It is now possible to embed any X application as a child widget within an 
Xsharp application.  The pnetlib CVS tree includes "XClockEmbed.cs" as an 
example of doing this for "xclock", and the following screen shot shows both 
"gedit" (a GNOME app) and "kcalc" (a KDE app) running as two children of the 
same Xsharp main window:

    http://www.southern-storm.com.au/download/dual-embed.png

Why is this interesting?  Well, the next version of WinForms will have a HTML 
web browser control widget, and I'm investigating how we could embed third 
party open source Web browsers to get the browser functionality essentially 
"for free" (a few quirky issues to deal with, but easier than writing a Web 
browser from scratch in C#).

There is one caveat though: ssh login accounts.  The sshd daemon doesn't know 
how to properly proxy XC-APPGROUP authentication tokens, and so it is 
necessary to create a "back channel" to the X server to bypass sshd.  If 
you're using VMWare, then you might be using ssh without even realising it, 
so the following instructions apply to VMWare also.

Xsharp uses the SSH_CLIENT environment variable to discover where to connect 
to on the back channel.  However, some older versions of bash do not properly 
export this variable, so you may need to do "export SSH_CLIENT" manually.  
You may also need to use "xhost +" on the machine running the X server.

Xsharp will attempt to give you advice as to what is going wrong with the 
embedding system if it cannot connect.  The code that does this is in the 
"CanEmbed" method in "EmbeddedApplication.cs".  E-mail the list if you're 
having problems.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]