?

Log in

No account? Create an account
CUPS - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

CUPS [Apr. 9th, 2004|12:09 pm]
Brad Fitzpatrick
how the hell do you delete a print job in CUPS?

From the web UI:

client-error-forbidden

From root on the print machine:

itx:~# lpq
officejet is ready and printing
Rank Owner Job File(s) Total Size
active bradfit 326 (stdin) 519168 bytes
1st bradfit 327 (stdin) 38912 bytes

itx:~# lprm 1
lprm: Unable to lprm job(s)!

Same on my machine:

bradfitz@bini:~$ lpq
officejet is ready and printing
Rank Owner Job File(s) Total Size
active bradfit 326 (stdin) 519168 bytes
1st bradfit 327 (stdin) 38912 bytes
bradfitz@bini:~$ lprm 1
lprm: You don't own job ID 1!

Uh, I don't? I printed it from here.

Here's me hoping Project Utopia and its user/task-centric design goes somewhere.
LinkReply

Comments:
From: evan
2004-04-09 12:18 pm (UTC)
lprm 326, maybe?

or just lprm bradfitz.
(Reply) (Thread)
[User Picture]From: brad
2004-04-09 12:28 pm (UTC)
Ah, duh.

But let's step back and assume I'm a user. Why didn't the web UI work? What does CUPS use as its authentication model? Obviously not just the IP of the computer that submitted the job, it'd seem.
(Reply) (Parent) (Thread)
[User Picture]From: mart
2004-04-10 07:07 am (UTC)

When I use the web UI for CUPS, it asks for some HTTP basic auth and then authenticates against the local user list/passwords. If the job was started remotely, only root can delete it. I'm not sure what happens if it's started locally since we rarely do that and the few times I did it the job was over before I had cause to cancel it!

(Reply) (Parent) (Thread)
From: ex_gh232
2004-04-09 12:29 pm (UTC)
Try using cancel(1), it's the standard CUPS command-line tool for deleting jobs.

If you want the web interface to behave, go to a page where you need to authenticate first e.g. the modify printer page then once you've entered your username and password, go back to the jobs list and try removing your job again. Should work this time.

Hope that helps!
(Reply) (Thread)
[User Picture]From: brad
2004-04-09 12:31 pm (UTC)
Thanks for the cancel(1) reference!

I'm still not sure about the web UI... why would I want to give my username and password to my local machine to a remote machine? Spooky.
(Reply) (Parent) (Thread)
From: ex_gh232
2004-04-09 12:37 pm (UTC)
I'm not entirely sure how CUPS works, but this is what I can make out from my own observations:

It uses HTTP authentication, referring to the /etc/passwd file (or whatever your favourite PAM source is) on the machine running cupsd for information. Anybody who's a member of the lpadmin group can modify printer settings.
(Reply) (Parent) (Thread)
From: ex_snej373
2004-04-09 12:37 pm (UTC)
Apparently Eric Raymond was also just complaining about having trouble figuring out the CUPS UI. John Gruber has a great essay/rant in response about how you can't just plop usability on top as an afterthought. (Plus a follow-up.)
(Reply) (Thread)
[User Picture]From: brad
2004-04-09 12:39 pm (UTC)
Yeah, I skimmed all those when they started appearing all over the web.
(Reply) (Parent) (Thread)
[User Picture]From: xaosenkosmos
2004-04-09 11:32 pm (UTC)
Wow, there's something positively insane about ESR, the man who brought us the usability wonder that is .fetchmailrc, complaining about usable interfaces. Definition case plankeye.

And Jens, better than most anybody, knows: if i think it's a bad interface... (waits for the obligatory dorm room mid-80s terminal comment).
(Reply) (Parent) (Thread)
From: ex_snej373
2004-04-10 10:42 am (UTC)
"Unix geeks are the Amish of the computer world."
—Me, 1998
(Reply) (Parent) (Thread)
[User Picture]From: mahlon
2004-04-09 01:57 pm (UTC)
Also, just for the record:

'lprm -'

Deletes any and every current job you have access to.
(Reply) (Thread)