bugGNU Screen - Bugs: bug #17310, xterm passthru printing rendered...


bug #17310: xterm passthru printing rendered unusable

Submitter:  None
Submitted:  Thu 03 Aug 2006 11:47:18 PM UTC
Category:  Feature Request Severity:  2 - Minor
Priority:  * 2 Status:  Need Investigation
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  4.0.2
Fixed Release:  None Planned Release:  Later
Work Required:  2 - Weeks
* Mandatory Fields

Add a New Comment Rich Markup

  Spam posted by anonymous
Thu 03 Aug 2006 11:47:18 PM UTC, original submission:  


screen 4.0.2 running on debian 3.1/i386 ("remote side"); xterm version 209 on ubuntu 6.06/amd64 and xterm version 211 on openbsd 4.0-snapshot/i386 ("local side").

i'm trying to get xterm passthru printing to work from under screen. without screen, it works perfectly on both setups detailed above; with screen, it does not work on either setups.

printing is done simply with the following filter on the remote side:

printf "\033[5i"
printf "\033[4i"

the xterms have their relevant resources set as

*XTerm*printerCommand: /usr/bin/lpr
*XTerm*printerFormFeed: false
*XTerm*printerAutoClose: true

as said, without screen being involved, things happen as expected (the terminal is put in media copy mode, stuff is sent over, terminal is taken out of media copy mode; on the local side the printer command is started, stuff is piped into it, then the pipe is closed and printout comes out the printer. in the case when the printer command is set to a script that simply cats input to a file, one "job" sent over appears in one file as expected).

with screen involved, it gets subtly strange.

on the remote side, everything appears normal (printer filter script starts, puts the terminal into media copy mode, cats the input, takes terminal out of media copy mode; nothing of the input is seen on the terminal).

anything below 255 bytes come over, but the printer command pipe is never closed. if i exit from xterm, the pipe gets closed and the input gets printed.

anything over 255 bytes come over in 255-byte chunks, with the symptom that on the xterm side looks like:

for each full chunk:
  open printer command pipe
  put chunk in the pipe
  close pipe properly
open printer command pipe
put the part-chunk in the pipe
sometimes close the pipe properly, sometimes do not (i have not been able to find any pattern)

this boils down to everything > 255 bytes being printed onto a number of pages each having approximately 255 (give or take some because of cr/lf conversions) octets of input.

apart from slicing at the mentioned 255-byte chunks, there also appears to be slicing at 4096-byte chunks as well, in a way that
"if the current position is either n*255 or n*4096 bytes from the beginning of the input, cut and start a new slice".

this effectively renders xterm passthru printing unusable from under screen.

if you need anything else to know, try or test, just ask.




(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by micahcowan (Updated the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-06-23 micahcowan CategoryNone Feature Request
        ReleaseNone 4.0.2
        Planned ReleaseNone Later
    2008-06-15 micahcowan Priority5 - Normal 2
        StatusNone Need Investigation
        Work RequiredNone 2 - Weeks
    2008-06-13 micahcowan Severity3 - Normal 2 - Minor

    Back to the top

    Powered by Savane 3.12