Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

Printing on Linux (remote printing)

I have three Linux boxes at my place of work that we are trying to get setup to print. One as the print server and the other two to access that print server.  

I have edited the /etc/printcap file and it looks like this:
##PRINTTOOL3## REMOTE bj200 180x360 letter {} CanonBJ200 Default 1
lp:\
    :sd=/var/spool/lpd/lp:\
    :mx#0:\
    :sh:\
    :rm=lunar:\
    :rp=/var/spool/lpd/lp:\
    :if=/var/spool/lpd/lp/filter:

and entered the appropriate entries in the hosts.lpd file on the print server.  I restart the lpd and try to test a printout to the server and I receive an error -- Connection to lunar down:  ( I notice then that I had not restart the lpd on the server - redid that ).  Now the error I am receiving is [ lunar: lpd: /var/spool/lpd/lp: unknown printer ]  -- What is wrong and can someone please help me out on this situation.
0
bryanjones
Asked:
bryanjones
  • 6
  • 4
  • 2
  • +1
1 Solution
 
ahoffmannCommented:
The posted printcap is from your client, right?
Then you must change the :rp entry to point to the print queue you have specified on the remote print server (see lunar's printcap), for example it should read:

    :rp=bj200:\

You also can remove  :if  'cause filtering will be done on the server.
0
 
bryanjonesAuthor Commented:
This is the printcap file from lunar:

lp:\
     :sd=/var/spool/lpd/lp:\
     :mx#0:\
     :sh:\
     :lp=/dev/lp1:\
     :if=/var/spool/lpd/lp/filter:

So the rp should be equal to what it is set to right now -- and as far as the filtering it should not matter if it is there or not -- I have tried with it both ways and still the same error:

lunar: lpd:  /var/spool/lpd/lp: unknown printer
0
 
ahoffmannCommented:
lunar's printcap sound good, but on the clients you then should have:

    :rp:lp:\
0
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

 
t2ppCommented:
bryanjones - here's an example for you; easily adaptable to your situation. Simply modify the device & filenames as appropiate. Also, you might like to leave a blank in between the ":" and the "\", as this can cause problems. Good luck.
 
On the Server:
# HP DeskJet 550 (Postscript)
psjet550|postscript_inkjet: \
        :lp=/dev/lp1: \
        :sd=/var/spool/lpd/psjet550: \
        :if=/usr/local/bin/psjetfilter550: \
        :mx#0: \
        :sh:

On the Client:
# HP DeskJet 550 (Postscript)
psjet550|postscript_remote_____________bluechip: \
        :lp=/dev/null: \
        :sd=/var/spool/lpd/psjet550: \
        :rm=bluechip: \
        :rp=psjet550: \
        :mx#0: \
        :sh

0
 
bryanjonesAuthor Commented:
Well now I do not receive the error but the printouts are going to the printer -- the command that I use is lpr filename and then I do a check in /var/log/messages and it states that  [ eclipse requests printjob lp ] and then nothing goes to the que nor to the printer.  Why is this and what am I doing wrong.  It seems like the lunar does not get the files to send or nothing ques up.
0
 
bryanjonesAuthor Commented:
Well now I do not receive the error but the printouts are going to the printer -- the command that I use is lpr filename and then I do a check in /var/log/messages and it states that  [ eclipse requests printjob lp ] and then nothing goes to the que nor to the printer.  Why is this and what am I doing wrong.  It seems like the lunar does not get the files to send or nothing ques up.
0
 
bryanjonesAuthor Commented:
When I print something from the eclipse machine I notice that the /var/spool/lpd/lpd.lock file gets a lock pid from startup and then when eclipse ques something up it gets placed in the lpd.lock file allso ie....cfA071eclipse ( correct if I am wrong but this seems to be the que format of a printout but nothing gets qued onto lunar.)
0
 
ahoffmannCommented:
have you exported lunar's /var/spool/lpd ?
0
 
jlmsCommented:
Is you lpd daemon running? Can you print in the machine that has the printer attached?

The sintaxis in the printcap file is very strict and tricky, check the next:

that there are not spaces after the \ at the end of each line.
That the last line finishes with:
That the first character of each line is a tab.

Now, in your clients you NEED the line that says:
      rp=lp:\

rp stands for Remote Printer and it is the name that the printer has in the system that has it physicaly (parallel or serial cable) attached.

  Use the command lpc to check for the status of the queue in both the printer server and the client, this could give you some clues about the problem.

  Check also the permissions and ownership of the directory
/var/spool/lpd/lp
it should be owned by the user "lp" and to make sure it works you can give it permissions 777.

   About the filter, it certainly matters, what about if it routes your output to the /dev/null device? So have a look at it to see if you need it or not. For testing porpouses is better if you delete it and send only text files. Once you get this working then you can concentrate in the working of the filter.
0
 
bryanjonesAuthor Commented:
I have the syntax correct thanks to t2pp - and yes the lpd is running and I am able to print.  My problem is that the remote machines are queing up but not sending to print que to the server.

Once again I am not able to send the ques to the print server.
0
 
t2ppCommented:
A couple of things...  1) can all these boxes ping each other - assuming you're IP?  2) If so, can you ping by name rather that IP address? This will verify that /etc/hosts is ok.  3) Please check that hosts.lpd on the server has all the client's names.  4) As for the daemon, issue *lpc status* command on the server and client to see were it's stuck. and finally 5) check /var/log/messages and /var/log/syslog for any clues.
0
 
ahoffmannCommented:
Again, have you exported your sppol dir on lunar?
0
 
bryanjonesAuthor Commented:
t2pp -- the last response you gave me about the printcap file worked -- I just had lp as the printer name and it would not work then -- after I assigned it a name it was fine.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

  • 6
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now