Introduction to the hplip Package:
If you own an HP printer(s), you are lucky in my opinion. While not all HP printers are gems, most all of them will work like a champ using the Package hplip, installed by default in openSUSE. And you will most likely later be able to find an ink or laser cartridge for it when you need it. It is very true printer manufacturers sell printers cheep which often come with very little ink in the box and that cartridges are priced high where they make all of their money. This article is not going to correct how the printer manufacturers make their money. However, If you are looking to buy a printer that works with Linux and openSUSE, HP has got to be on your short list.
The Package hplip, now at version 3.12.11 in openSUSE 12.3, includes the following application files (and much more in documentation):
Code:
/usr/bin/hp-align /usr/bin/hp-check /usr/bin/hp-check-plugin /usr/bin/hp-clean /usr/bin/hp-colorcal /usr/bin/hp-config_usb_printer /usr/bin/hp-devicesettings /usr/bin/hp-diagnose_plugin /usr/bin/hp-diagnose_queues /usr/bin/hp-fab /usr/bin/hp-faxsetup /usr/bin/hp-firmware /usr/bin/hp-info /usr/bin/hp-levels /usr/bin/hp-linefeedcal /usr/bin/hp-logcapture /usr/bin/hp-makecopies /usr/bin/hp-makeuri /usr/bin/hp-mkuri /usr/bin/hp-pkservice /usr/bin/hp-plugin /usr/bin/hp-pqdiag /usr/bin/hp-print /usr/bin/hp-printsettings /usr/bin/hp-probe /usr/bin/hp-query /usr/bin/hp-scan /usr/bin/hp-sendfax /usr/bin/hp-setup /usr/bin/hp-systray /usr/bin/hp-systray.wrapper /usr/bin/hp-testpage /usr/bin/hp-timedate /usr/bin/hp-toolbox /usr/bin/hp-uninstall /usr/bin/hp-unload /usr/bin/hp-upgrade /usr/bin/hp-wificonfig
SETUP and INSTALL a New Printer:
1. Now if you have an HP printer, you must use the hp-setup program to install it. Further, you must install the application as root to get it to work. Two quick commands for this to work are:
Code:
For KDE: Alt-F2 and kdesu /usr/bin/hp-setup
Code:
For Gnome: Alt-F2 and gnomesu /usr/bin/hp-setup
Code:
rm ~/bin/hp-icon ; wget -nc http://paste.opensuse.org/view/download/9430700 -O ~/bin/hp-icon ; chmod +x ~/bin/hp-icon ; hp-icon
Let me say up front that in general, hp applications should NOT BE RUN AS ROOT! Root authoroty will be requested when required. For some reason, this does not work out properly for the hp-setup program which is why we need a special exception here for us to use.
3. You may wish to install all required applications to allow the hplip application set to work. This is not done by default. If you intend on installing the very latest version of hplip, you MUST perform the following command function. Open up a terminal session and copy the following commands, paste it into a terminal session and press enter on each:
Code:
su -c "zypper refresh"
Code:
su -c "zypper --non-interactive --no-gpg-checks in --auto-agree-with-licenses cups cups-client cupsddk cups-devel dbus-1-devel python-gobject2 gcc-c++ ghostscript-library openssl libjpeg-devel net-snmp-devel glibc libtool libgphoto2-devel libusb-1_0-devel libusb-1_0-0 make wget python-imaging python-qt4 dbus-1-python-devel dbus-1-python python-devel python-xml libpython2_7-1_0 python-notify python xsane sane-backends-devel sane-backends"
IN ALL CASES you will want to add yourself to the sys and lp user groups and you will want to open two ports in the openSUSE Firewall:
4. Add yourself to the sys and lp user groups. Enter command in terminal. You must log out and back in for this to work:
Code:
su -c "/usr/sbin/usermod -a -G sys,lp $USER"
Code:
#! /bin/bash conffile="/etc/sysconfig/SuSEfirewall2" grep ^FW_SERVICES_ACCEPT_EXT $conffile | grep -q "0/0,udp,,5353" if [ $? -ne 0 ]; then sed -i 's/^FW_SERVICES_ACCEPT_EXT="\(.*\)"/FW_SERVICES_ACCEPT_EXT="0\/0,udp,,5353 \1"/' $conffile fi grep ^FW_SERVICES_ACCEPT_EXT $conffile | grep -q "0/0,udp,,427" if [ $? -ne 0 ]; then sed -i 's/^FW_SERVICES_ACCEPT_EXT="\(.*\)"/FW_SERVICES_ACCEPT_EXT="0\/0,udp,,427 \1"/' $conffile fi systemctl stop SuSEfirewall2.service systemctl start SuSEfirewall2.service exit 0
Code:
chmod +x $HOME/bin/hp-firewall
Code:
sudo hp-firewall
You may wish to check your installation to make sure it is setup correctly. Open up terminal and run the following command:
Code:
/usr/bin/hp-check -t
Code:
/usr/bin/hp-doctor
Code:
file:///usr/share/doc/packages/hplip/index.html
Code:
http://localhost:631
For anyone who wants to install or compile any C or C++ source files, you should take the following steps first:
Open YaST / Software / Software Management - Select the View Button on the top left and pick Patterns. Now, you will see several Patterns listed and you want to select:
Code:
Development [X] Base Development [X] Linux Kernel Development [X] C/C++ Development
If you then feel you need to install the very latest version of the hplip application, here is what you do, all examples here assume version 3.13.7 for the names to work out right. In general, if you stick with the default hplip application version installed by openSUSE, you will avoid some problems I mention below:
1. Get the latest Version of the Application (3.13.7): http://prdownloads.sourceforge.net/h...-3.13.7.tar.gz, (Download to $HOME/Downloads)
2. Open Up Terminal and change to the Downloads folder:
Code:
cd $HOME/Downloads
Code:
tar xvfz hplip-3.13.7.tar.gz
Code:
cd hplip-3.13.7
Code:
./configure --with-hpppddir=/usr/share/cups/model/HP --prefix=/usr --enable-qt4 --disable-libusb01_build --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build
Code:
make
Code:
su -c "make install"
To prevent an update from YaST to hplip, do the following:
YaST / Enter Root User Password / Software / Software Management / enter and search for hplip / right click on each file and select Protected and the use the Accept button on the bottom right:
If you have already replaced the file from an update, but you have not removed the compile folder for the new copy of hplip, you need only change to the folder again and run the install from terminal:
Code:
cd $HOME/Downloads
Code:
cd hplip-3.13.7
Code:
make
Thank You,
Message