Re: Controlling an Xterm from a C++ Program

From: Chuck Dillon (cdillon_at_nimblegen.com)
Date: 09/30/03


Date: Tue, 30 Sep 2003 08:54:21 -0500

Dennis wrote:

> Hi,
>
> As the subject states, is it possible to control an xterm running on a
> linux/unix desktop from another standalone program? For example, suppose I
> have program running inside an xterm on the desktop. From another
> piece of software I would like to be able to control when that xterm
> pops up or is minimized (iconified). I would guess that I would need to capture the
> PID of the xterm at startup, and then maybe send a signal telling it
> to popup/popdown? Is something like this possible? Or maybe someone
> has a another suggestion.
>
> Thanks in advance for any guidance.
>
> Dennis

Of course it depends on what all you need to control. But two
approaches are...

1) Given the pty that the xterm is using another program can direct
escapce sequences to it.

B) Given the X window id of the xterm another program can initiate
iconify and open state changes via X11 calls.

But you have to devise a way to get the pty or window id of the xterm.

-- ced

-- 
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.


Relevant Pages

  • Re: Key Mapping
    ... putty isn't xterm. ... Modifiers which send extra parameters include control, alt, shift. ... Before this feature, xterm would generally send the same string, ignoring ...
    (comp.editors)
  • Controlling an Xterm from a C++ Program
    ... is it possible to control an xterm running on a ... linux/unix desktop from another standalone program? ... have program running inside an xterm on the desktop. ...
    (comp.unix.programmer)
  • emacs behave differently in xterm
    ... to use it in xterm but the keyboard behave differently in xterm. ... (control - left mouse button -> select Meta Send Escape). ... Emacs do not recognize C-tab (it is recognized as tab - as if I ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Controlling an Xterm from a C++ Program
    ... > the xterm directly without running a separate program in them. ... can run several executables. ... Right now it can control their ... all spit out their logs in the same run window. ...
    (comp.unix.programmer)
  • Re: Controlling an Xterm from a C++ Program
    ... > linux/unix desktop from another standalone program? ... > have program running inside an xterm on the desktop. ... > piece of software I would like to be able to control when that xterm ...
    (comp.unix.programmer)