hp-systray doesn't like printer with hyphen/dash in name

Bug #237477 reported by Mark Purcell
4
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Medium
Unassigned
hplip (Debian)
Fix Released
Unknown

Bug Description

From: Arthur Marsh <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: hplip: hp-systray doesn't like printer with hyphen/dash in name
(ie "HP-K5300")
Date: Sat, 31 May 2008 20:36:59 +0930

Package: hplip
Version: 2.8.4-1
Severity: normal

After setting up a new HP Officejet Pro K5300 with share name "HP-K5300"
without the quotes, the device manager in hp-systray shows the printer
with a red circle with cross in it and the message "ERROR: Device not
found. Please check connection and power-on device."

I tried setting up a new printer in the device manager but it would not
allow me to specify a name with a hyphen or dash character "-" in it.

As I have tediously set up some MS-Windows machines to use the share
name HP-K5300 and they all print successfully, I do *not* want to have
to rename the share to be able to use the device manager in hp-systray.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.25 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages hplip depends on:
ii adduser 3.107 add and remove users and groups
ii coreutils 6.10-6 The GNU core utilities
ii cupsys 1.3.7-5 Common UNIX Printing System(tm) -
ii hplip-data 2.8.4-1 HP Linux Printing and Imaging - da
ii libc6 2.7-11 GNU C Library: Shared libraries
ii libcupsys2 1.3.7-5 Common UNIX Printing System(tm) -
ii libdbus-1-3 1.2.1-2 simple interprocess messaging syst
ii libjpeg62 6b-14 The Independent JPEG Group's JPEG
ii libsane 1.0.19-10 API library for scanners
ii libsnmp15 5.4.1~dfsg-7.1 SNMP (Simple Network Management Pr
ii libssl0.9.8 0.9.8g-10.1 SSL shared libraries
ii libusb-0.1-4 2:0.1.12-11 userspace USB programming library
ii lsb-base 3.2-12 Linux Standard Base 3.2 init scrip
ii python 2.5.2-1 An interactive high-level object-o
ii python-dbus 0.82.4-2 simple interprocess messaging syst
ii python-imaging 1.1.6-2 Python Imaging Library
ii python-support 0.8.1 automated rebuilding support for P

Versions of packages hplip recommends:
ii cupsys-client 1.3.7-5 Common UNIX Printing System(tm) -
ii hpijs 2.8.4+2.8.4-1 HP Linux Printing and Imaging - gs
ii hpijs-ppds 2.8.4+2.8.4-1 HP Linux Printing and Imaging - HP
ii hplip-gui 2.8.4-1 HP Linux Printing and Imaging - GU
ii openprinting-ppds 20080211-2 OpenPrinting printer support - Pos

-- no debconf information

Message #10 received at <email address hidden> (full text, mbox):
From: Mark Purcell <email address hidden>
To: Arthur Marsh <email address hidden>
Cc: Debian Bug Tracking System <email address hidden>
Subject: Re: hplip: hp-systray doesn't like printer with hyphen/dash in name (ie "HP-K5300")
Date: Wed, 4 Jun 2008 08:16:51 +1000

[Message part 1 (text/plain, inline)]
On Sat, 31 May 2008, Arthur Marsh wrote:
> After setting up a new HP Officejet Pro K5300 with share name "HP-K5300"
> without the quotes, the device manager in hp-systray shows the printer
> with a red circle with cross in it and the message "ERROR: Device not
> found. Please check connection and power-on device."
>
> I tried setting up a new printer in the device manager but it would not
> allow me to specify a name with a hyphen or dash character "-" in it.

Arthur,

Thanks for the report. There are a lot of issues with using non en_US
locales, which could also be effecting you:

> Kernel: Linux 2.6.25 (SMP w/1 CPU core; PREEMPT)
> Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash

Your report looks very similar to this one:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470201

Can you try LC_ALL=C?

https://bugs.launchpad.net/hplip/+bug/162196 may also be relevant.

Also could I ask you to run `hp-check -r` and report the results.

Thanks,
Mark

[signature.asc (application/pgp-signature, inline)]

Message #15 received at <email address hidden> (full text, mbox):
From: Arthur Marsh <email address hidden>
To: Mark Purcell <email address hidden>
Cc: Debian Bug Tracking System <email address hidden>
Subject: Re: hplip: hp-systray doesn't like printer with hyphen/dash in name
  (ie "HP-K5300")
Date: Wed, 04 Jun 2008 09:06:12 +0930

Mark Purcell wrote, on 04/06/08 07:46:
> On Sat, 31 May 2008, Arthur Marsh wrote:
>> After setting up a new HP Officejet Pro K5300 with share name "HP-K5300"
>> without the quotes, the device manager in hp-systray shows the printer
>> with a red circle with cross in it and the message "ERROR: Device not
>> found. Please check connection and power-on device."
>>
>> I tried setting up a new printer in the device manager but it would not
>> allow me to specify a name with a hyphen or dash character "-" in it.
>
> Arthur,
>
> Thanks for the report. There are a lot of issues with using non en_US
> locales, which could also be effecting you:
>
>> Kernel: Linux 2.6.25 (SMP w/1 CPU core; PREEMPT)
>> Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
>> Shell: /bin/sh linked to /bin/bash
>
> Your report looks very similar to this one:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470201

Yes, I had no success finding where the hyphen character '-' was being
prevented from being used in printer names. When the problem is fixed,
will the changelog indicate WHERE such a block was in the source?

>
> Can you try LC_ALL=C?
>
> https://bugs.launchpad.net/hplip/+bug/162196 may also be relevant.

This was the report from hp-toolbox run from the command line:

amarsh04@victoria:/usr/src/apt/archives$ hp-systray

HP Linux Imaging and Printing System (ver. 2.8.5)
System Tray Status Service ver. 0.1

Copyright (c) 2001-8 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

QSettings: failed to open file '/etc/qt3/qt_plugins_3.3rc'

### Note /etc/qt3/qt_plugins_3.3rc exists but is not readable by users:
#
# $ ls -al /etc/qt3/qt_plugins_3.3rc
# -rw-r----- 1 root root 1051 May 31 20:21 /etc/qt3/qt_plugins_3.3rc
### (mentioned in Debian bug report #484037)

HP Linux Imaging and Printing System (ver. 2.8.5)
HP Device Manager ver. 14.0

Copyright (c) 2001-8 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

QSettings: failed to open file '/etc/qt3/qt_plugins_3.3rc'
ERROR:dbus.proxies:Introspect error on :1.2:/com/hplip/StatusService:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did
not receive a reply. Possible causes include: the remote application did
not send a reply, the message bus security policy blocked the reply, the
reply timeout expired, or the network connection was broken.
error: Unable to communicate with device (code=12):
hp:/usb/Officejet_Pro_K5300?serial=MY742380S7
warning: Device not found
amarsh04@victoria:/usr/src/apt/archives$ locale
LANG=en_AU.UTF-8
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

>
> Also could I ask you to run `hp-check -r` and report the results.

While hp-systray was run with C locale above, I did the following in
another terminal window:

amarsh04@victoria:~$ export LC_ALL=C
amarsh04@victoria:~$ hp-check -r

HP Linux Imaging and Printing System (ver. 2.8.5)
Dependency/Version Check Utility ver. 14.0

Copyright (c) 2001-8 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before
compiling the
HPLIP supplied tarball (.tar.gz or .run) to determine if the proper
dependencies
are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied
tarball
has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode
will check both of the above cases (both compile- and run-time
dependencies).

Saving output in log file: hp-check.log

Initializing. Please wait...
warning: Invalid ppd_dir value: None

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux victoria 2.6.25 #1 SMP PREEMPT Sat May 31 16:33:53 CST 2008 i686
GNU/Linux

Distribution:
debian 4.0r3

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.5.2 installed

Checking PyQt version...
OK, version 3.17 installed.

Checking SIP version...
error: SIP not installed or version not found.

###
#
# I don't understand this message about SIP as python-sip is not listed
 # as a dependancy of hplip and anyway I have the following installed:
#
# ii python-sip4 4.7.4-1
                  # Python/C++ bindings generator runtime librar
# ii python-sip4-dev 4.7.4-1
                  # Python/C++ bindings generator development fi
# ii sip4 4.7.4-1
                  # Python/C++ bindings generator
#
#
###

Checking for CUPS...
Status: scheduler is running
Version: 1.3.7
error_log is set to level: warn
note: For troubleshooting printing issues, it is best to have the CUPS
'LogLevel'
note: set to 'debug'. To set the LogLevel to debug, edit the file
/etc/cups/cupsd.conf (as root),
note: and change the line near the top of the file that begins with
'LogLevel' to read:
note: LogLevel debug
note: Save the file and then restart CUPS (see your OS/distro docs on
how to restart CUPS).
note: Now, when you print, helpful debug information will be saved to
the file:
note: /var/log/cups/error_log
note: You can monitor this file by running this command in a console/shell:
note: tail -f /var/log/cups/error_log

Checking for dbus/python-dbus...
dbus daemon is running.
python-dbus version: 0.82.4

------------------------
| RUNTIME DEPENDENCIES |
------------------------

Checking for dependency: cups - Common Unix Printing System...
OK, found.

Checking for dependency: cups-ddk - CUPS driver development kit...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language
interpreter and previewer...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for
commandline scanning with hp-scan)...
OK, found.

Checking for dependency: ppdev - Parallel port support kernel module....
OK, found.

Checking for dependency: PyQt - Qt interface for Python...
OK, found.

Checking for dependency: python-ctypes - A foreign function library for
Python...
OK, found.

Checking for dependency: python-dbus - Python bindings for dbus...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax
functionality...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some
HPLIP functionality may not function properly.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some
HPLIP functionality may not function properly.

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 2.8.5 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hpssd]
# Note: hpssd does not support dynamic ports
# Port 2207 is the IANA assigned port for hpssd
port=2207

[hplip]
version=2.8.5

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hpijs/HP
ppdbase=/usr/share/ppd/hpijs
doc=/usr/share/doc/hplip-doc/HTML
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
internal-tag=2.8.5.23

-------------------------------
| DISCOVERED PARALLEL DEVICES |
-------------------------------

No devices found.

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

[non-HP printers removed]

HP-K5300
--------
Type: Printer
Installed in HPLIP?: Yes, using the hp: CUPS backend.
Device URI: hp:/usb/Officejet_Pro_K5300?serial=MY742380S7
PPD: /etc/cups/ppd/HP-K5300.ppd
PPD Description: HP OfficeJet Pro K5300 Foomatic/hpijs, hpijs 2.8.4.2 -
HPLIP 2.8.4
Printer status: printer HP-K5300 is idle. enabled since Tue Jun 3
18:20:58 2008
ERROR:dbus.proxies:Introspect error on :1.2:/com/hplip/StatusService:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did
not receive a reply. Possible causes include: the remote application did
not send a reply, the message bus security policy blocked the reply, the
reply timeout expired, or the network connection was broken.
error: Unable to communicate with device (code=12):
hp:/usb/Officejet_Pro_K5300?serial=MY742380S7
error: Device not found

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
error: Not found. SANE backend 'hpaio' NOT properly setup (needs to be
added to /etc/sane.d/dll.conf).

