[X2go-dev] Extra functions requested in x2go

John A. Sullivan III jsullivan at opensourcedevel.com
Sat Jun 19 19:19:38 CEST 2010

On Fri, 2010-06-18 at 10:19 +0200, Dick Kniep wrote:
> Hi List,
> First of all,I am very impressed by the work you have done and would
> like to thank all involved.
> We are a company that provides a kind of CRM system over the net to
> our customers. (See www.lindix.nl, text is Dutch)
> Currently we use GoGlobal but we want to switch to x2go. However,
> there is a missing piece. In GoGlobal it is possible to start an
> application on the client by the use of the extension of the file. So
> I can write an Excel sheet in my application and subsequently start
> the file, the result is that a local session opens on the client with
> the Excel sheet.
> I realize that there are security issues here, but for our application
> this would be a real bonus.
> Is there any chance this could be implemented? If the number of hours
> involved is reasonable, we even would pay for that.
I'm not entirely sure but you may be able to do this yourself.  I can
think of two possible ways but I have tried neither.

It is possible to start a specific application rather than a destkop.
If one started something like Konqueror or Nautilus, I wonder what would
happen when one clicked on a file to open it.  It may very well open in
the associated application but I'm not sure.

If you wanted more granularity, i.e., to pass a specific file rather
than searching through a file manager, you may be able to adapt the
scripts yourself.  It is the beauty of open source.  X2Go is largely a
collection of bash and perl scripts that tie together various
technologies (the NX libraries, ssh, pulseaudio, sshfs, etc.).  Perhaps
you could add some kind of case statement or other branch logic to parse
the passed file for the extension and then launch an application based
thereon, e.g., 

if [ "${EXT}" = ".xls" ];then
	COMMAND="/usr/bin/oocalc ${1}"
elif [ "${EXT}" = ".odt" ];then
	COMMAND="/usr/bin/oowriter ${1}"
. . . 

I'm just guessing at the syntax and do not know if it is possible but we
have been able to highly customize our X2Go scripts for our very
specific environment.

I recently posted a scratch sheet to this list on what we found as we
investigated the process X2Go undergoes to start and stop sessions. It
describes what scripts run when.  Good luck - John

More information about the x2go-dev mailing list