Find the answer to your Linux question:
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 24 of 24
CUPS-1.5rc1 pulls in at 139,003,588 bytes fully compiled. The cat FILE > /dev/lp0 technique pulls in at under 1 MB, and that's with all kinds of unnecessary testing cruft, not ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #21
    Linux User
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    416

    CUPS-1.5rc1 pulls in at 139,003,588 bytes fully compiled. The cat FILE > /dev/lp0 technique pulls in at under 1 MB, and that's with all kinds of unnecessary testing cruft, not including the standard utilities it uses. If I had the source code for the rastertosamsungspl filter I use, that would probably add a another MB.

    Many distros have smaller, simpler alternatives for big complex desktops like gnome and kde; why aren't there small simple alternatives to cups? I mean, I know they exist - there's PDQ for a start - but why are they not in common use in distros?
    PDQ is (yet another) abandoned project. Bummer.

    My best guess? I think it has something to do with the reason I do not have the source code for the samsung filter I need to make the hardware work. Why do they not let me at the source code? There's only 1 reason I can think of: Money. Why would they be getting paid to keep the source code for a silly little program secret? Who profits from this?

    Someone should start a database of filters and PPD files for all known printers. www.AntiCUPS.org perhaps. Any volunteers? I don't have a website.

  2. #22
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,234
    No, that's a different thing altogether. Proprietary drivers are common with many types of hardware. I believe it's because manufacturers are afraid that their rivals will reverse-engineer an open-source driver to find out exactly how the device works, then duplicate it. So you would always need to take your final filter from a proprietary package (except for HP and Epson).

    But cups is free software. No-one is going to make a lot of money out of it. And nobody is going to lose money by creating alternatives. So why do distros not provide alternatives in the same way that they provide alternative desktops or media players?
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  3. #23
    Linux User
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    416
    Not to digress here too much, but I'm looking at the strace dump for the command:

    # lp FILE
    Code:
    connect(3, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
    and lp tries to talk to localhost:631 and complains that nobody is listening on that port. It would seem to be a fairly easy thing to set up a very simple server to listen on port 631 and intercept the data, then pipe it to a custom print command. All you need to do is *emulate* a CUPS server in the network interface just enough to convince lp and friends.

  4. $spacer_open
    $spacer_close
  5. #24
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,234
    Quote Originally Posted by Miven View Post
    Not to digress here too much, but I'm looking at the strace dump for the command:

    # lp FILE
    Code:
    connect(3, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
    and lp tries to talk to localhost:631 and complains that nobody is listening on that port. It would seem to be a fairly easy thing to set up a very simple server to listen on port 631 and intercept the data, then pipe it to a custom print command. All you need to do is *emulate* a CUPS server in the network interface just enough to convince lp and friends.
    lp is part of the cups-client package (along with similar commands such as lpadmin and lpstat). But emulating cups in this way is already a much more complicated project than simply catting a rasterised file to /dev/lp0. I got rid of cups-client along with cups. So now "lp" refers to my script and prints directly.

    btw there is a bug in the script as I posted it. The clauses in the cascading conditional structure that determines file type are in the wrong order. You need to move the text line to the end and make it an elif, then change the postscript line to an if.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

Page 3 of 3 FirstFirst 1 2 3

Posting Permissions

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