Checking output of 'scanimage -L'...
error: scanimage not found.

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.

-----------------
| USB I/O SETUP |
-----------------

Checking for permissions of USB attached printers...

-----------
| SUMMARY |
-----------

error: 7 errors and/or warnings.

Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html

Done.
amarsh04@victoria:~$ locale
LANG=en_AU.UTF-8
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

Regards,

Arthur.

Changed in hplip:
status: Unknown → New
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

To be clear--the printer prints correctly. The printer does not print when using the hplip backend and sharing to windows systems?

A

Revision history for this message
Mark Purcell (msp) wrote :

I suspect this report is the same bug as well.

From: Andrey <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: hplip: hp-setup: Dialog should allow user input any characters in printer name textbox
Date: Mon, 10 Mar 2008 00:15:54 +0300

Package: hplip
Version: 2.7.10-5
Severity: minor
File: /usr/bin/hp-toolbox

When adding printer, user cannot directly input "-" character in
printer name textbox. If this is an idiotic disfunctionality feature,
than it *must* be removed *as soon as possible*.

The thing is anyone can still have "-" in printer name, even by means
of this particular dialog (by using Ctrl-C/Ctrl-V magick for
instance). I did so and got perfectly legal printer name
"LaserJet-1018", which works with no problem.

Please, do not inflict pain on users.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (1000, 'testing'), (200, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-486
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages hplip depends on:
ii adduser 3.105 add and remove users and groups
ii coreutils 5.97-5.3 The GNU core utilities
ii cupsys 1.3.5-1+b1 Common UNIX Printing System(tm) -
ii hplip-data 2.7.10-5 HP Linux Printing and Imaging - da
ii libc6 2.7-6 GNU C Library: Shared libraries
ii libcupsys2 1.3.5-1+b1 Common UNIX Printing System(tm) -
ii libjpeg62 6b-14 The Independent JPEG Group's JPEG
ii libsane 1.0.19-1 API library for scanners
ii libsnmp15 5.4.1~dfsg-6 SNMP (Simple Network Management Pr
ii libssl0.9.8 0.9.8g-4 SSL shared libraries
ii libusb-0.1-4 2:0.1.12-9 userspace USB programming library
ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip
ii python 2.4.4-6 An interactive high-level object-o
ii python-support 0.7.6 automated rebuilding support for p

Versions of packages hplip recommends:
ii cupsys-client 1.3.5-1+b1 Common UNIX Printing System(tm) -
ii hpijs 2.7.10+2.7.10-5 HP Linux Printing and Imaging - gs
ii hpijs-ppds 2.7.10+2.7.10-5 HP Linux Printing and Imaging - HP
ii hplip-gui 2.7.10-5 HP Linux Printing and Imaging - GU
pn openprinting-ppds <none> (no description available)
pn python-reportlab <none> (no description available)

-- no debconf information

Changed in hplip:
status: New → Confirmed
Changed in hplip:
status: New → Triaged
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

This will be fixed in a future release of HPLIP.

Per cups.org: CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#".

http://www.cups.org/documentation.php/man-lpadmin.html

Aaron

Changed in hplip:
assignee: nobody → Aaron Albright (kalosaurusrex)
importance: Undecided → Medium
status: Triaged → Fix Committed
Changed in hplip:
status: Fix Committed → Fix Released
Changed in hplip (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.