4 Replies Latest reply on Nov 21, 2014 6:37 AM by Intel_Peter

    How to make CUPS a JetDirect/AppSocket print server?


      I have a Gen1 Galileo board and I use a minimal Debian image that I created with debootstrap.

      CUPS package is already setup and running on the Galileo.

      Printer added to cups & set to default. Also installed print driver.

      I am able to print with lp command.


      Here are the steps I've done so far to make CUPS a JetDirect/AppSocket print server:


      1. Add the following line below to /etc/services

      jetdirect 9100/tcp #


      2. Install xinetd through "apt-get install xinetd"


      3. Create the file /etc/xinetd.d/jetdirect with the following contents:


      # Allow applications using the AppSocket / JetDirect protocol to communicate with CUPS.

      service jetdirect


      socket_type = stream

      protocol = tcp

      wait = no

      user = root

      server = /usr/bin/lp

      server_args = -d <MY_CUPS_PRINTER_NAME>

      groups = yes

      disable = no



      4. Restart services:

      service xinetd restart

      service cups restart


      I send the file from another device on port 9100.

      CUPS logs show that it had received the file. Job was completed & sent to the printer.

      However, my printer does not start printing. CUPS logs does not show any error.

      Due to frustration, I disabled the the jetdirect service and stop xinetd daemon, however my printer still does not print as it used to with the lp command.

      To get the printer working back to normal, I need to turn it off then turn it back on then the lp command works.

      Has anyone tried this method? Your help would be very much appreciated. Thank you.

        • 1. Re: How to make CUPS a JetDirect/AppSocket print server?

          Hello Marss,


          I haven't tried this method, but if you check this link maybe you can find useful information, also maybe you could check the printer, there could be some settings that are not correctly set. However if you are able to make it work I invite you to post your results in the community.

          If you have any more doubts regarding the Galileo board, don't hesitate to ask.




          • 2. Re: How to make CUPS a JetDirect/AppSocket print server?

            Thank you for your response. I've confirmed that the problem is with the filter. The document file sent from a client device, received by the CUPS server on the Galileo does not pass through a filter or the printer driver. Therefore, document file has not been translated to printer specific data. Document file is sent directly to the CUPS printer. No error shown in CUPS logs, but the printer could not start printing because it does not understand the data being received. I'd gladly post the result if I ever get this working.

            • 3. Re: How to make CUPS a JetDirect/AppSocket print server?

              Solved this issue by modifying mime.types in /usr/share/cups/mime


              application/postscriptai eps ps string(0,%!) string(0,<04>%!) \
              contains(0,128,<1B>%-12345X) + \
              (contains(0,4096,"LANGUAGE=POSTSCRIPT") \
              contains(0,4096,"LANGUAGE = Postscript") \
              contains(0,4096,"LANGUAGE = PostScript") \
              contains(0,4096,"LANGUAGE = POSTSCRIPT") \
                contains(0,4096,"ENTER LANGUAGE=PDF"))


              You'd notice the last line is different from the original mime.types

              Restart CUPS, then I was able to print.

              1 of 1 people found this helpful
              • 4. Re: How to make CUPS a JetDirect/AppSocket print server?

                Hello Marss,


                It's great you were able to solve your issue, thanks for sharing your results with the community, and as always if you ever have another question, don't hesitate to come back to the community.