[ale] how do I run, and control, X11 server on android tablet?

JD jdp at algoloma.com
Sun Dec 30 07:59:56 EST 2012


> 
> Thanks for the note.  I'm not afraid to admit that I don't really know what
> you meant in your first paragraph.  As I mentioned in my reply to Sam, I

You were kind.  My description sucked.  A picture would help, I'm certain.

 almost got it to work with a program called X Server which is available in
> the Google Play store.  There is another one as well, which is somehow
> attached to VNC, but I couldn't figure that out in a short time.  I installed
> X Server on the tablet, then used the command Sam recommended to export my
> display from my Ubuntu laptop, specifying the IP of the tablet as the target.
> I then started firefox from a terminal window on the laptop.  I saw the
> firefox window appear on the tablet's screen.  However, I couldn't interact
> with it or control it in any way.  I could only look at it and reposition the
> mouse cursor by touching the tablet screen.  It was tantalisingly close to
> working.

That X-server is not a complete implementation, so many programs will never work
properly.  THAT is probably what you are experiencing.  Firefox is not a good
test - they don't follow standard X/Windows programming techniques - at least if
you consider supporting X-Resources "standard" .... which I do.

> Let me elaborate a bit on what I want to do.  VNC might work, but I'm not
> sure it will.  I'm just beginning to learn the GO language.  It really
> doesn't have a GUI, so it's not very good for desktop user driven programs.

A GUI is just a set of libraries.  No language has a GUI. They just have
libraries that make building and running a GUI on a specific platform possible.
Go is so new that there aren't many libraries for what you want.  I digress.

> I think there are some bindings to C Libraries for FLTK or GTK.  However, I'm
> trying to do something with what GO has built in and only minimal additional
> stuff.  It occurred to me that an X client can export its display to any X
> server on the net via TCP/IP (with proper authentication, etc.).  Well, GO
> does have networking built in.  So, if I can send out X commands through the

You are not going to implement an X-Client in Go without a HUGE amount of work.
This is a big project. HUGE.  I wish you luck if you are going to attempt it.

> TCP/IP connection to any X server, then I can have instant programmatical
> access to a GUI that I can drive to do what I want.  So, here's an example
> off what I want to do.

You'll need to manage state for the X objects.  This isn't a trivial interface
like HTTP, this is a fully client/server interface with tens of types of objects
just display a single window ... with nothing inside.

> Let's say I want to initialize a GUI for the user.  The user is on the
> tablet, the GO program is on my laptop.  I use GO's networking commands to
> issue X requests directly to the X server running on the tablet, and a
> program window appears on the tablet.  I don't know exactly how to do this,
> but you would have to manipulate the TCP/IP data stream directly.  I send
> other X commands from the GO program on the laptop to the tablet and menus
> and buttons appear on the tablet.  I initialize text entry blanks, and even
> images, all programmatically, and X server becomes my GUI.  Any computer that
> can run X can be my display, even the same one that is running the GO
> program.  I get an instant GUI and cross platform ability without linking in
> custom libraries on every target machine.

If I'm understanding what you want correctly, I'd use a Linux machine as the
central box and use VNC from the tablet.  This is the shortest path.  Use any
libraries that you like to have communications between the programs - rpc,
CORBA, lots of tools have this built in. Heck, I've used Tk/TCL to remoting
control a native X/Windows program ... took less than 2 days to connect
everything up.  I've also used named pipes for this.  Lots of ways are available
that do not require implementing X/Windows.  I would probably look towards using
a set of Json interfaces over SSL, if you care about security at all.

I have an 8+ book set on X/Windows programming. Each book is probably 500-700
pgs long. These are the standard books used by all X/Windows programmers.  I
really believe you have under estimated the effort required.

Not knowing what you are getting into has spawned many great projects ... Linux
... for example.  Even with all the X11 source code, this is a huge effort, but
don't let my overly cautious words stop you.


More information about the Ale mailing list