OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
1k stars 178 forks source link

Add jobs' original hostname indication in the Jobs table #791

Closed StarterCraft closed 5 months ago

StarterCraft commented 11 months ago

I am using a Canon MF4550d MFU. Upon installation on Windows, there are two different drivers I can use: Microsoft IPP Class Driver and Canon MF4550D URFII LT Driver.

The first one, should it be called Microsoft driver for short, reports usernames in HOSTNAME\USERNAME format. But as the standard driver, it only has basic functionality and so I prefer to use the Canon driver.

The other driver (Canon MF4550d URFII LT) reports just the user name. It can be a problem if an user uses the same username on different computers, which often happens on Windows PCs.

This is the reasoning behind the changes I made. It would be great to also add an option to choose whether the hostname should be displayed or not. But my knowledge in C++ doesn't allow me to do that.

zdohnal commented 11 months ago

Sounds reasonable, but I would print the hostname only if we have username (it is not 'Witheld') and the hostname is not localhost. @michaelrsweet WDYT?

StarterCraft commented 11 months ago

Mentioned in the comment in the issue - I would print the hostname only if we have username and if the hostname is not localhost.

This obviously can be done, but I have some questions about the restrictions you make.

John printed Report.rtf at Mon Jan 3 10:30 AM John @ OFFICE3PENTIUM printed Report.rtf at Mon Jan 3 10:31 AM

Additional point of view: some localhost jobs aren't assigned any username at all, they are listed as "anonymous" (e. g. Print test page from Web UI). In the case of test pages this isn't really a problem, but if there is something serious printed from anonymous, it can be frustrating.

StarterCraft commented 11 months ago

Anyway, in case I am wrong with my assumptions, I will make the required change.

michaelrsweet commented 5 months ago

The presence of the hostname (really domainname) in the username field is a Windows-ism and not something that can be consistent. Moreover, the proposed change will just yield the hostname twice.

Don't think we want this, sorry...