LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 01-15-2012, 01:03 PM   #1
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
need to suppress nuisance output of xterm -Sccn


I'm attempting to use an xterm to facilitate user I/O for an application via the master side of a pty. I need xterm to use an already-open fd instead of creating a new pty; therefore, I'm using -S. It seems like a sloppy option, but I dup2 the master side of the pty to 0, 1, and 2, then call xterm -S/0. This has the desired effect except that it always prints an (arbitrary?) integer to the destination file descriptor (fd 0, from -S/0,) which then gets picked up as the first line of input at the other end. Is there a different option that would work better, an option that will disable this output, or a different (fairly common) emulator that would work better? Thanks.
Kevin Barry

edit: apparently this is a "feature" (or forgotten debugging output) that gives the window ID of the new xterm. It doesn't seem like it can be redirected, so I might just have to read and discard it from the process on the slave side of the pty.

Last edited by ta0kira; 01-15-2012 at 01:30 PM.
 
Old 01-16-2012, 04:44 AM   #2
dickey
Member
 
Registered: Jun 2009
Posts: 43

Rep: Reputation: 18
yes, xterm sends back the window id first, as part of the pty-handshake.
the multixterm script for example takes this into account.
 
  


Reply

Tags
-s, dup2, forkpty, openpty, xterm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
suppress all output suprstar Linux - Newbie 2 12-05-2011 10:47 AM
how to suppress some of ls's output? BrianK Linux - General 2 03-03-2006 04:16 PM
How to suppress output from reiserfs mount jwezel Linux - Software 5 09-27-2005 02:24 AM
how to send the output to another xterm? abd_bela Programming 2 08-17-2003 01:28 PM
Suppress Iptables' Output mrsolo Linux - Software 1 05-05-2003 09:45 PM


All times are GMT -5. The time now is 12:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration