Printer Help Please (Long Reply)

Printer Help Please (Long Reply)

Post by J.M. Pad » Fri, 14 May 1999 04:00:00

Brad <> wrote:
>I want to get my Epson 640 printer working under Linux.  I am not asking
>how to do it. What I am asking is 'what do I read?'.

>I know nothing about setting up a printer under LInux and there are tons
>of man pages, info, etc etc. I dont know where to start.  Could someone
>suggest what I shoud read and in what order I should read it.



Get a copy of the Linux Printing HOWTO and the Linux Printing Usage

The following is a copy of a checklist I developed while struggling to
get my own printer working under linux for the first time using

lpd will not function unless you are configured for tcp/ip, even if
you are not using it to connect to a network or the internet.   For
Slackware look in Disk n5.  lpr is located within tcpip.tgz file now.

        Note:  The following exception has been noted by C.J. Read:
"However there are exceptions, notably the lpd in
(only 70k of tarball too!). I have a laptop with no networking
installed but lpr functions, as does "magicfilter"."

You can make the necessary configuration changes by logging in as
"root" and using the command:
This will prompt you for ENTER HOSTNAME:  pick any name you want to,
but I suggest you use all lowercase.  You will then be asked for
domain, which in your case will be  You should also say yes
to "Only use loopback".

As for /etc/HOSTNAME:


          My linux box is known as trivium and this is the
          only entry in etc/HOSTNAME.  You can name your box anything
you wish.

When you configured your kernel at time of installation, did you say
yes to parallel printer support?  If not, do so when you reinstall.

        I suggest you doublecheck.  I just finished changing from an
old kernel to 2.0.33 and distinctly remembered several entries in my
configuration that did not make it into the .config file.  I am not
sure if it was because of my typing, or whether there is an occasional
problem in the software that causes this problem.  To double check you

                cd /usr/src/linux
                ls -a
                less .config

                        Note: Make sure you use the "." in ".config".

                        There should be an entry under the #character
devices section

        To confirm the identity of the printerport:
                dmesg | more

        This should show something like "lp1 at 0x0378, using polling
                0x378 is /dev/lp1

        Do you actually have a filter in /var/spool/lpd/lp?  If you
don't, you will need to put one there.  If you do, check to see if any
part of it looks wrong.  

        There are some occasions where the printer is actually on what
linux considers to be lp0, instead of lp1.
I suggest you try the following:

        cd /etc
        edit the printcap file with vi or whatever editor you prefer.
        Put a # in front of :lp=dev/lp1:\
        insert a new line:

        Then try to print to see if this changes anything.  If it does
not, then remove the line re lp0 and the # in front of the old line re

        If you are running syslogd, you can look in your logs for
messages from lpd.  If there is one saying it "cannot execv "name of
input filter", your problem is with the filter.
   syslogd messages are available in two files.  You can access them

        As root
        cd /var/log
        less syslog


        As root
        cd /var/adm
        less syslog


          tail -50 /var/adm/syslog
                This will show you the last 50 lines of the syslog.

cat /proc/devices
        Is there a 6lp?  If there is, then lp is loaded.

cat filename > /dev/lp0
        and if that doesn't work, then try /dev/lp1 or /dev/lp2 --
still no
        printer action, then you might have to recompile your kernel.

ps -ax | grep lpd
        If you get something like 48 ? S 0:00 /usr/sbin/lpd, then lpd
is running.

Did you create a spool file? Something like
        mkdir /usr/spool/lpd/some name for your printer

Does it have the right ownership and permissions?  If you do not have
the x (execute permission) nothing will work.
        chown root.daemon /usr/spool/lpd
        chown root.daemon /usr/spool/lpd/some name for your printer
        chmod ug=rwx, o=rx /usr/spool/lpd
        chmod ug=rws, o=rx /usr/spool/lpd/some name for your printer

Did you create the additional files in your spool directory?
        cd /usr/spool/lpd/some name for your printer
        touch .seq errs status lock
        chown root.daemon .seq errs status lock
        chmod ug=rw,o=r .seq errs status lock

        You use "touch" to create files and establish the creation
date for files.  You need all four of the files
(.seq errs status and lock).   The .seq file will contain the job
number counter for lpr to assign.  errs is the place lpd sends errors
for logging.  status is the file that contains messages that will be
reported when you type: lpc stat.  The lock file is used to prevent
lpd from trying to print two files on the same printer at one time.
Do you have these files?  Note the "." in the ".seq" file.  You can
only see it if you use ls -a.  If you do not have these files then
create them with the touch command.                      

Are you using a filter?  Is it properly included in your printcap

Do all the lines (except for the final line) of your printcap file end
with a backslash "\" ?  If any of them, except for the last line, fail
to have a trailing backslash, the process is stopped.

Is there a trailing "ghost" space or tab after any of the "\" which
end the lines of your printcap?  If in typing the printcap entries you
inadvertently hit a spacebar or tab, there will be a "ghost" space or
tab.  You will not be able to see them, but they will cause a failure
in the execution of the printcap at that point.  You can search for
the "ghosts" by :
        vi /etc/printcap

Do not hit the "i" for insert, but move the cursor to the end of each
line in the printcap file by using arrows and
"end".  If there are hidden spaces/tabs the cursor will go beyond the
"\" at the  end of the line.  If there are any spaces there, eliminate
them by using "x".

 I suggest you also try:

        echo $PRINTER

                This will identify what your printer is identified as
within the file /etc/profile.

        If the response does not match your printer, then type:

                PRINTER=lp | export PRINTER


        add a line to the /etc/profile

                cd /export
                vi profile

                hit "i"
                export PRINTER= lp

                hit Shift-:

                type: wq


Is your device initialized?
        try 'ls > /dev/lp0' or 'ls > /dev/lp1'

        Make sure you are root when you do this as only root can
        write directly to the device)

There should be a symbolic link between /usr/spool -> /var/spool
        ln -s /usr/spool /var/spool

        My own printing problems were solved when I downloaded a copy
of apsfilter and installed it.  The apsfilter program took over the
creation of all the necessary entries in printcap and established the
files and dependencies for me.  If you continue to have problems, I
recommend that you try apsfilter.  You can find it at :

  If you are able to successfully print, but at some later date
suddenly find that you begin receiving messages that the lpd daemon is
not present, there may be some printing files that have been left in
the queue that your filter cannot identify.  Delete these files and
then try again.  This may cure the problem.

 "The last temptation is the greatest treason:
  To do the right deed for the wrong reason."
  --T.S. Eliot  


1. still need printer help please please please

hello again.

i'm still having trouble printing from latex and ghostscript to my
9-pin epson compatible.

i can print latex files, but the dvie72 that i use loses all blank vertical
space - double space, margins, etc.

ghostscript -sDEVICE=espon  prints what looks like the correct stuff,
but the spacing is off - both vertical and horizontal, mostly vertical.
it seems to put  extra linefeeds in the middle of lines.

when i display the files to the screen (dvips and gs -sDEVICE=linux), there
is no problem.  

lpr in general works.  i'm not sure what the problem is, but i'd like
to ensure that, when/if i can access a deskjet, the problem will go away.

does anybody have/had similar problems? known fix? sympathy?

thanx in advance.

I'm just a soul whose intentions are good.
Oh, Lord, please don't let me be misunderstood.                   --Nina Simone


3. please please help, printer trouble!!!

4. New kernel keeps closing modem device?

5. please please help, printer trouble

6. int64

7. SAMBA: Long delays accessing Printer Properties when Printer is OFF???

8. Do USB Zip drives work with Linux?

9. Help: Quantum size Please reply

10. sendmail gives no reply address?? please help!

11. Cannot reply...please help