slack 12: trouble printing via lprng - Slackware

This is a discussion on slack 12: trouble printing via lprng - Slackware ; I upgraded from 10.2 to 12.0. My networked Brother HL-5170DN printer used to work fine under 10.2 using lprng and friends (ifhp, a2ps, apsfilter, enscript, etc.). My newly created /etc/printcap follows and is unchanged from that used with slack 10.2: ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: slack 12: trouble printing via lprng

  1. slack 12: trouble printing via lprng

    I upgraded from 10.2 to 12.0. My networked Brother HL-5170DN printer
    used to work fine under 10.2 using lprng and friends (ifhp, a2ps,
    apsfilter, enscript, etc.). My newly created /etc/printcap follows and
    is unchanged from that used with slack 10.2:

    # APS1_BEGINrinter1
    # - don't delete start label for apsfilter printer1
    # - no other printer defines between BEGIN and END LABEL
    rlp|PS;r=600x600;q=medium;c=full;p=letter;m=auto:\
    :lp=:\
    :rm=remlp:\
    :rp=BINARY_P1:\
    :if=/etc/apsfilter/basedir/bin/apsfilter:\
    :sd=/var/spool/lpd/rlp:\
    :lf=/var/spool/lpd/rlp/log:\
    :af=/var/spool/lpd/rlp/acct:\
    :mx#0:\
    :sh:
    # APS1_END - don't delete this


    The test print from apsfilter SETUP prints fine. The test print via
    Brother's web admin utility prints fine. Printing from Thunderbird
    (postscript/default) prints fine, too. Printing from the command line
    or other applications fails to print anything but the following
    (postscript?) error:

    ERROR NAME:
    undefined
    COMMAND:
    untdictstack
    OPERAND STACK:


    The Brother web admin tool shows the message "ignore data". In
    addition, the status.pr contains an apsfilter read error:

    waiting for subserver to exit at 2007-07-31-07:48:36.301 ## A=
    number=0 process=10594
    processing 'dfA592saturn.home.org', size 650, format 'f', IF filter
    'apsfilter' at 2007-07-31-07:48:36.302 ## A=peter@saturn+592 number=592
    process=10595
    IF filter 'apsfilter' filter msg -
    '/etc/apsfilter/basedir/bin/apsfilter: line 1859: read: read error: 0:
    Is a directory' at 2007-07-31-07:48:36.377 ## A=peter@saturn+592
    number=592 process=10595
    IF filter 'apsfilter' filter finished at 2007-07-31-07:48:36.565 ##
    A=peter@saturn+592 number=592 process=10595
    sending job 'peter@saturn+592' to BINARY_P1@remlp at
    2007-07-31-07:48:36.565 ## A=peter@saturn+592 number=592 process=10595
    connecting to 'remlp', attempt 1 at 2007-07-31-07:48:36.565 ##
    A=peter@saturn+592 number=592 process=10595
    connected to 'remlp' at 2007-07-31-07:48:36.661 ## A=peter@saturn+592
    number=592 process=10595
    requesting printer BINARY_P1@remlp at 2007-07-31-07:48:36.661 ##
    A=peter@saturn+592 number=592 process=10595
    sending control file 'cfA592saturn.home.org' to BINARY_P1@remlp at
    2007-07-31-07:48:36.668 ## A=peter@saturn+592 number=592 process=10595
    completed sending 'cfA592saturn.home.org' to BINARY_P1@remlp at
    2007-07-31-07:48:36.676 ## A=peter@saturn+592 number=592 process=10595
    sending data file 'dfA592saturn.home.org' to BINARY_P1@remlp at
    2007-07-31-07:48:36.676 ## A=peter@saturn+592 number=592 process=10595
    completed sending 'dfA592saturn.home.org' to BINARY_P1@remlp at
    2007-07-31-07:48:36.720 ## A=peter@saturn+592 number=592 process=10595
    done job 'peter@saturn+592' transfer to BINARY_P1@remlp at
    2007-07-31-07:48:36.720 ## A=peter@saturn+592 number=592 process=10595
    rlp@saturn.home.org: job 'peter@saturn+592' printed at
    2007-07-31-07:48:36.722 ## A=peter@saturn+592 number=592 process=10594
    job 'peter@saturn+592' saved at 2007-07-31-07:48:36.722 ##
    A=peter@saturn+592 number=592 process=10594

    So it appears that apsfilter (or something it is calling) is dying and
    unfiltered data is being sent to the printer. I don't believe this is a
    slack 12 issue, as I remember seeing something similar years ago. In
    addition, searching google shows that other distribution users have been
    bitten by this problem with no apparent solution.

    I tried using "checkpc -V -f" and reinstalling apsfilter after deleting
    the directories it creates in /var/spool/lpd and /etc, in the hopes that
    any permission problems would be fixed. Nothing seems to work. Perhaps
    /etc/apsfilter/apsfilterrc needs changing, given the font changes in
    slack 12?

    I'd really like to avoid learning cups right now. Any suggestions as to
    what I might be doing wrong are appreciated.

    Thank you,


    Peter

  2. Re: slack 12: trouble printing via lprng

    An update:

    I used aps2file to produce a postscript version of an ascii file and
    debugging output via the apsfilter infrastructure. The debugging output
    did not yield any noticeable errors. I then used gs to load the file
    and I got a similar error "ERROR: /undefined in untdictstack". Upon
    examining the file in vim, I noticed that the two instances of
    untdictstack where prefaced by a CTRL-O. (This occurs if apsfilter is
    using a2ps or enscript as its ASCII_FILTER.) I don't know much about
    postscript, but this doesn't look right.

    I noticed another similar name countdictstack, so I changed untdictstack
    to countdictstack. I could then run "gs test.ps" without getting the
    error. I also could then use gv to display the file; however, it still
    would not print using lpr.


    Any help is appreciated,


    Peter

  3. Re: slack 12: trouble printing via lprng

    I've tracked the problem down to the eval statement within the
    ps_postprocessing function of apsfilter. A quick workaround is to add
    the following line to your /etc/apsfilter/apsfilterc file:

    SKIP_POSTPROCESSING=set

    Since apsfilter and my printer config haven't changed since slack 10.2,
    I'm guessing that the problem may be in the bash 3.1 upgrade of slack 12.0.

    Peter

  4. Re: slack 12: trouble printing via lprng

    It appears that the psset script in a2ps is broken. Thanks to Paul
    Novak for pointing out the solution to this problem.

    Here are some links with more information and a patch:

    http://www.archivum.info/bug-a2ps@gn.../msg00010.html
    http://osdir.com/ml/printing.a2ps.bu.../msg00003.html
    http://bugs.gentoo.org/show_bug.cgi?id=126403
    http://groups.google.com/group/linux...00d86d32d10d0d
    https://bugzilla.redhat.com/show_bug.cgi?id=163780

    Peter

+ Reply to Thread