Re: [Q] GnomeTerm/zvt/ Readline

Hi Bertrand,

> My final goal is to use readline (gnu library to manage input lines,
> with history management
> and a lot of fonctionalities) as the input function of the scilab port
> to gnome.

How does the interface to scilab work?  Something like matlab, where
you have a terminal input and additional output windows?

> [Q3] : Is the following right: The GtkTerm is just a widget that manage
> text displaying/ scrfolling ...
>           and te GtkTty creates a pseudio-terminal to get stdin/stdout
> in the term widget for
>            forked processes?
> [Q4] : Has thhose widgt another use than to make a Gnome-Xterm program?
>            (I guess so, because there is already zvt and Miguel
> gnome-term wrapping)

As stated elsewhere, zvt is a different implementation of a terminal
widget.  Primarily it's faster than the GtkTerm widget, but it is less
layered too - the vt emulation and terminal are fairly tightly integrated.
(although internally it is quite well layered).  It was certainly
intended to be an xterm like device, but I guess it could be used
differently, if the application did some of the work.

> [Q5] : Readline needs to take its input for a file stream. Is it
> possible to use the ptty
>     in the GtkTty without forking anything?

Hmm, in reference to zvt, I think this would be possible, but you might
need to use it in a different way (and it would need some simple hooks in
the widget for it).  I'm not sure that a pipe would work
that well if the same process is reading and writing both ends (and
one end fills up, for instance).

If it can possibly be used to read from a data stream, then it would be
much easier to use.

> [Q6] : has the code about ptty in gtkTty been tested on non-linux arch?

The stuff in zvt comes from the midnight commander code, so it should
be relatively portable (does bsd, sysv and sgi(?) style pty's).

> [Q7] Has naybody been able to use realine within a gtk Widget?

No idea.

> [Q8] Because I am not sure I will get answers to those Qusetions, I will
> continue to search the
> answers by myself and will truy to make a readline-enabled widget usinf
> gtkTty as a base,
> any advice and warnings would be very kind as I don't know anything
> about terminals, ptty
> and all that stuff.

If it is possible to use readline in a way which doesn't need a file
descriptor, then it could be more tightly integrated with one of the
widgets (and possibly made a widget of its own).  It would be relatively
simple to add the external hooks for the zvt widget to be able to use it
this way.  However, if you need to get input from a fd i think you may
have to fork somewhere along the line, or at least use
multi-threadedness of some fashion (although i could be wrong here).

It might be just as easy to write a terminal-based program (which
displays any additional windows it needs) and exec it in an existing
terminal emulator.  But that would depend on how the interface works.


     ///   `... thinking is an exercise to which all too few brains
    ///     are accustomed.' - First Lensman, E.E. `Doc' Smith
 \\\/   Michael Zucchi, B.E.       

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