Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Parallel port permission denied
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Fri May 28, 2004 9:50 pm    Post subject: Parallel port permission denied Reply with quote

I have the HP Deskjet 660c printer. I have already installed the hpijs driver. When i do:

Code:
root@localhost alex # cat test.txt > /dev/lp0


I recieve this error message:
Code:
bash: /dev/lp0: Permission denied


CUPS doesn't give me parallel port as a device option when I try to add a printer. I don't know what I have done wrong. I have added this printer to various systems (gentoo, redhat, mandrake) without any trouble until now.

(Yes, I have done

Code:
modprobe parport_pc


and
Code:
modprobe parport
)
_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Fri May 28, 2004 9:56 pm    Post subject: Reply with quote

Can you do a
Code:
echo "test" | lp
:?:
Back to top
View user's profile Send private message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Fri May 28, 2004 10:00 pm    Post subject: Reply with quote

papal_authority wrote:
Can you do a
Code:
echo "test" | lp
:?:



This is what I get:
Code:
root@localhost alex # echo "test" | lp
lp: error - scheduler not responding!

_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Fri May 28, 2004 10:04 pm    Post subject: Reply with quote

Very quickly, have you done the following?
Code:

   1. # /etc/init.d/cupsd start
       - start CUPS
 
   2. # /usr/sbin/lpadmin -p hp -m YOUR_MODEL.ppd -v /dev/lp0 -E
       - add your printer (make sure you get your model right)
       NOTE: It *DOES* matter what order you put the commandline options!
 
   3. # /usr/sbin/lpadmin -d hp
       - make printer the default printer (-d option)
 
   4. # echo "Testing" | lp -d hp
       - test it
 
   5. # rc-update add cupsd default /etc/init.d/cupsd

HTH :D
Back to top
View user's profile Send private message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Fri May 28, 2004 10:49 pm    Post subject: Reply with quote

papal_authority wrote:
Very quickly, have you done the following?
Code:

   1. # /etc/init.d/cupsd start
       - start CUPS
 
   2. # /usr/sbin/lpadmin -p hp -m YOUR_MODEL.ppd -v /dev/lp0 -E
       - add your printer (make sure you get your model right)
       NOTE: It *DOES* matter what order you put the commandline options!
 
   3. # /usr/sbin/lpadmin -d hp
       - make printer the default printer (-d option)
 
   4. # echo "Testing" | lp -d hp
       - test it
 
   5. # rc-update add cupsd default /etc/init.d/cupsd

HTH :D


Well, I can't get the printer to work even without CUPS, but here is what happens when i try to do what you said.
Code:

 root@localhost alex # locate *660c*.ppd
/etc/cups/ppd/Deskjet660c.ppd
/etc/cups/ppd/660c.ppd
root@localhost alex #  /usr/sbin/lpadmin -p hp -m Deskjet660c.ppd -v /dev/lp0 -E                                                                               
lpadmin: add-printer (set model) failed: server-error-internal-error
root@localhost alex #  /usr/sbin/lpadmin -p hp -m 660c.ppd -v /dev/lp0 -E lpadmin: add-printer (set model) failed: server-error-internal-error
root@localhost alex # /usr/sbin/lpadmin -d hp
root@localhost alex # echo "Testing" | lp -d hp
lp: unable to print file: server-error-not-accepting-jobs


This kernel error message that I just noticed shows up at boot might be related to my problem:
Code:

can't synthesize input events
/proc/bus/input/devices

_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Fri May 28, 2004 11:04 pm    Post subject: Reply with quote

I think that's a hotplug error. May involve some googling for a solution. I take it that /dev/lp0 does exist. Does lpstat -t give any helpful output?
Back to top
View user's profile Send private message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Fri May 28, 2004 11:21 pm    Post subject: Reply with quote

papal_authority wrote:
I think that's a hotplug error. May involve some googling for a solution. I take it that /dev/lp0 does exist. Does lpstat -t give any helpful output?


This is the output
Code:
root@localhost alex # lpstat -t
scheduler is running
no system default destination


I don't know anything about lp so I don't know the significance of this output. (good?, bad?, indicative of the problem?)
_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sat May 29, 2004 12:21 am    Post subject: Reply with quote

Well that's good. It means that CUPS is running and is ok. It just doesn't like /dev/lp0. What's the file look like (i.e. the output of ls -aFlq /dev/lp0)? The other thing that may help you now that CUPS is running is to point your web browser at http://localhost:631 and click on add printer and follow the prompts. My understanding is that it attempts to auto detect printers. Give it a try. Hope that helps :D
Back to top
View user's profile Send private message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Sat May 29, 2004 1:17 pm    Post subject: Reply with quote

papal_authority wrote:
Well that's good. It means that CUPS is running and is ok. It just doesn't like /dev/lp0. What's the file look like (i.e. the output of ls -aFlq /dev/lp0)? The other thing that may help you now that CUPS is running is to point your web browser at http://localhost:631 and click on add printer and follow the prompts. My understanding is that it attempts to auto detect printers. Give it a try. Hope that helps :D


It seems that there is no /dev/lp0. :(

Code:
root@localhost alex # ls -aFlq /dev/lp0
ls: /dev/lp0: No such file or directory


the cups http config program isn't autodetecting my printer and parallel port isn't in the options for device. (it has always autodetected my printer until now).
_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Sun May 30, 2004 3:29 pm    Post subject: Reply with quote

Does anyone else have any suggestions? I'm kind of stuck finding a resolution to this problem. :cry:
_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum