[Printing-architecture] Ubuntu Natty the first distribution which does automatic download of binary printer driver packages

Till Kamppeter till.kamppeter at gmail.com
Mon Jan 24 15:00:23 PST 2011


I have talked with Martin Pitt about the problem of missing Proxy 
support in system-config-printer and Jockey. He will look into this.

    Till

On 01/21/2011 03:36 AM, yuji.saito at avasys.jp wrote:
> Hello, Till, Martin.
>
> On Fri, 2011-01-07 at 01:20 +0100, Till Kamppeter wrote:
>> Hi,
>>
>> Ubuntu Natty (11.04, to be released end of April) will be the first
>> Linux distribution which automatically downloads binary printer driver
>> packages from manufacturers via OpenPrinting.
>
> Thank you for achieving automatic download.
>
> I checked in my home, and it works perfectly. I could read driver's
> license, and I could select one from 2 drivers for 1 printer.
>
> But I tried it in my company, it had a problem and didn't work. It was
> because of proxy. Result of my quick analysis, it could work if the
> following 3 points are changed.
>
> 1. In system-config-printer (package:
> python-cupshelpers_1.2.3+20100723-0ubuntu13)
>     system-config-printer accesses to OpenPrinting.org. But it did't
>     read "http_proxy". I tried like below, and it could work.
>
>     (Caution! It is just example. I think proxy information should be
>      acquired from "http_proxy" environment variable.)
> ========================================================================
> --- /usr/share/pyshared/cupshelpers/openprinting.py.ORG	2011-01-04
> 23:39:02.000000000 +0900
> +++ /usr/share/pyshared/cupshelpers/openprinting.py	2011-01-20
> 09:58:58.000000000 +0900
> @@ -59,8 +59,9 @@
>           # Send request
>           result = None
>           status = 1
> +        myproxies = {'http': 'http://proxy.example.com:port'}
>           try:
> -            conn = urllib.urlopen(self.url);
> +            conn = urllib.urlopen(self.url, proxies=myproxies);
>               status = conn.getcode();
>               if (status == 200):
>                   result = conn.read()
> ========================================================================
>
> 2. In jockey (package: jockey-common_0.8-0ubuntu3)
>     Jockey seems to acquire the public key from driver's fingerprint.
>     But gpg command in jockey didn't read "http_proxy".
>     I tried like below, and it could work.
>
>     (Caution! It is just example. I think proxy information should be
>      acquired from "http_proxy" environment variable.)
> ========================================================================
> --- /usr/share/pyshared/jockey/oslib.py.ORG	2011-01-20 03:57:54.000000000
> +0900
> +++ /usr/share/pyshared/jockey/oslib.py	2011-01-20 13:32:36.000000000 +0900
> @@ -436,7 +436,9 @@
>               # the fingerprint
>               gpg = subprocess.Popen(['gpg', '--homedir', gpghome,
>                   '--no-default-keyring', '--primary-keyring',
> default_keyring,
> -                '--keyserver', self.gpg_key_server, '--recv-key', keyid],
> +                '--keyserver', self.gpg_key_server,
> +                '--keyserver-options', 'http-proxy=http://proxy.example.com:
> port',
> +                '--recv-key', keyid],
>                   stdout=subprocess.PIPE, stderr=subprocess.PIPE,
>                   env={'PATH': os.environ.get('PATH', '')})
>               (out, err) = gpg.communicate()
> ========================================================================
>     And, in addition, I think it might be better that gpg uses http access
>     to port 80 instead of hkp access by default, considering the users in
>     the enterprise or the organization.
>
> 3. In apt-get
>     [System]-[Preferences]-[Network Proxy] (gnome-network-properties)
>     doesn't set proxy for apt, so jockey can't download the driver. Ubuntu
>     10.10 or older, gnome-network-properties could set proxy for apt.
>     I created file like below, and jockey could download the driver.
> ========================================================================
> # cat<<EOF>  /etc/apt/apt.conf
> Acquire::http::Proxy "http://proxy.example.com:port";
> EOF
> ========================================================================
>
> Best regards.
>
> Saito
>



More information about the Printing-architecture mailing list