[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ncurses + a newly spawned xterm
From: |
Brad Beveridge |
Subject: |
ncurses + a newly spawned xterm |
Date: |
Fri, 2 Dec 2005 10:08:48 -0800 |
Hi all, this is my first post to Ncurses help. I'll describe what I
my problem is first, since the solution I have in my head may not work
:) I am using Ubuntu Breezy, BTW.
I am using Lisp, which for me has a console window open already. I
can run ncurses inside this console fine. However, I am using a
VILisp (http://vim.sourceforge.net/scripts/script.php?script_id=221)
pipe tool to funnel text through GNU Readline to the Lisp console, the
text either comes from a file pipe (which VIM writes to) or from
STDIN. Running STDIN through Readline causes all sorts of issues with
ncurses, especially in the raw mode that I want to use (ie, text only
comes through in lines).
So I can either fix the VILisp script (not likely since I know no
Perl, and the author doesn't know how it fix it), or I figure that I
can spawn a new console and use that console for my ncurses
interaction.
After a bit of research, I found
http://cap.anu.edu.au/~wpc/blog/programming/pseudo-terminals.html,
which looks similar to what I want. Looking further it seems that on
Linux I ought to be able to use forkpty() to create a new pseudo
terminal, and the master/slave descriptors. I think that I can then
exec xterm from the newly created child process, passing it the master
FD, and setup the Lisp stdin/stdout to use the slave FD. After all
this setup, can I use ncurses correctly from within my Lisp image and
have the ncurses commands go to the newly spawned xterm?
Please reply directly to me as well as the list - I have subscibed but
I am yet to get a confirm message.
Thanks for your time.
Brad
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ncurses + a newly spawned xterm,
Brad Beveridge <=