Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
The problem: Can't get a second networked printer to print via cups.
System Manufacturer Compaq Presario 061
System Model DK214A-ABA S4020WM NA210
System Type X86-based PC
Processor x86 Family 6 Model 8 Stepping 1 AuthenticAMD ~1998 Mhz
BIOS Version/Date Phoenix Technologies, LTD 3.07, 5/5/2003
SMBIOS Version 2.2
Debian Linux Etch (not released to stable at the time of writing) upgraded from Sarge.
Cups 1.2.5 and supporting packages. Currently making a HP laserjet 4si function correctly.
Cups is NOT acting as a print server.
HP laserjet is set as default printer, and connected via Ethernet.
BEH is installed to handle printer off line situations.
The second printer is a Brother MFC5440CN. It is connected via Ethernet. I installed it some months ago and it printed a test page fine at that time, but I didn't use till the other day when I tried to print a page on it because I needed it to be color but couldn't get it to print.
I downloaded the lprdriver file and cupswraper file for this printer from the Brother site. I have uninstalled the drivers and redownloaded and reinstalled them with no change. I did install the lprdriver before the cupswraper as per the instructions. I did have to create a symlink to get the cupswraper to install. I did notice that the deb packages are made via alien, and I know that some packages made that way are not usable. A possible cause?
Cups reports that the print jobs are successful. I have looked at the error-log file but I must not be able to see what the problem is. I have played with the URL and am using socket://192.168.x.x:9100 I have tried a couple of others that I thought might work from reading different web pages. I suspect that my trouble lies along this line somewhere. The HP uses the socket url that is why I am trying that one. I tried a url for a somba setup (which I do have installed but don't use) and one for a Ubuntu distro but they didn't work either. The somba setup exited with a a 404 error for the pdd file but still claimed that the file printed.
Brother dosen't give much help if you are connecting via a network. I haven't been able to find much info for connecting via a network either unless you are setting up a print server which I don't need. I already have one printer accessed this way but can't seam to access the second one. I can ping the static IP I assigned to it, and It prints just fine from winduz. That only leaves something in my setup in cups or with my driver setup.
Like I said I set the url for the Brother just like the one for the HP except for the static ip which is different for each printer. Both printers are connected via Ethernet. Both work from winduz. Do I need to use a different port? Haven't seen that as an instruction anywhere, but?
At this point I am at a loss. I have spent most of the day trying to solve this problem. I have looked through the cups docs and manpages and this site and didn't find anything that seamed relevent to my problem. Your help is appreciated.
I did look at that info but not from that page. I don't believe it's an ip problem. I checked the ip from the control panel on the printer and it is set to the static ip assigned by the router and I can ping it. I have questioned Brother about the proper url to use in my case but have not herd back from them. I did notice on their site that some of the dirvers are reported to not work with debian 3.0, I don't know what version number Etch may have, it wasn't readially stated on their site. My printer was not listed with those but it does cause me to wonder.
I have just cleaned out my system. Ramoved 90 odd residual config files and a whole bunch of orphan files, and dummy/transitional packages. I am going to uninstall cups and the drivers next. Then fully update the system (hope it don't break) then reinstall the packages.
How long do you figure befor they finally release Etch to stable? I might wait a wile because there may be a few fixes to some things that might solve my problems. I supect I have a system problem because I compiled wine the other day and got a corrupt package. I may have a stray memory problem (at least my wife says so) too. Memtest86 dosen't report any bad memory though. Let it run about 9 hours.
Instructions from Brother in response to my post to them.
Regarding the issue, *would you try the following instractions?
This problem is caused by the differences of lpadmin functions between
To solve the problem, please uninstall, edit and re-install the package.
1. Uninstall cupswrapper
1-1. Comment out lines which include "lpadmin" from
1-2. Uninstall cupswrapper
dpkg -r cuprwrapperXXXX
dpkg --purge cupswrapperXXXX
2. Modify the package
2-1.Unpack the package
dpkg --unpack cupswrapperXXXX.x.x.x-x.dpkg
2-2.Open /usr/local/Brother/cupswrapper/cupswrapperXXXXX to edit.
2-3.Look for the line with "lpadmin -p XXXXXX -E -v .......".
2-4.Change "-m" to "-P" in the line
2-5.Add the file-path of the PPD file written in the line.
the file path = "/usr/share/cups/model/"
How do I make the brscan2 package fully install? When I try to uninstall it in kpackage I get an error 100 with several files that it cant find. How do I make kpackage and synaptic stop reporting it as installed or broken when it is not there?
After I updated my system as much as I could (can't get the Etch lines in my sources.list to work only the ones that point to testing) brscan2 seamed to be full of files again so I tried to uninstall again with the same results. In order to be able to use kpackage or synaptic I have to reinstall brscan2 fro the downloaded deb package. Why can't I uninstall it?
Electro I looked at that page some time ago. I did check and I can't find any trace of the script they talk about on my system. of course I may not be looking in the right place. I am running Etch. Also I am not familiar with how to change a deb package.
I don't have any such file as /var/lib/dpkg/info/cupswrapperXXXX.prerm or /var/lib/dpkg/info/cupswrepperXXXX.postinst as Brother says I should have. No I have not unistalled again yet. I do have both a cupsys.prerm and a cupsys. postinst in that directory though. The .prerm doesn't have any reference to lpadmin in it. The .postinst has several references to lpadmin in it. I am not sure that I should mess with this file though.
How do I determine that I do in fact have lpadmin on this box? I have looked for a package but kpackage can't find any such package. Is it buried in some other package? The references to lpadmin in cupsys.postinst (some not commented out) tell me I do have it. How can I be sure?
Many thanks to everyone who has or will read this thread, those who have helped me and those that have been helped by my problem. There is no greater honor.
To give you an update:
I was having trouble getting part of the scanner driver to complete the uninstall which is in another post. To quickly relate the solution the uninstall script was trying to delete a couple of folders twice. to work around that problem I just put a couple of dummy files in the folders so the script would return a warning about nonempty folders and not try to delete them. Then after the script finished all I had to do was manually remove the folders and files.
So now that I have all the remnants of the driver gone it is time to start the install process again. I have discovered two thing that I think I need to address.
When looking at Brother's driver download page, which has some instruction on it, and reading through them more carefully than the first time I noticed line 4, the last one, which states
To use this driver, you must ensure that the LPR printing system is installed and running on your Linux distribution.
After looking I find that I do not have this installed. The other printer I have is running only on cups. If I install this is it going to break something? Any gotchas?
I already have too many things that are broke, or at least not working the way I know they can. I don't want to create more problems for myself by installing this, especially if it is going to make it so I can't print at all. The HP prints duplex and is laser, so it saves paper and is cheaper. And it was free.
Thanks Electro, although I had looked at the link you posted I looked once again... well you know the proverbially snake. At the bottom of their page is
The cupswrapper from printer contains a script in csh "#! /bin/csh", which not runs per default with most Linux distros. Try to change in deb/rpm to "#! /bin/sh" or to run in csh terminal. Better solution is to use option --nodeps "rpm -ihv --nodeps MFC5440CNlpr-1.0.2-1.i386.rpm". I recommend to use this option for scanner driver too.
I am not sure what all this means. I do remember reading somewhere that this driver package needed csh to install. It was not installed so I installed it. I am not familiar with rpm at all. I get the -–nodeps. I am assuming the --i is install and the --v is verbose. The -h is?
I don't get this either: “Try to change in deb/rpm to "#! /bin/sh"” Am I missing something? What good is a deb or rpm if you have to tear it open and change things to get it to install? Why not just give the source?
Try installing rpm2tgz and extract the script. The script will make a ppd file for you and it will place the ppd file in cups model directory. Read through the script before running the script to find out where it places and executes files.
deb and rpm files are just install/upgrade/uninstall package files. Gentoo has such files named tbz2 files, but I rarely use or make these files. Normally, I tell emerge to configure, compile, install, and uninstall the desire programs. For my printer, Brother HL-5140, there was a ppd pre-made on linuxprinting.org site, so I just use that file with CUPS and GIMP.
I agree that using Laser printers are cheaper than ink-jet printers. Other people disagree.
Well Ladies and Gentlemen I do believe I have finally found something.
After carefully reading the Brother install pages I came to the conclusion that LPD didn't need to be installed if you are going to use cups. They say to ignore the errors for some printers and to put in a symlink for others. I also had to install the cupswrapper by the instructions they emailed me or the install script wouldn't install the pdd file.
I decided to ignore the stuff at the bottom of the other page described in my last post . I think the language needs to be clarified by someone who really understands what they are trying to say.
Anyway I finished the install and tried to print with the same results. So I renamed the error log file and restarted cups and I found this in the new error log (29 pages) after telling cups to print a testpage.
D [09/Jan/2007:19:58:49 -0500] [CGI] Starting at file position 0...
D [09/Jan/2007:19:58:49 -0500] [CGI] Returning at file position 614 on EOF...
D [09/Jan/2007:19:58:50 -0500] [Job 245] ESP Ghostscript 815.03: Unrecoverable error, exit code 1
D [09/Jan/2007:19:58:50 -0500] [Job 245] Error: error occurred at print phase !!
D [09/Jan/2007:19:58:50 -0500] [Job 245] Read 2 bytes of print data...
D [09/Jan/2007:19:58:50 -0500] [Job 245] Wrote 2 bytes of print data...
D [09/Jan/2007:19:58:50 -0500] [Job 245] *** glibc detected *** free(): invalid pointer: 0xa7e63020 ***
D [09/Jan/2007:19:58:50 -0500] [Job 245] /usr/local/Brother/lpd/filterMFC5440CN: line 42: 14790 Done eval cat $INPUT_TEMP
D [09/Jan/2007:19:58:50 -0500] [Job 245] 14792 Done(1) | $PSCONV $PSCONV_OP
D [09/Jan/2007:19:58:50 -0500] [Job 245] 14793 Aborted | $BRCONV $BRCONV_OP
D [09/Jan/2007:19:58:50 -0500] PID 13901 (/usr/lib/cups/filter/brlpdwrapperMFC5440CN) exited with no errors.
There are several lines like this but I am not sure if they are important.
D [09/Jan/2007:19:59:00 -0500] cupsdAuthorize: username="root"
D [09/Jan/2007:19:59:00 -0500] cupsdSendError: 13 code=304 (Not Modified)
So now the question is what do I do about it. Fixing invalid pointers sounds way over my head unless I can install a new package to fix it.
I have the same problem here. MFC5840CN (almost the same printer).
Trying to tamper with the filter file to see if there was anything wrong.
Both gs-esp and gs-gnu (changing the symlink of /usr/bin/gs) barfed with the same invalid pointer.
On ubuntu 6.06 I had no problem printing.(libc6 2.3.x; cups 1.2.2)
After upgrading to 6.10 it stopped working.(libc6 2.4.x; cups 1.2.4; no invalid pointer in debug log of cups error_log)
On my debian machines it gave the same invalid pointer error. (libc6 2.3.6; cups 1.2.7)
Sorry that i'm not of any real help; just thought I'd let you know you're not alone.
By the way to give you some assurance:
It worked for me for a while on ubuntu 6.06 with setting:
So no socket there... well... I think.
Otherwise I have no clue on how this should be taken on.
I dont think it is a problem with the filters or postscript like brother is telling me. I have not been able to get the printer to print even from the command line.
List of thing I have tried.
# lpr -P MFC5440CN /etc/fstab gives no results
# lpstat -p
printer HPlaserjet4si is idle. enabled since Tue 26 Dec 2006 09:41:01 AM EST
printer MFC5440CN is idle. enabled since Wed 10 Jan 2007 04:45:06 PM EST
# lpstat -v
device for HPlaserjet4si: socket://192.168.0.15:9100
device for MFC5440CN: socket://192.168.0.16:9100
entered don't have results
lpadmin -p MFC5440CN -E -v beh:/0/2/3/socket://192.168.0.16:9100
HPlaserjet4si is ready
lprm: No active jobs on Hplaserjet4si!
nothing is set in the client.conf
# Sample client configuration file for the Common UNIX Printing System
every line is comented out.
maybe a default printer issue?
# lpq MFC5440CN
HPlaserjet4si is ready
# lpc status MFC5440CN
printer is on device 'socket' speed -1
queuing is enabled
printing is enabled
# lpq -PMFC5440CN
MFC5440CN is ready
# lpr -PMFC5440CN /etc/fstab no output
DATE 01/11/2007 computer reboot
Modified the MFC5440CN entry in /etc/printcap from
to look just like the entry for the HP laserjet
print to brother mfc5440
# cat /etc/fstab | telnet 192.168.1.16 9100
telnet: Unable to connect to remote host: Connection timed out
# ping 192.168.0.16
PING 192.168.0.16 (192.168.0.16) 56(84) bytes of data.
64 bytes from 192.168.0.16: icmp_seq=1 ttl=60 time=6.31 ms
64 bytes from 192.168.0.16: icmp_seq=2 ttl=60 time=1.99 ms
64 bytes from 192.168.0.16: icmp_seq=3 ttl=60 time=2.00 ms
64 bytes from 192.168.0.16: icmp_seq=4 ttl=60 time=2.01 ms
64 bytes from 192.168.0.16: icmp_seq=5 ttl=60 time=2.00 ms
--- 192.168.0.16 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 1.999/2.866/6.310/1.722 ms
print to HP laserjet
# cat /etc/fstab | telnet 192.168.1.15 9100
telnet: Unable to connect to remote host: Connection timed out
I am able to ping this printer also like the one above.
# lpinfo -v
Have been considering uninstalling the whole printing system and starting from scratch. Not sure what all I need to remove to get everything out of the system though. Now the HP laserjet 4si is not working right in that it will only print one page at a time. I have had to start booting to that other os just to get thing printed. I am beginning to feal like Aunt Tillie http://catb.org/~esr/writings/cups-horror.html If that other os didn't crash all the time on this machine I would put Etch on the shelf.
A week or a week and a half ago, I did use Brother's ppd file for my printer (HL-5140) just for fun. I first had to edit the script because the script was meant to be used for Redhat, Redhat like distributions, and Suse although I could just create a symbolic link in /etc/init.d that points from cupsys to cupsd. The wrapper file (brlpdwrapperHL5140) copied itself to /usr/lib/cups/filter and the ppd file (brhl5140_cups.ppd) got copied to /usr/share/cups/model/. I added a printer through the web interface that CUPS provided and used brhl5140_cups.ppd as the ppd file. It almost worked because it produced errors that it can not find the wrapper file in /usr/libexec/cups/filter/. Dah! there was not a wrapper in there, so I created a symbolic link that points to /usr/lib/cups/filter/brlpdwrapperHL5140. After I made the symbolic link, it printed just fine. The quality is worst than using hl1250 ppd file from linuxprinting.org. I deleted the printer and used hl1250 instead.
I do not use lpd to print. I just use CUPS. Though lpd is harder to setup than CUPS.
I also shared the printer too using IPP or through http. I used CUPS to shared the printer and SAMBA to share the drivers from a directory, but I do not have Point 'n Click setup in SAMBA. I tried setting up Point 'n Click but it was too stubborn to add the driver to its database even though I typed the syntax correctly.
It does help to set the default printer when using two or more printers.
Conclusion, CUPS is very easy to setup through its web interface. Also it provides status to any computer on the network and these computers can print to http://[IP_address_to_CUPS_Server]:631/printers/[printer_name] with out any trouble, but only if they have the postscript drivers from CUPS, Windows, or Adobe. Some manufactures likes to throw curve balls such as Brother that makes setting up CUPS a chore even though it was fun to test my Linux skills. I recommend searching linuxprinting.org to find out what printer works best with their own ppd version. The ppd file from linuxprinting.org or CUPS produces equal or better quality print outs than Windows or Mac drivers have provided.
BTW, I am using Gentoo. CUPS version is 1.26 and I installed the ESP drivers.
Took a look and yes, it seems to work.
But our problem isn't with setting it up.
I had it working on ubuntu 6.06. I'm not to good with names so I'm not sure what its name is.
I upgraded to 6.10 and cannot get it to work.
Cups error messages are not the same as on Debian testing/unstable.
You see GPL Ghostscript; the same was happening with ESP Ghostscript. I just changed the /usr/bin/gs-symlink to see if it would change anything.
Cups goes on to process the job to the printer. You can see it lighting up "receiving" and settling down as the printjob has finished and no data is comming while there is none because of the above error.
I'm not able to pinpoint the origin of this problem. That is why I'm not able to give you a solution.
I hope I have a ubuntu 6.06 install on my pc and retry to have some comparison in installed versions.
Hoping to hear soon from Brother support in order to get this worked out.
If I know you will know
Some little comments:
I found this hint in some printer howto.
try to use nmap:
nmap -v -A <ip-address-of-printer>
Interesting ports on 192.168.123.109:
Not shown: 1693 closed ports
PORT STATE SERVICE VERSION
21/tcp open ftp Brother printer ftpd 1.11
23/tcp open telnet Brother printer telnetd
515/tcp open printer
9100/tcp open jetdirect?
Service Info: Device: printer