Re: Page size (was Re: New printer administration tool design for comments)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 10, 2006 at 01:14:48PM +0100, Nicolas Mailhot wrote:

> Ok, but here you are triggering queue creation manually from the shell
> with (I suppose) every locale-related environment variables set correctly.
> Will it be the case for hotplug-triggered creations ? (it seems not to be
> the case today)

Today we are using system-config-printer to do this stuff, and while
it ought to get it right, in some cases apparently it doesn't.

Just using CUPS on its own:

[root@gene ~]# export LC_ALL=en_US.UTF-8
[root@gene ~]# unset LANG
[root@gene ~]# grep LANG /etc/sysconfig/i18n
LANG="en_GB.UTF-8"
[root@gene ~]# locale LC_PAPER
279
216
UTF-8

(i.e. Letter)

[root@gene ~]# lpadmin -x test
lpadmin: delete-printer failed: client-error-not-found
[root@gene ~]# zgrep DefaultPageSize
/usr/share/cups/model/deskjet.ppd.gz
*DefaultPageSize: Letter
[root@gene ~]# lpadmin -p test -m deskjet.ppd.gz
[root@gene ~]# grep DefaultPageSize /etc/cups/ppd/test.ppd
*DefaultPageSize: A4

The CUPS daemon uses the system locale (i.e. the locale it was started
in).

FWIW, CUPS uses some fairly simplistic rules:

    if (!DefaultLanguage ||
        !strcasecmp(DefaultLanguage, "C") ||
        !strcasecmp(DefaultLanguage, "POSIX") ||
        !strcasecmp(DefaultLanguage, "en") ||
        !strncasecmp(DefaultLanguage, "en_US", 5) ||
        !strncasecmp(DefaultLanguage, "en_CA", 5) ||
        !strncasecmp(DefaultLanguage, "fr_CA", 5))

I'm sure it could be persuaded to use the equivalent of 'locale
LC_PAPER' first, and if that doesn't work fall back to the above
method.

Tim.
*/

Attachment: pgp9KNsvfwIxm.pgp
Description: PGP signature


[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux