PDA

View Full Version : Knoppix 5.0.1 printing from command line



gizero
11-16-2006, 04:30 PM
Hi all,
I have been googleing a lot around this, but found no solution or valuable hint to understand.
I need to configure and run a printer, using cups, all this from the command line.
I have successfully configured the queue with foomatic-configure (after fixing the database with foomatic-cleanup-drivers), then I use lpr to send a job to the printer. No printing starts! I enabled cups debug verbosity in the logs and figured out I have a problem writing to /var/spool/cups/tmp. This looks coherent with the permission/ownership scheme of /var/spool/cups which is :

drwx--x--- 4 root lpadmin

Since I run the server as user "lp" and group "lpadmin" (I think this is default, but I also tryed to force this setting in /etc/cups/cupsd.conf), when the filter calls "gs" as user "lp" this program is unable to access /var/spool/cups/tmp.

BTW I can succesfully print if I hack /var/spool/cups permission or if I run cupsd as root, but this doesn't sound a good solution so I ask if anyone can tell me the right way to fix it.

I also found a different suggestion for spool dir permission scheme, but I'm not sure if it apply to cups 1.1.23 (the one shipped with my Knoppix 5.0.1) at http://www.linuxprinting.org/error_log-faq.html#q_3_9. This should work for the situation but drwx--x--- is default in knoppix (and even on my Ubuntu 6.06 box). The permission/ownership also seem to be "reset" every time I restart the server, so hacking it sounds again more dirty.

TIA for any suggestion!
Andrea

knoppu
11-19-2006, 11:35 PM
Thanks for posting your progress on this , cups is badly broken in 5.0.1 and it seems like your efforts have gone a long way to finding the problem.

if it helps I have 1.2.5 on a gentoo box and the perms are the same as you posted for knoppix, this seems fairly standard.

If you get any further pls post results. I'm sure a lot of ppl would like to have printing working.

8)

gizero
11-20-2006, 09:47 AM
Thanks for posting your progress on this , cups is badly broken in 5.0.1 and it seems like your efforts have gone a long way to finding the problem.

Thx knoppu for your reply. This post was for probing if I'm struggling with something known or maybe an interesting to solve problem. Since I'm doing a custom remaster where I really need a working printing engine, I'm interested in gathering as much info as possible about this problem. You say cups is broken in 5.0.1. Do you have any resource telling what the problem are to point me to?


if it helps I have 1.2.5 on a gentoo box and the perms are the same as you posted for knoppix, this seems fairly standard.

So this could be a point to start from.


If you get any further pls post results. I'm sure a lot of ppl would like to have printing working.

8)

I'll stay tuned and post any improvement if I get any

Regards,
Andrea

knoppu
11-20-2006, 07:04 PM
http://www.knoppix.net/wiki/Bugs/5.01CD bug 5

this confirms my experience that everything cups related in 5 is broken.

It makes reference to the french forum but that was so damn slow I got tired of waiting 2min on every click and gave up. I saw one post http://forums.knoppix-fr.org/viewtopic.php?id=11422 that says he fixed it but I gave up looking for the thread where he posted about that.

In case you dont speak french you could try googling the forum for his user id and "imprimante" = printer, and get google to translate.

If you find something but cant read it post me a link.

8)

PS

http://forums.knoppix-fr.org/viewtopic.php?id=11328

Lancer Kprinter
Attendre le message d'erreur et repondre OK
Puis dans la fenetre kprinter cliquer sur "Options Système" puis choisir dans l'ascenseur a Gauche "Serveur Cups" et remplacer le contenu du champs Hôte "/var/run/cups/cups.lock" par "localhost"
Et hop !

Seems to be a problem with kprinter but if you boot knoppix to kde maybe it is doing something with this lock file which is enough to block cups command line as well. You should be able to pick the nuts out of that little bit.

HTH

rl60hz
11-30-2006, 07:56 PM
:( I'm new to knoppix and having a problem on printing also, i've red all the answers about printing problems but seems to be too advance already for me. my problem is that my printer was not even detected by the system, i'm using knoppix 5.0.1 and my printer is hp deskjet 3550.I go to control center, click on printers and Error- control center. unable to retreive the printer list, error message received from manager. Connedtion to CUPS server failed.... connection failed. What does this mean? Please help, i'm beggining to love linux and i want to learn more. thanks in advance

rl60hz

ndb
11-30-2006, 08:38 PM
For anyone having problems printing in Knoppix 5.0.1, I had the same problem at first. The following worked for me, and is different from my previous version of knoppix.

K -> knoppix -> configure -> configure printers
Add Printer
Local Printer
appropriate port (parallel port in my case)
I selected the ESP driver for my printer (most of the drivers don't seem to be there).

The missing drivers is what threw me off at first. Please let everyone know if this helps you or not.

rusty
12-01-2006, 02:19 AM
rl60hz, open a root shell and type: cupsd

That should start the printing service, however there are bugs as the other posters here suggest.