Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Leap 15 Unable to print from CLI

  1. #1
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,442

    Default Leap 15 Unable to print from CLI

    All, I have installed a Lexmark printer. Printing using the GUI such as 'Print Test Page',
    or opening a text file in GUI such as Kate prints fine. If I try to print to the same queue
    using the CLI nothing happens.

    Output from CLI:

    user@server:/> lp test.file

    request id is lexb-14 (1 file(s))

    user@server:/>

    Nothing prints.

    user@server:/> lpstat -p -d

    printer lexb is idle. enabled since Fri 12 Oct 2018 04:54:00 PM
    system default destination: lexb

    user@server:/> lp -d lexb test.file
    request id is lexb-15 (1 file(s))

    user@server:/>

    Nothing prints.

    CLI broken, GUI printing fine.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,481
    Blog Entries
    3

    Default Re: Leap 15 Unable to print from CLI

    I don't print much. But it has worked for me from the command line when I have tried (current an HP printer). But I think I used "lpr" rather than "lp" for printing.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,442

    Default Re: Leap 15 Unable to print from CLI

    Quote Originally Posted by nrickert View Post
    I don't print much. But it has worked for me from the command line when I have tried (current an HP printer). But I think I used "lpr" rather than "lp" for printing.
    Same result.

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,264
    Blog Entries
    1

    Default Re: Leap 15 Unable to print from CLI

    Does your text file print successfully if you use a2ps? This utility will process a given text file and convert it to PS before sending it to a default printer.
    Code:
    a2ps test.file
    openSUSE Leap 15.0; KDE Plasma 5

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,264
    Blog Entries
    1

    Default Re: Leap 15 Unable to print from CLI

    Quote Originally Posted by GofBorg View Post
    All, I have installed a Lexmark printer. Printing using the GUI such as 'Print Test Page',
    or opening a text file in GUI such as Kate prints fine. If I try to print to the same queue
    using the CLI nothing happens.

    Output from CLI:

    user@server:/> lp test.file

    request id is lexb-14 (1 file(s))

    user@server:/>

    Nothing prints.
    What MIME-type is reported by the following?
    Code:
    file -i  -b test.file
    This may be of interest...
    https://en.opensuse.org/SDB:Using_Yo...rint_with_CUPS
    In particular, see the section about printing plain text files...
    CUPS default filtering works in general by way of the entries defined in /usr/share/cups/mime/mime.types or /etc/cups/mime.types and /usr/share/cups/mime/mime.convs or /etc/cups/mime.convs. Where appropriate for each printing queue, the *cupsFilter entries in the PPD file are used.
    and also some useful info about MIME types here...
    https://en.opensuse.org/SDB:CUPS_in_a_Nutshell
    Since CUPS 1.3.4 only UTF-8 text is supported (which includes 7-bit ASCII text). Text in the ISO-8859 encodings is no longer supported. The reason is that it is not possible to autodetect the encoding so that CUPS cannot process "plain text" files in arbitrary encodings in a reliable way, see SDBlain Text versus Locale. To print non-UTF-8 text, you must convert it from its encoding to UTF-8 before sending it to the CUPS server. To print an ISO-8859-1 text file, you may use:iconv -f ISO-8859-1 -t UTF-8 filename | lp -d queue
    See "iconv --help" for some information about iconv.
    Printing of PDF or graphics files (JPEG, PNG, etc.) works as before.
    openSUSE Leap 15.0; KDE Plasma 5

  6. #6
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,442

    Default Re: Leap 15 Unable to print from CLI

    I cannot for the life of me understand why this is so complicated???
    Printing with 'lp filename' has been a standard feature on *nix for over 40 years.
    If I vim a test file, save it and try to print it with lp it should darn well do it. Anything
    less is just dumb. You are trying to tell me the latest and greatest OS cannot print a simple text file
    out of the box? Just wow. SUSE has taken a leap alright, right off the deep end.

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,481
    Blog Entries
    3

    Default Re: Leap 15 Unable to print from CLI

    Since you are still having problems, I just tried as a test. I did:
    Code:
    lpr .cshrc
    That's my shell startup file (I use "csh").

    It printed just fine.

    I used that as a test file, because it is just plain text with no fancy encoding.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  8. #8
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,264
    Blog Entries
    1

    Default Re: Leap 15 Unable to print from CLI

    Quote Originally Posted by nrickert View Post
    Since you are still having problems, I just tried as a test. I did:
    Code:
    lpr .cshrc
    That's my shell startup file (I use "csh").

    It printed just fine.

    I used that as a test file, because it is just plain text with no fancy encoding.
    Same here. Again, I’d like to see the output of the command I requested from my previous post re MIME type.
    Last edited by deano_ferrari; 16-Oct-2018 at 18:53.
    openSUSE Leap 15.0; KDE Plasma 5

  9. #9
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,442

    Default Re: Leap 15 Unable to print from CLI

    Quote Originally Posted by deano_ferrari View Post
    Same here. Again, I’d like to see the output of the command I requested from my previous post re MIME type.
    Code:
    user@server:~>file -i -b test
    text/plain; charset=us-ascii
    Just tried it again using 'lpr test', same result.
    If I open the file in something like kwrite I can print it just fine.

  10. #10
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,442

    Default Re: Leap 15 Unable to print from CLI

    Quote Originally Posted by GofBorg View Post
    Code:
    user@server:~>file -i -b test
    text/plain; charset=us-ascii
    Just tried it again using 'lpr test', same result.
    If I open the file in something like kwrite I can print it just fine.
    Also just tried printing the file as root, same result.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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