Professional Web Applications Themes

Printing - Linux Setup, Configuration & Administration

Hello, I print files with "lpr -h". Is there a way to make "-h" the default behaviour? TIA, Prakash...

  1. #1

    Default Printing

    Hello,

    I print files with "lpr -h". Is there a way to make "-h" the default behaviour?

    TIA,

    Prakash

    Prakash Guest

  2. #2

    Default Re: Printing

    Prakash Countcham wrote: 

    Add the line "alias lpr='lpr -h'" (without the double quotes) in your
    ..bashrc file.

    mj Guest

  3. #3

    Default Re: Printing

    mj wrote: 

    Thanks, but some commands and applications don't execute a shell to print.
    Isn't there a config file for lpr ?

    --
    Prakash

    Prakash Guest

  4. #4

    Default Re: Printing

    Prakash Countcham wrote: 
    >
    >
    > Thanks, but some commands and applications don't execute a shell to
    > print. Isn't there a config file for lpr ?
    >[/ref]

    You could instruct these programs to execute -say- lpr2 which is a sh
    script that contains lpr -h.

    RRB Guest

  5. #5

    Default Re: Printing

    Prakash Countcham wrote: 
    >
    >
    > Thanks, but some commands and applications don't execute a shell to
    > print. Isn't there a config file for lpr ?
    >[/ref]

    Actually I think there is, at least for the version which I am using.
    (My version of lpr doesn't have an -h option. It is not doented in
    the lpr manual page and while lpr accepts it, it doesn't seem to do
    anything.)

    If you say,

    strace -e trace=open lpr file_to_be_printed

    you can see which files lpr opens (or tries to). At least on my system
    one of them is .lpoptions. See "man lpoptions" for more.

    mj Guest

  6. #6

    Default Re: Printing

    Prakash Countcham wrote: 

    How about changing your /etc/printcap entry to enable the :sh: ("suppress
    headers") option? See the printcap(5) manpage for details.



    --
    Lew Pitcher

    Master Codewright and JOAT-in-training
    Registered Linux User #112576 (http://counter.li.org/)
    Slackware - Because I know what I'm doing.

    Lew Guest

  7. #7

    Default Re: Printing

    Lew Pitcher wrote: 

    Interesting ! That is what I am looking for (this file was also pointed out
    by the command suggested by mj: "strace -e trace=open lpr <file>"). But this
    option is already in the printcap file (produced by magicfilter) :

    :sd=/var/spool/lpd/printer:rm=printer.host.fr:rp=printer:lpr_bounce:\
    :sh:pw#80:pl#72:px#1440:mx#0:\
    :if=/etc/magicfilter/ps600-filter:\
    :af=/var/log/lp-acct:lf=/var/log/lp-errs:

    Is it a but of lpr ? Should I do a bug report ?

    Thanks for your help !

    Prakash

    Prakash Guest

  8. #8

    Default Re: Printing

    Prakash Countcham wrote: 
    >
    >
    > Interesting ! That is what I am looking for (this file was also pointed
    > out by the command suggested by mj: "strace -e trace=open lpr <file>").
    > But this option is already in the printcap file (produced by magicfilter) :
    >
    > :sd=/var/spool/lpd/printer:rm=printer.host.fr:rp=printer:lpr_bounce:\
    > :sh:pw#80:pl#72:px#1440:mx#0:\
    > :if=/etc/magicfilter/ps600-filter:\
    > :af=/var/log/lp-acct:lf=/var/log/lp-errs:[/ref]

    I think that I see your problem. You're respooling your output to a remote
    printer (printer lpr_bounce at host printer.host.fr ). The :sh: option only
    seems to affect the /local/ printer; remote printers use their own printcap
    (or equivalent) and have their own value for :sh:.

    Can you alter the printcap on remote host printer.host.fr ?
     

    I don't think that this is a bug. IIRC, remote printers handle their own
    :sh: rules, and local printcap changes wont affect remoter printer settings.
    I could be wrong, though, and a check with the lpr developers wouldn't be
    out of order.


    --
    Lew Pitcher, IT Consultant, Application Architecture
    Enterprise Technology Solutions, TD Bank Financial Group

    (Opinions expressed here are my own, not my employer's)

    Lew Guest

  9. #9

    Default Re: Printing

    Lew Pitcher wrote: 

    No I can't :( I sent a mail to my network administrator, but he doesn't
    answer very often.

    Thanks a lot ! Now I (believe I) understand how it works.

    --
    Prakash

    Prakash Guest

Similar Threads

  1. Printing problems - not printing the bullets I have in the doent
    By Jennifer_Butler@adobeforums.com in forum Adobe Indesign Windows
    Replies: 3
    Last Post: August 31st, 07:40 PM
  2. Replies: 0
    Last Post: July 6th, 02:50 PM
  3. Printing Dynamically Insantiated MovieClips (multi-page printing)
    By :: e1 :: webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: February 9th, 08:09 AM
  4. Printing without showing the printing dialog window
    By jkoxvold webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 3
    Last Post: February 5th, 09:38 PM
  5. Printing a external text file or printing a text field cast member...
    By farhaad webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: July 18th, 02:31 AM

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