• How to configure CUPS printer software on a machine with no GUI -- only

    From Rick Thomas@21:1/5 to All on Wed Jul 24 12:40:01 2024
    What's the best way to install (and configure) the CUPS printer software on a machine that doesn't have any GUI software?

    Specifically, the Marvell OpenRD machines that I have ("client" and "ultimate") only have 500 MB of RAM. So I'm reluctant to install a GUI (though I realize they have a VGA port so it *is* possible to do so) for fear of running out of available RAM.

    I'd like to install CUPS to interface the OpenRDs to my HP laser printer, but I haven't found any way to configure CUPS with only a CLI text console. The recommended way in the CUPS docs is to point a web browser at "localhost:631" but that doesn't work
    if you don't have a web browser on the machine. The way I've done it before involved using the "lynx" browser but that is very difficult and absolutely crazy-making.

    The really best thing would be to connect from some some other, larger machine on the LAN that *does* have a GUI and web browser (for example, my desktop Mac) to the port that appears on the OpenRD as "http://localhost:631". Some of my duck-duck-go-ing
    has produced things that hint this is possible, but didn't give any details.

    But if there's a pure-CLI way to do it, I'd be happy with that, too.

    Can you point me to some documentation that might help?

    Thanks!
    Rick

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael =?utf-8?B?S2rDtnJsaW5n?=@21:1/5 to All on Wed Jul 24 12:50:08 2024
    On 24 Jul 2024 03:09 -0700, from rick.thomas@pobox.com (Rick Thomas):
    I'd like to install CUPS to interface the OpenRDs to my HP laser
    printer, but I haven't found any way to configure CUPS with only a
    CLI text console. The recommended way in the CUPS docs is to point a
    web browser at "localhost:631" but that doesn't work if you don't
    have a web browser on the machine. The way I've done it before
    involved using the "lynx" browser but that is very difficult and
    absolutely crazy-making.

    The really best thing would be to connect from some some other,
    larger machine on the LAN that *does* have a GUI and web browser
    (for example, my desktop Mac) to the port that appears on the OpenRD
    as "http://localhost:631". Some of my duck-duck-go-ing has produced
    things that hint this is possible, but didn't give any details.

    But if there's a pure-CLI way to do it, I'd be happy with that, too.

    Assuming you have SSH access, try stopping any local CUPS instance,
    then:

    $ ssh -L localhost:631:127.0.0.1:631 192.0.2.99

    where 192.0.2.99 is however you connect to it over SSH.

    Then point a local web browser on the host from which you are
    connecting at http://127.0.0.1:631

    You can probably use a different local port (that's the first 631 in
    the argument to -L) but I'm not sure if the CUPS web interface makes
    explicit reference to the port. The 127.0.0.1:631 tuple is where the
    _remote end_ SSH server will forward those packets to, so _that_
    127.0.0.1 refers to the _remote host's_ loopback interface.

    See ssh(1) under -L for details.

    --
    Michael Kjörling 🔗 https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick Thomas@21:1/5 to mick.crane on Thu Jul 25 00:50:01 2024
    On Wed, Jul 24, 2024, at 3:59 AM, mick.crane wrote:
    On 2024-07-24 11:09, Rick Thomas wrote:
    What's the best way to install (and configure) the CUPS printer
    software on a machine that doesn't have any GUI software?

    Specifically, the Marvell OpenRD machines that I have ("client" and
    "ultimate") only have 500 MB of RAM. So I'm reluctant to install a
    GUI (though I realize they have a VGA port so it *is* possible to do
    so) for fear of running out of available RAM.

    I'd like to install CUPS to interface the OpenRDs to my HP laser
    printer, but I haven't found any way to configure CUPS with only a CLI
    text console. The recommended way in the CUPS docs is to point a web
    browser at "localhost:631" but that doesn't work if you don't have a
    web browser on the machine. The way I've done it before involved
    using the "lynx" browser but that is very difficult and absolutely
    crazy-making.

    The really best thing would be to connect from some some other, larger
    machine on the LAN that *does* have a GUI and web browser (for
    example, my desktop Mac) to the port that appears on the OpenRD as
    "http://localhost:631". Some of my duck-duck-go-ing has produced
    things that hint this is possible, but didn't give any details.

    But if there's a pure-CLI way to do it, I'd be happy with that, too.

    Can you point me to some documentation that might help?

    Thanks!
    Rick

    without any desktop it can be set up with lpadmin. I found the hard bit
    was finding out what cups thought the printer was called.

    mick

    Thanks, Mick!
    Do you have any hints on "the hard part" (finding out what CUPS thinks it's called) ?

    Rick

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick Thomas@21:1/5 to Rick Thomas on Thu Jul 25 04:40:02 2024
    On Wed, Jul 24, 2024, at 3:09 AM, Rick Thomas wrote:
    What's the best way to install (and configure) the CUPS printer
    software on a machine that doesn't have any GUI software?

    Specifically, the Marvell OpenRD machines that I have ("client" and "ultimate") only have 500 MB of RAM. So I'm reluctant to install a GUI (though I realize they have a VGA port so it *is* possible to do so)
    for fear of running out of available RAM.

    I'd like to install CUPS to interface the OpenRDs to my HP laser
    printer, but I haven't found any way to configure CUPS with only a CLI
    text console. The recommended way in the CUPS docs is to point a web
    browser at "localhost:631" but that doesn't work if you don't have a
    web browser on the machine. The way I've done it before involved using
    the "lynx" browser but that is very difficult and absolutely
    crazy-making.

    The really best thing would be to connect from some some other, larger machine on the LAN that *does* have a GUI and web browser (for example,
    my desktop Mac) to the port that appears on the OpenRD as "http://localhost:631". Some of my duck-duck-go-ing has produced things
    that hint this is possible, but didn't give any details.

    But if there's a pure-CLI way to do it, I'd be happy with that, too.

    Can you point me to some documentation that might help?

    Thanks!
    Rick

    I finally found a web page that covers what I needed to know:
    https://thelinuxcode.com/cups_print_server_ubuntu/

    Hope it helps others!
    Rick

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick Thomas@21:1/5 to mick.crane on Thu Jul 25 04:50:02 2024
    On Wed, Jul 24, 2024, at 6:22 PM, mick.crane wrote:
    On 2024-07-24 23:32, Rick Thomas wrote:
    On Wed, Jul 24, 2024, at 3:59 AM, mick.crane wrote:
    On 2024-07-24 11:09, Rick Thomas wrote:
    What's the best way to install (and configure) the CUPS printer
    software on a machine that doesn't have any GUI software?

    Specifically, the Marvell OpenRD machines that I have ("client" and
    "ultimate") only have 500 MB of RAM. So I'm reluctant to install a
    GUI (though I realize they have a VGA port so it *is* possible to do
    so) for fear of running out of available RAM.

    I'd like to install CUPS to interface the OpenRDs to my HP laser
    printer, but I haven't found any way to configure CUPS with only a
    CLI
    text console. The recommended way in the CUPS docs is to point a web
    browser at "localhost:631" but that doesn't work if you don't have a
    web browser on the machine. The way I've done it before involved
    using the "lynx" browser but that is very difficult and absolutely
    crazy-making.

    The really best thing would be to connect from some some other,
    larger
    machine on the LAN that *does* have a GUI and web browser (for
    example, my desktop Mac) to the port that appears on the OpenRD as
    "http://localhost:631". Some of my duck-duck-go-ing has produced
    things that hint this is possible, but didn't give any details.

    But if there's a pure-CLI way to do it, I'd be happy with that, too.

    Can you point me to some documentation that might help?

    Thanks!
    Rick

    without any desktop it can be set up with lpadmin. I found the hard
    bit
    was finding out what cups thought the printer was called.

    mick

    Thanks, Mick!
    Do you have any hints on "the hard part" (finding out what CUPS thinks
    it's called) ?

    I can't remember the order of doing things.
    These last few installs the printer automagically works.
    "lpoptions" on the PC with the printer attached reports among other
    things. "printer-uri-supported=ipp://localhost/printers/HP-LaserJet-P2015-Series"
    I think to print I used to be able to type.
    "my_file.txt||lp"
    but seems that's not setup.
    mick

    I've found a solution that works -- (as I posted previously) "https://thelinuxcode.com/cups_print_server_ubuntu/" gives enough of the details to be able to point a browser on my desktop mac at "http://client:631" and do everything I need.

    I'm fairly sure the ssh port forwarding trick would have worked, though I didn't try it because I was already pretty far down the rabbit hole of using a remote browser.

    Big thanks to all who helped!
    Rick)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)