| Server IP : 209.205.66.10 / Your IP : 216.73.216.173 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 User : ( 1006) PHP Version : 8.5.8 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/hplip/__pycache__/ |
Upload File : |
o
�K0j� � @ s� d Z dZdZdZddlZddlZddlT ddlmZm Z m
Z
mZ ddlm
Z
d Zd
Zd?dd
�Zd@dd�Zdd� Zedddfde dddfe je je je je jddde jdde dd
fe je jdddd e dd!d
fd"gZe
jeee eeefdddd#� Zejd$d%d&gd
d'�\Z Z!Z"Z#Z$Z%d(e&j' Z(ej)�*e(�r�ze�+e(� W n e,y� Y nw e-�.e(� e-�/e-j0� zddl1Z1dd)l1m2Z2m3Z3 W n e4y� e-�5d*� d
ZY nw dZzej6d Z7W n e8y� dZ7Y nw e-�9d+e7 � e:e7�d,k r�e� e�;� z�e7�re�<e7�\Z!Z=Z>e!�se-�?d-� e�;d� e-�9d.e! � e�@e!�ZAeA�r*eA�Bd/eC�eCk�r4e-�?d0� e�;d,� dZ"e&jDZDdZEd1e!v �rSe� �rNee!e"eFeDeEd� ne-�?d2� eA�Bd3eG�ZHeHeGk�r�e
�I� ZJeJ�K� ZLeLe
jMk�rre-�Nd4� neLe
jOk�r~e-�Nd5� ne-�Nd6� eLe
jMk�r�e� �r�ee!e"ePeDeEd7� ne-�?d8� eA�Bd9d
�ZQeQ�r�d:e7 ZRe-�NeR� e �SeR�\ZTZUeTdk�r�e-�9d;e! � ne-�5d<e! � W n eV�y� e-�?d=� Y nw e-�9d>� dS )Az1.2zHP device config using USBzhp-config_usb_printerz�Udev invokes this tool. Tool detects the plugin, Smart Install (C/DVD-ROM) issues and notifies to logged-in user. Tool also downloads firmware to the device.� N)�*)�device�utils�module�services)�
pluginhandlerzcom.hplip.StatusServiceF� c C s` t dkrd S t�d� | ||||||g}t�dtd�}|j|ddi� t� �|� t�d� d S )NFzsend_message() entered�/�Event� signature�ssisisszsend_message() returning) �DBUS_AVIALABLE�log�debug�lowlevel�
SignalMessage�DBUS_SERVICE�append� SystemBus�send_message) �
device_uri�printer_name�
event_code�username�job_id�title� pipe_name�args�msg� r �&/usr/share/hplip/config_usb_printer.pyr + s
r �textc C s t �t| ttt� t�d� d S )Nr )r �format_text�USAGE� __title__�__mod__�__version__�sys�exit)�typr r r �usage9 s r* c C sx t dkrdS d} t�d�\}}|du r/t�� dkrt�d� nt�d� t� � t�d�\}}|dkr:d} t�
d� | S )NFz
hp-systrayr z@ hp-systray must be running.
Run 'hp-systray &' in a terminal. zStarting hp-systray serviceTzhp-systray service is running
)r
r �Is_Process_Running�os�getuidr �error�infor �run_systrayr )�Systray_Is_Running�status�outputr r r �
start_systray? s
r4 �nameTz$Usage: %s [OPTIONS] [USB bus:device]�summary)z[USB bus:device]r �headingF)zUSB bus:device :zx"xxx:yyy" where 'xxx' is the USB bus and 'yyy' is the USB device. (Note: The ':' and all leading zeros must be present.)�optionF)r z3Use the 'lsusb' command to obtain this information.r8 FzUSB, IDs specified:z$%s 001:002�example)z-1. Using 'lsusb' to obtain USB IDs: (example)r �noteF)z
$ lsusbr r: F)z9 Bus 003 Device 011: ID 03f0:c202 Hewlett-Packardr r: Fz $ %s 003:011r: )zn (Note: You may have to run 'lsusb' from /sbin or another location. Use '$ locate lsusb' to determine this.)r r: T)�run_as_root_ok�quiet�ghz time-out=ztimeout=)�handle_device_printerz%s/hplip_config_usb_printer.log)r r zFailed to Import DBUS zparam=%s� zThis is not a valid devicez
Setting up device: %s
zsupport-typezUnsupported printer model.�SMART_INSTALL_ENABLEDz�SMART INSTALL (CD/DVD-ROM) is enabled in the system. Refer http://hplipopensource.com/hplip-web/index.html for more information.�pluginz"Device Plugin is already installedzHP Device Plug-in is not foundz>HP Device Plug-in version mismatch or some files are corrupted�
AutoConfigzVHP Device plugin's are not installed. Please install plugin's using hp-plugin command.zfw-downloadzhp-firmware -y3 -s %szFirmware downloaded to %s z(Failed to download firmware to %s devicez User exitzDone.)r )r! )Wr&