# Can't do echo "test" > /dev/lp0

## agrypa1

In the struggle to install printer support I came to the point where I know several things. but echoing into /dev/lp0 brings no results.

dmesg | parport shows this:

```
parport: PnPBIOS parport detected.

parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE,EPP]

parport0: faking semi-colon

parport0: Printer, HEWLETT-PACKARD DESKJET 710C

lp0: using parport0 (interrupt-driven).

```

interrupt or polling doesn't matter. I know how to change them in the modules.d/i386

In the BIOS of my amd64 +3000 machine the LPT is set to 378 as ECP DMA=3.

I am asking about echo "test" > /dev/lp0 because cups doesn't want to print anything. In fact I have not been able to use my printer with gentoo at all.

A test page generates this error:

```
ReadClient: 5 GET /printers/DeskJet710C?op=print-test-page HTTP/1.1

D [25/Apr/2005:16:03:20 +0200] CGI /usr/lib/cups/cgi-bin/printers.cgi started - PID = 9890

I [25/Apr/2005:16:03:20 +0200] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=9890)

D [25/Apr/2005:16:03:20 +0200] SendCommand: 5 file=8

D [25/Apr/2005:16:03:20 +0200] AcceptClient: 7 from localhost:631.

D [25/Apr/2005:16:03:20 +0200] ReadClient: 7 POST /printers/DeskJet710C HTTP/1.1

D [25/Apr/2005:16:03:20 +0200] print_job: request file type is application/postscript.

D [25/Apr/2005:16:03:20 +0200] check_quotas: requesting-user-name = 'root'

I [25/Apr/2005:16:03:20 +0200] Denying user "root" access to printer "DeskJet710C"...

D [25/Apr/2005:16:03:20 +0200] Sending error: client-error-not-possible
```

Any ideas?

Agryppa

----------

## adaptr

First of all, when installed, CUPS gives no rights to anybody anywhere to print...

I think it's stupid to say the least, but that's how it works.

You have to edit the cups config by hand to add at least your LAN to be able to print at all, and delete any users if they are present - I've never used user-based access in CUPS and it works fine.

The last two lines of your error make it plain that your CUPS does restrict user access.

Second, if CUPS has total control over the printing system  then you won't be able to circumvent this on the commandline either.

While it does provides the traditional lpr client program, that is still bound to any access restrictions in the config file.

I would first try to su to another user (not root, at any rate) and simply do an

```
echo "printer test you fscker" | lpr
```

----------

## agrypa1

 *adaptr wrote:*   

> 
> 
> Second, if CUPS has total control over the printing system  then you won't be able to circumvent this on the commandline either.
> 
> While it does provides the traditional lpr client program, that is still bound to any access restrictions in the config file.
> ...

 

OK, then. See what happens now:

```

gentoo linux # /etc/init.d/cupsd stop

 * Stopping cupsd...                                                                                               [ ok ]

gentoo linux # echo "test" > /dev/lp0

gentoo linux #
```

The same command from a regular user account say: permission denied. 

Cups was deactivated. Still no printing.

/var/log/messages show no action.

where am I wrong on this?

Agryppa

----------

