Professional Web Applications Themes

Printer + Linux = no carriage return - Linux Setup, Configuration & Administration

For years I've had a dot matrix printer (Okidata 92) on my home Linux setup. Nice thing about Linux when it comes to this printer, as far as I'm concerned is that I never had to worry about _configuring_ the thing. But recently I was given a cast-off HP Deskjet 500C that still works with Windows. Under Linux, though, the same text file that printed okay on the Okidata didn't have any carriage returns. That is, the output looked like line 1 line 2 etc. How much work is it going to be to make it print properly? I include ...

  1. #1

    Default Printer + Linux = no carriage return

    For years I've had a dot matrix printer (Okidata 92) on my home
    Linux setup. Nice thing about Linux when it comes to this printer, as
    far as I'm concerned is that I never had to worry about _configuring_
    the thing.

    But recently I was given a cast-off HP Deskjet 500C that still works
    with Windows. Under Linux, though, the same text file that printed
    okay on the Okidata didn't have any carriage returns. That is, the
    output looked like

    line 1
    line 2
    etc.
    How much work is it going to be to make it print properly? I include
    in "work" wading through tons of irrelevant tutorial material -- always a
    danger in the Unix world. My Red Hat 6.0 book assumes the use of
    printtool to install any printer. I think this is a part of Gnome, which
    I don't use. I don't remember whether the Red Hat setup had me select what
    make of printer I wanted to use, and whether I could have only one printer.
    I would like to be able to use either the HP or the Okidata by unplugging
    one and plugging in the other to the same port.
    Charles Guest

  2. #2

    Default Re: Printer + Linux = no carriage return

    org (Charles Packer) writes:

    ]For years I've had a dot matrix printer (Okidata 92) on my home
    ]Linux setup. Nice thing about Linux when it comes to this printer, as
    ]far as I'm concerned is that I never had to worry about _configuring_
    ]the thing.

    ]But recently I was given a cast-off HP Deskjet 500C that still works
    ]with Windows. Under Linux, though, the same text file that printed
    ]okay on the Okidata didn't have any carriage returns. That is, the
    ]output looked like

    ] line 1
    ] line 2
    ] etc.
    ]How much work is it going to be to make it print properly? I include
    ]in "work" wading through tons of irrelevant tutorial material -- always a
    ]danger in the Unix world. My Red Hat 6.0 book assumes the use of
    ]printtool to install any printer. I think this is a part of Gnome, which
    ]I don't use. I don't remember whether the Red Hat setup had me select what
    ]make of printer I wanted to use, and whether I could have only one printer.
    ]I would like to be able to use either the HP or the Okidata by unplugging
    ]one and plugging in the other to the same port.

    Well, on the crucial issues you give us no information. If you are using
    Redhat 6 then it probably uses printtools and lpr and printerfilter.
    Go into /var/spool/lpd/lp and look at the various files there( eg
    textonly.cfg). One will
    probably have a question regarding carriage returns. say yes, instead of
    no or nothing.
    CRLFTRANS=YES
    Bill Guest

  3. #3

    Default Re: Printer + Linux = no carriage return

    Bill Unruh <physics.ubc.ca> wrote: 

    Add a filter on the way to the printer queue or in the printer
    daemon spool itself that adds carriage returns. unix2dos is the usual
    filter. I imagine a simple shell script

    while read line; do
    echo -e "$line"'\r'
    done

    will do as the filter.
     

    Possibly. I wouldn't care. He needs to filter somewhere on the way
    to the printer. On the way in seems to me to be as good a place as in
    the middle.
     

    Peter
    P.T. Guest

  4. #4

    Default Re: Printer + Linux = no carriage return

    On 6 Dec 2003 03:24:22 -0800, org (Charles Packer) wrote:
     

    .... can you describe your *environment* please, such as distro
    and version and print sys you're using: lpd/cups/etc
    ..
    --
    /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\
    \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
    Bacchus, n.: A convenient deity invented by the ancients as
    an excuse for getting drunk. "The Devil's Dictionary"
    mjt Guest

  5. #5

    Default Re: Printer + Linux = no carriage return


    "Charles Packer" <org> wrote in message
    news:google.com... 
    printer. 

    First step: put a bullet through that 6.0 book, and make sure you've updated
    to at least RedHat 7.3 for security reasons.

    Second, most modern versions of Linux have a newer nice configuration tool
    to tell the printer setup "Postscriptize raw text files", or "use DOS-style
    end-of-line instead of UNIX for text", etc. The tool for RedHat 8.0, 9, and
    Fedora is redhat-config-printer. If you prefer using the new "CUPS" style
    printing to the older "lpd" style printing, cups has its own tools.

    Third, I'd suggest not merely plugging and unplugging, but actually
    resetting your default printer when you switch, either by selectinig
    "PRINTER=whatever-you-call-it" in your environment or by using the
    configuration tool to switch the default printer.


    Nico Guest

  6. #6

    Default Re: Printer + Linux = no carriage return

    physics.ubc.ca (Bill Unruh) wrote in message news:<bqsg6v$be2$physics.ubc.ca>... 

    I guess the most crucial bit of information I left out, now that I
    think about it, is that I use the following alias to print to the
    Okidata (via the C-shell): alias print "cat !* > /dev/lp0"
    So I guess I don't even use the print spool daemon or any of the
    other apparatus that Unix provides for printer management. My
    /var/spool/lpd directory is bare, as is my printcap file. Hmm...
    no wonder I never could get the lpr command to work satisfactorily...

    I like the idea of the script filter proposed in Peter Breuer's
    followup. Alternatively, if I knew what to do, I could edit
    printcap, etc. to do whatever printtool does to set up a printer.
    I don't have printtool installed, and I don't want to install it,
    if it it means dragging in all of Gnome.
    Charles Guest

Similar Threads

  1. Carriage Return
    By Barnabas (Barney) Yohannes in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: March 4th, 08:12 PM
  2. carriage return problem?
    By Jason in forum FileMaker
    Replies: 5
    Last Post: January 12th, 02:59 PM
  3. return Carriage access 97
    By AkEEmOdO in forum Microsoft Access
    Replies: 0
    Last Post: July 28th, 03:31 PM
  4. outputting a carriage return
    By Bob pilly in forum PHP Programming
    Replies: 2
    Last Post: July 17th, 03:29 PM
  5. Carriage return in .ini files
    By Doug Wilson in forum Macromedia Director Lingo
    Replies: 0
    Last Post: July 14th, 08:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139