Jetdirect ( 9100 port ) Print Server

Uncategorized Add comments

I have been asked quite a few times on how to do it,
it’s quite simple:

Step 1: Get CUPS!

Arch: pacman -S cups xinetd
Debian: apt-get install cupsys cupsys-bsd

Step 2: Configure Raw Printer!

Cups comes with built-in web console that binds to port 631 on the host in which Cups Server is running, So…

  • IF you are physically in the that computer, just point your browser to http://localhost:631/
  • ELSE you must point your browser to that remote IP and open any firewall protection on that port if required.

Add printer - Local Raw Printer

  1. Add Printer
  2. Name: PrinterName
    ( Fill in name and optional data )
  3. Device: LPT, Serial, USB
    ( Point to where the x printer is connected )
  4. Make: Raw ( Local Raw Printer )
  5. Model: Raw Queue will do
  6. We’re Done !
    ( try root password if prompted or consult your distros help for cups admin defaults )

Step 3: Welcome new Service

You need to modify the “services” file commonly located at “/etc/services”.

Append the two lines below


jetdirect 9100/tcp 9100 # printer

This will let GNU/Linux know that it has a service named “jetdirect” also known as “9100″ and binds to ports 9100 on TCP and 9100 on UDP; You may change these values depending on your setup, for example if you have two printers.

Step 4a: Add service to xinetd.d

You need to create a file with any name you desire in the “xinetd.d” directory commonly located at “/etc/xinetd.d”.

Please remember to rename [PRINTERNAME] with the name of the printer you wish to print to.


service jetdirect
{
socket_type = stream
protocol = tcp
wait = no
user = daemon
group = lp
passenv =
server = /usr/bin/lp
server_args = -d [PRINTERNAME] -o raw
}

Step 4b: Add service to inetd

You need to modify the “inetd.conf” file commonly located at “/etc/inetd.conf”.

Append this line:


9100 stream tcp nowait lp /usr/bin/lp lp -d [PRINTERNAME] -o raw

That’s it, it should work for most of you just fine, any questions just ask, cheers.

One Response to “Jetdirect ( 9100 port ) Print Server”

  1. Dion Blundell Says:

    Worked brilliantly for me.
    Thanks heaps!
    It was just what I needed.

    One critical thin, under Ubuntu, inetd and xinetd are NOT installed, so you need to:
    apt-get install xinetd

    After doing all this and going:
    sudo /etc/init.d/xinetd restart

    all worked, thanks again, Dion.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in