OK, profiting from the collective wisdom, my gdi printer is set up as raw in CUPS and is now working very nicely with
cat myfile>/dev/usb/lp0
At least as far as printing is concerned, there are some issues with sending it control characters, but that's for later after some more wrestling with it myself.
Problem is, printing in this way only seems to work with root privileges. Why? And what should be done about it? Printing works just fine as a user via CUPS, what is so special about this process that it needs to be su?
I can think of ways of doing it, but would really like to understand what is going on and why before doing any of them.
Cheers,
Peter
Hi,
2009/12/13 Peter Alcibiades palcibiades-first@yahoo.co.uk:
in CUPS and is now working very nicely with
cat myfile>/dev/usb/lp0
Problem is, printing in this way only seems to work with root privileges.
ls -l /dev/usb/lp0
You will probably find that the device node permissions are setup in such a way that your normal user cannot write to this node. Review your security protocols and ammend accordingly.
Srdjan
Hi,
2009/12/13 Srdjan Todorovic todorovic.s@googlemail.com:
2009/12/13 Peter Alcibiades palcibiades-first@yahoo.co.uk:
Problem is, printing in this way only seems to work with root privileges.
ls -l /dev/usb/lp0
You will probably find that the device node permissions are setup in such a way that your normal user cannot write to this node. Review your security protocols and ammend accordingly.
Can you please configure your email client/settings to not create a new thread each time you reply?
Just add your user to the lp group. Or give everyone permissions to write to the node. Or write a print job scheduler that runs as a root daemon with network ability (could hack CUPS scheduler for this) and user access controls? Heh you could even netcat your print job from another machine, suppliying encrypted password in the header.
Srdjan
Peter Alcibiades wrote:
OK, profiting from the collective wisdom, my gdi printer is set up as raw in CUPS and is now working very nicely with
cat myfile>/dev/usb/lp0
I don't get why you are writing to the device and not using something like lp -o raw -d printername myfile
In fact if the printer is configured as a raw device in cups then you can omit the -o raw bit IIRC