LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-01-2005, 12:10 AM   #1
tincat2
Member
 
Registered: Feb 2002
Location: hills of WV
Distribution: slackware
Posts: 227

Rep: Reputation: 30
printer can't connect to localhost


slack 9.1-parallel port printer lp-when i try to print thru lprng, i get

root@orca +507 to lp@localhost
cannot connect to localhost no such file or directory

same thing whenever i try an lpc command
i checked out a similar thread which suggested changing the format of localhost in the hosts file, but no go(even though one is cautioned against having the machine name tied into the 127.0.0.1 address).

thanx as always for any ideas.
 
Old 08-01-2005, 05:40 PM   #2
north49er
Member
 
Registered: Apr 2003
Location: 60.47'N lat
Distribution: fedora 15 x86_64
Posts: 156

Rep: Reputation: 18
If you haven't, uncomment the parallel printer section in /etc/rc.modules, then try again.
 
Old 08-03-2005, 12:37 AM   #3
tincat2
Member
 
Registered: Feb 2002
Location: hills of WV
Distribution: slackware
Posts: 227

Original Poster
Rep: Reputation: 30
thanx for taking some time for this, north49er. i tried your suggestion, but since lp had been running when the problem occurred, i didn't think it would help. the message i keep getting says "make sure the remote host supports the lpd protocol and accepts connections from this host and from non-privileged(>1023) ports". i'm not at all up on ports, etc., so while i suspect that's where the trouble is, i've got to get up to speed on some stuff to work this out. i assume the printer is the "remote", even though it is a "local" printer. if i
"cat foo.txt >> /dev/lp0", the printer kicks on and the data transfer light blinks twice and stops-then nada-apparently a start command reaches the machine but then there is no data (foo.txt) transfer for some reason.
any ideas are appreciated as well as any enlightenment to my ignorance.
 
Old 08-03-2005, 07:51 PM   #4
north49er
Member
 
Registered: Apr 2003
Location: 60.47'N lat
Distribution: fedora 15 x86_64
Posts: 156

Rep: Reputation: 18
It would help if you'd tell us what your setup is. Do you use a gui? Of course it would help to eliminate possible hardware problems first. Did you do a full install of slack 9.1 from an install disk? 9.1 has both the cups and lprng printer drivers, so it's possible you may have them both turned on, which many posters have said that could cause conflict problems. Since you use lprng, I'd go ahead and remove the cups package. In fact, I'd go for a clean printer driver install and remove both the cups and lprng drivers, then install just the lprng package again. Then setup up your printer. It may be possible to set up the printer through the gui, if you use one, else I believe lprng has a tool for that purpose.
 
Old 08-04-2005, 12:47 AM   #5
tincat2
Member
 
Registered: Feb 2002
Location: hills of WV
Distribution: slackware
Posts: 227

Original Poster
Rep: Reputation: 30
this is happening on an old athlon k5 90mhz machine that i use for internet and fooling around. i use the command line frequently as it is easier on the machine, but the gui gets its play as well-fluxbox is reasonably quick: even open office and realplayer do ok. almost everything i install from source, though i don't compile kernels, so i have 2.4.22 which came with 9.1. the install was from a cd, but was not full as i had heard about the lprng-cups thing, so i left cups out as well as gnome and some other stuff i don't need on this machine. i have had a dot matrix printer on this box working under an earlier slack. my current printer is a samsung ml1430 laser. samsung puts out a driver install package for this and i first had it on another machine working perfectly-it quit working on that machine for no discernible reason so i thought i'd try it on this one(orca) because it is such a great printer when it works. i have my suspicions about the lpp(samsung's) driver package, but it did work great for a good while(now that i think about it , possibly until an upgrade to 9.0 or 9.1.). the printer itself may be at fault as it is cheap for a laser printer and whatever electronics it has may be flimsy-it does print out its demo fine, though, and, as i said before, it wakes up when i "cat" to /dev/lp0, but no data seems to get through. that makes me think the lp@localhost may be screwed somehow. i've played with the lpd.perm file and i'm also wondering about the parallel port as lp apparently is tied in with the parport driver which in turn supposedly can have problems with a pnp setup when the bios is not set up with the parallel port as a legacy device. i did what i could to alter the bios to avoid this but so far it's still "make sure the remote understands the lpd protocol-cannot open connection to localhost".
i need to clarify in my head what's the connections here and how are they set up. i may try to print via gs(the 1430 is a gdi printer and i think i can get that out of my gs version) and see what messages i get.
again, i do appreciate your time and thoughts.

Last edited by tincat2; 08-04-2005 at 12:49 AM.
 
Old 08-04-2005, 01:07 PM   #6
north49er
Member
 
Registered: Apr 2003
Location: 60.47'N lat
Distribution: fedora 15 x86_64
Posts: 156

Rep: Reputation: 18
Good old command line days. If I remember correctly, in unix when a printer stopped responding, we stopped the the lp, cleaned out the printer spooler, then restarted it. Perhaps the similar process will help. I'd stop lprng, locate where the print queue is (maybe /var/spooler/lp?), clean it out, them restart lprng. Just a shot in the dark.
 
Old 08-06-2005, 02:35 AM   #7
tincat2
Member
 
Registered: Feb 2002
Location: hills of WV
Distribution: slackware
Posts: 227

Original Poster
Rep: Reputation: 30
i should report that i've got it going, though root only and from the gui only-but i can live with that for now.
two things seem to be involved:
1) i had the name of the machine(orca) tied to 127.0.0.1 address in my hosts file(not sure how that happened unless it was when i was trying to direct connect via Ethernet to my other machine)
2) lpd was not running-which i still have to manually start despite /etc/rc.d/rc.M set to start lprng-i've got to get straight on what's happening there.
i also cleaned out the printer spooler which i think was a good idea to give everything a clean start.
this is a great little text printer and i am more than happy to have it up-now i can get back to stumbling toward my other goals, and thanx, north49er, for your input.
 
Old 08-06-2005, 10:52 AM   #8
north49er
Member
 
Registered: Apr 2003
Location: 60.47'N lat
Distribution: fedora 15 x86_64
Posts: 156

Rep: Reputation: 18
Great to know it's responding. In cups, we need to give all execute permissions so everyone can use it. Try the following: chmod a+x /etc/rc.d/rc.lprng
 
Old 08-06-2005, 11:48 PM   #9
tincat2
Member
 
Registered: Feb 2002
Location: hills of WV
Distribution: slackware
Posts: 227

Original Poster
Rep: Reputation: 30
gotta get some kudos back to you, north49er; chmodding rc.lprng gave me lpd at startup, user printing, and cli printing. i don't know why it never occurred to me to check the permissions; i can only say my mind was not entirely on the project. a little over the shoulder advice can be a good thing. THANKS.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LocalHost:631 - cannot connect sitka Linux - Networking 6 05-30-2005 03:30 PM
Cannot connect to anything on localhost JohnKFT Slackware 17 05-11-2005 02:21 AM
can't connect to localhost acidblue Fedora 0 12-05-2004 07:20 PM
How to connect in localhost for RH8.0? edhan Linux - Newbie 4 09-05-2003 07:01 PM
Can't connect to localhost Brendon Linux - Networking 11 07-30-2002 10:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration