LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-22-2014, 05:26 PM   #16
tb75252
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by kikinovak View Post
I think there's some misunderstanding. I already built the most recent HPLIP and made a Slackware package out of it. Download it, install it and use it. Nothing more to do. Check out the links in my post above.
Yes, I definitely will try your hplip package. Thanks again for taking the time to build that.

I was just commenting on posting #12 to bassmadrigal. I just don't understand what is being conveyed with that post. That's all.
 
Old 10-22-2014, 10:16 PM   #17
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 919

Rep: Reputation: 509Reputation: 509Reputation: 509Reputation: 509Reputation: 509Reputation: 509
Quote:
Originally Posted by bassmadrigal View Post
What he meant is you can take the slackbuild that Pat has provided for Slackware and modify the version in it so it matches the one you need.
Hello bassmadrigal, that's it
The hplip Slackbuild is 'version free' since the version isn't hard coded.
I don't apply those patches and don't change the configure options, but my
printer is old. For a new one I think kikinovak's package is better solution.


Quote:
Originally Posted by kikinovak View Post
There have been quite many obstacles recently, like a complete change of staff at my editor's and a suggested change to an Ubuntu base, but now the book is holding a steady course.
Hello Niki, a little bit of market pressure?
 
Old 10-22-2014, 10:18 PM   #18
tb75252
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kikinovak View Post
I can spare you the hassle of building it from source. According to Murphy's Law, I often have to deal with very recent HP printers supported by HPLIP, but a more recent version than the one shipping with Slackware. This just happened a couple weeks ago, and I had to upgrade HPLIP to the next minor version bump.

After reading your post, I decided to build the latest HPLIP and put it in my MLED repo.

32-bit:

Code:
Wed Oct 22 15:55:08 CEST 2014
ap/hplip-3.14.10-i486-1_microlinux.txz: Upgraded.
Following a request by user tb75252 on LQ.
+--------------------------+
64-bit:

Code:
Wed Oct 22 15:55:08 CEST 2014
ap/hplip-3.14.10-x86_64-1_microlinux.txz: Upgraded.
Following a request by user tb75252 on LQ.
+--------------------------+
The repos are here:

http://www.microlinux.fr/slackware

Look in the desktop-base-14.1-$ARCH/slackware{64}/ap/ subdirectory corresponding to your architecture. Download the package and then install it:

Code:
# upgradepkg --reinstall --install-new hplip-3.14.10-*.txz
Cheers,

Niki

PS: still uploading, you might want to wait a few minutes.
The above instructions worked without a problem. Unfortunately I am running into one setting up the printer...

HP Device Manager correctly detects the printer. I reach the point when a window opens up and says:
Quote:
You do not have permission to add a printer. You need authentication.
I enter "root" for username and the corresponding password. That's when another window opens up stating:
Quote:
Printer queue setup failed. Error: client-error-not possible
When I press OK to clear the window, I am back to the HP Device Manager window and no printer is set up.
 
Old 10-22-2014, 11:10 PM   #19
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 919

Rep: Reputation: 509Reputation: 509Reputation: 509Reputation: 509Reputation: 509Reputation: 509
Run 'hp-setup' as root in a terminal, it will open the hplip setup window.
Another way is setup with CUPS http://localhost:631/

Sometimes I have another problem, the printer is disabled by some reason.
To re-enable you can run 'cupsenable <printer name>' as root (printer name you
get with 'lpstat -p'), or in the HP Device Manager-Printer Control tab,
there's is a button to stop or start the printer.
 
Old 10-23-2014, 01:51 AM   #20
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
@tb75252: You have to enable CUPS first.

Code:
# chmod +x /etc/rc.d/rc.cups
# /etc/rc.d/rc.cups start
When you use Slackware, reading the documentation is mandatory.

Cheers,

Niki
 
Old 10-23-2014, 01:53 AM   #21
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by Paulo2 View Post
Hello Niki, a little bit of market pressure?
Yes, and now I have a new editor who is a BSD fan with Enlightenment on his laptop, and he's all for basing my book on Slackware.
 
Old 10-23-2014, 07:59 AM   #22
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Not to be contentious but this is the way I install or update HPLIP (and, with Slackware, you already have HPLIP installed by default with a full install). The current version of HPLIP in Slackware is 3.13.10; the current version of HPLIP at HP's website is 3.14.10 -- all the below is for upgrading from 3.13.10 to 3.14.10 and is 64-bit. If you're using 32-bit, it doesn't matter because the SlackBuild determines that automatically; the source tarball will compile on either 32-bit or 64-bit.

You need to do this stuff as root -- I prefer su -, you may prefer sudo.

Get the source HPLIP directory. It's in http://ftp.osuosl.org/pub/slackware/...urce/ap/hplip/ or in your source directory on your installation media. You want the entire directory.

cd <path>/hplip and remove the existing source and package files:
Code:
rm hplip*.txz hplip*.gz
You'll have doinst.sh.gz, slack-desc, and hplip.SlackBuild left.

Go get the source at http://sourceforge.net/projects/hpli...ror=hivelocity. Put that in the hplip directory.

Note: if you go to http://hplipopensource.com/hplip-web/gethplip.html, the HPLIP page at the HP website, you want to click the link near the bottom of the page that says "Advanced users may wish to download the HPLIP tar package." and click the link, that will send you to the SourceForge page and you'll get the tarball automatically.

In the hplip directory, execute hplip.SlackBuild.
Code:
sh ./hplip.SlackBuild
Wait a while (maybe two-three minutes).

When that finishes, you'll have /tmp/hplip-3.14.10-x86_64-1.txz. That's your installable package.
Code:
upgradepkg /tmp/hplip-3.14.10-x86_64-1.txz
<wait a while>
mv /tmp/upgradepkg /tmp/hplip-3.14.10-x86_64-1.txz .
You move the package to the hplip directory so you've got it where you might need it.

That's it.

Make sure you've got CUPS started
Code:
chmod 755 /etc/rc.d/rc.cups
/etc/rc.d/rc.cups stop (just in case)
/etc/rc.d/rc.cups start
Exit from su - or sudo; you need to be "you" for the following.

Then execute'
Code:
hp-setup
You will be prompted for the administrative password (that would be the root password).

HPLIP does all the set up in CUPS for you with one exception: it does not set the printer as the system default and you may want to do that (if it's your "main" or only printer).

Open a browser and go to http://localhost:631 (that's the CUPS administrative page).

Click the Printers tab and click the printer name that you want to make the system default. Then click the Administration tab and click Set as Server Default in the drop-down.

What that does is let you lp filename and get it printed without any fuss or bother.

One nice thing about HPILIP: I had my lap top 200 miles from home and needed to print something. My daughter had an HP portable printer, little thing, that I connected to the lap top with a USB cable. Darned if HPLIP didn't configure the thing automagically all by itself -- added it to CUPS no fuss, no muss, no bother. I was impressed.

Hope this helps some.

Last edited by tronayne; 10-23-2014 at 08:01 AM.
 
Old 10-23-2014, 08:10 AM   #23
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
NOTE: The following is just to add to your information if you're interested. It'll give you a bit more in-depth view of how packages are built in slackware. I'm not sure of your current level of understanding, so if I dumb something down too much, don't take offense

Quote:
Originally Posted by tb75252 View Post
I don't understand Niki's remark about using only the first of the two patches, though... What patches?? :-)
That was in reference to the link that Paulo2 posted initially. I'll back up a bit.

Everything in Slackware's main tree is compiled using slackbuild scripts. This allows you to just run a single script which will take tarball of source code, unpack it, add any patches needed, run configure, make, make install, and install it into a temporary directory. From this directory, you're able to use the makepkg command, which will generate a slackware package that you can install using the normal package management tools in slackware (installpkg, upgradepkg, removepkg).

If a version of software that you need, like hplip, is included with Slackware, but you need a newer version, you can usually take that newer source code (downloaded from the developer's website) along with the other files that Pat includes in the source directory (this would include the slackbuild itself, a slack-desc file (which provides the text used to describe the package to you during the install), any patches needed, and possibly doinst.sh, which is a post install script.

If you take all those files, along with the new source tarball, you can usually run the slackbuild, and you will eventually have an updated package waiting for you to install.

Sometimes, like with hplip here, patches may not be needed any more (or new patches might be needed), but this isn't too common. A good chunk of slackbuilds don't need anything additional.

To better show you, let's use a different example of a program, gimp.

This link is to the source tree of Slackware, specifically for gimp. If you look in there, you'll see 3 files: gimp-2.8.10.tar.xz | gimp.SlackBuild | slack-desc

gimp-2.8.10.tar.xz - This is the actual source code tarball. This contains all the lines of code that will eventually make the program. You could download this, run tar -xvf gimp-2.8.10.tar.xz and it will uncompress the tarball into a folder, where you'd be able to go in and manually compile your program. Luckily, because of gimp.Slackbuild, you won't have to do this.

gimp.SlackBuild - This is a shell script, and it will do everything you need, automagically, to provide you with a gimp-2.8.10-x86_64-1.txz file that you can then use upgradepkg/installpkg to upgrade/install the program to Slackware. If you're familiar with compiling, you can look in there and see some common things, including the ./configure with various configuration options, make, and make install. (I was mistaken before, and Paulo2 corrected me -- the slackbuild will automatically get the file version, so that wouldn't need to be edited with official Slackware slackbuilds)

slack-desc - This contains the description of gimp, which is displayed to you when you install/upgrade this program (this is the same thing that would come up on the screen of each package you installed when you initially installed Slackware.

Now, if you wanted to update gimp to a newer version, say 2.8.14 (the latest stable release right now), you would just download the gimp.Slackbuild and the slack-desc files and put them in the same folder as the gimp-2.8.14 tarball you downloaded from http://www.gimp.org, then you'd just run gimp.Slackbuild as root, and after some time (depending on the complexity of the program), if everything goes right, you'll have a new gimp-2.8.14-x86_64-1.txz file in /tmp. You would just issue upgradepkg /tmp/gimp-2.8.14-x86_64-1.txz and it would uninstall your old version and install the newer one.

Some programs, like hplip, require patches to properly compile. Sometimes these patches are only needed for specific versions. So in the case of hplip, 3.13.10, that comes with Slackware 14.1, requires 2 patches (both of which are included in the source directory for hplip in the slackware tree. As Niki mentioned, with version 3.14.10, the first patch is only one needed for the 3.14.x series of hplip. Sometimes this is just a trial and error process to figure it out. Luckily, with this one, you had niki who could provide you with an updated package. But if you run into other programs that need updates, hopefully this information I provided can give you some insight on how to do this yourself if needed.
 
Old 10-24-2014, 07:34 PM   #24
tb75252
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
NOTE: The following is just to add to your information if you're interested. It'll give you a bit more in-depth view of how packages are built in slackware. I'm not sure of your current level of understanding, so if I dumb something down too much, don't take offense



That was in reference to the link that Paulo2 posted initially. I'll back up a bit.

Everything in Slackware's main tree is compiled using slackbuild scripts. This allows you to just run a single script which will take tarball of source code, unpack it, add any patches needed, run configure, make, make install, and install it into a temporary directory. From this directory, you're able to use the makepkg command, which will generate a slackware package that you can install using the normal package management tools in slackware (installpkg, upgradepkg, removepkg).

If a version of software that you need, like hplip, is included with Slackware, but you need a newer version, you can usually take that newer source code (downloaded from the developer's website) along with the other files that Pat includes in the source directory (this would include the slackbuild itself, a slack-desc file (which provides the text used to describe the package to you during the install), any patches needed, and possibly doinst.sh, which is a post install script.

If you take all those files, along with the new source tarball, you can usually run the slackbuild, and you will eventually have an updated package waiting for you to install.

Sometimes, like with hplip here, patches may not be needed any more (or new patches might be needed), but this isn't too common. A good chunk of slackbuilds don't need anything additional.

To better show you, let's use a different example of a program, gimp.

This link is to the source tree of Slackware, specifically for gimp. If you look in there, you'll see 3 files: gimp-2.8.10.tar.xz | gimp.SlackBuild | slack-desc

gimp-2.8.10.tar.xz - This is the actual source code tarball. This contains all the lines of code that will eventually make the program. You could download this, run tar -xvf gimp-2.8.10.tar.xz and it will uncompress the tarball into a folder, where you'd be able to go in and manually compile your program. Luckily, because of gimp.Slackbuild, you won't have to do this.

gimp.SlackBuild - This is a shell script, and it will do everything you need, automagically, to provide you with a gimp-2.8.10-x86_64-1.txz file that you can then use upgradepkg/installpkg to upgrade/install the program to Slackware. If you're familiar with compiling, you can look in there and see some common things, including the ./configure with various configuration options, make, and make install. (I was mistaken before, and Paulo2 corrected me -- the slackbuild will automatically get the file version, so that wouldn't need to be edited with official Slackware slackbuilds)

slack-desc - This contains the description of gimp, which is displayed to you when you install/upgrade this program (this is the same thing that would come up on the screen of each package you installed when you initially installed Slackware.

Now, if you wanted to update gimp to a newer version, say 2.8.14 (the latest stable release right now), you would just download the gimp.Slackbuild and the slack-desc files and put them in the same folder as the gimp-2.8.14 tarball you downloaded from http://www.gimp.org, then you'd just run gimp.Slackbuild as root, and after some time (depending on the complexity of the program), if everything goes right, you'll have a new gimp-2.8.14-x86_64-1.txz file in /tmp. You would just issue upgradepkg /tmp/gimp-2.8.14-x86_64-1.txz and it would uninstall your old version and install the newer one.

Some programs, like hplip, require patches to properly compile. Sometimes these patches are only needed for specific versions. So in the case of hplip, 3.13.10, that comes with Slackware 14.1, requires 2 patches (both of which are included in the source directory for hplip in the slackware tree. As Niki mentioned, with version 3.14.10, the first patch is only one needed for the 3.14.x series of hplip. Sometimes this is just a trial and error process to figure it out. Luckily, with this one, you had niki who could provide you with an updated package. But if you run into other programs that need updates, hopefully this information I provided can give you some insight on how to do this yourself if needed.
Thank you very much for the exhaustive explanation. I really appreciate it.
 
Old 10-24-2014, 07:46 PM   #25
tb75252
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tronayne View Post
Not to be contentious but this is the way I install or update HPLIP (and, with Slackware, you already have HPLIP installed by default with a full install). The current version of HPLIP in Slackware is 3.13.10; the current version of HPLIP at HP's website is 3.14.10 -- all the below is for upgrading from 3.13.10 to 3.14.10 and is 64-bit. If you're using 32-bit, it doesn't matter because the SlackBuild determines that automatically; the source tarball will compile on either 32-bit or 64-bit.

You need to do this stuff as root -- I prefer su -, you may prefer sudo.

Get the source HPLIP directory. It's in http://ftp.osuosl.org/pub/slackware/...urce/ap/hplip/ or in your source directory on your installation media. You want the entire directory.

cd <path>/hplip and remove the existing source and package files:
Code:
rm hplip*.txz hplip*.gz
You'll have doinst.sh.gz, slack-desc, and hplip.SlackBuild left.

Go get the source at http://sourceforge.net/projects/hpli...ror=hivelocity. Put that in the hplip directory.

Note: if you go to http://hplipopensource.com/hplip-web/gethplip.html, the HPLIP page at the HP website, you want to click the link near the bottom of the page that says "Advanced users may wish to download the HPLIP tar package." and click the link, that will send you to the SourceForge page and you'll get the tarball automatically.

In the hplip directory, execute hplip.SlackBuild.
Code:
sh ./hplip.SlackBuild
Wait a while (maybe two-three minutes).

When that finishes, you'll have /tmp/hplip-3.14.10-x86_64-1.txz. That's your installable package.
Code:
upgradepkg /tmp/hplip-3.14.10-x86_64-1.txz
<wait a while>
mv /tmp/upgradepkg /tmp/hplip-3.14.10-x86_64-1.txz .
You move the package to the hplip directory so you've got it where you might need it.

That's it.

Make sure you've got CUPS started
Code:
chmod 755 /etc/rc.d/rc.cups
/etc/rc.d/rc.cups stop (just in case)
/etc/rc.d/rc.cups start
Exit from su - or sudo; you need to be "you" for the following.

Then execute'
Code:
hp-setup
You will be prompted for the administrative password (that would be the root password).

HPLIP does all the set up in CUPS for you with one exception: it does not set the printer as the system default and you may want to do that (if it's your "main" or only printer).

Open a browser and go to http://localhost:631 (that's the CUPS administrative page).

Click the Printers tab and click the printer name that you want to make the system default. Then click the Administration tab and click Set as Server Default in the drop-down.

What that does is let you lp filename and get it printed without any fuss or bother.

One nice thing about HPILIP: I had my lap top 200 miles from home and needed to print something. My daughter had an HP portable printer, little thing, that I connected to the lap top with a USB cable. Darned if HPLIP didn't configure the thing automagically all by itself -- added it to CUPS no fuss, no muss, no bother. I was impressed.

Hope this helps some.
Thank you very much for your suggestion.
I tried kikinovak's suggestions (see messages #3 and #20) but I kept getting the error described in my message #18.

I then tried your suggestion and was able to install HPLIP 3.14.10 and set up the printer. The only thing that did not work was this part:
Quote:
hp-setup
as I kept on getting an error towards the end of the printer setup process. I ended up rebooting and was able to complete the set up process without further problems.

Now I have a question with hplip and slackpkg. For that I will open a new thread.
 
Old 10-24-2014, 07:55 PM   #26
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Quote:
Originally Posted by tb75252 View Post
I ended up rebooting and was able to complete the set up process without further problems.
Just a reminder ...

It looks like your problem/question has been solved/answered. If so please use the Thread Tools at the top of the LQ page to mark this thread as solved.
 
Old 10-24-2014, 08:09 PM   #27
tb75252
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TracyTiger View Post
Just a reminder ...

It looks like your problem/question has been solved/answered. If so please use the Thread Tools at the top of the LQ page to mark this thread as solved.
Done!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Printing Problem thru IPP - HPLIP daxesh SUSE / openSUSE 2 03-13-2011 06:51 PM
Printer Not Printing with HPLIP rajesh.bahl Linux - Desktop 4 05-17-2009 02:41 AM
HPLip, printer not printing most things... HP Deskjet D4160 BallsOfSteel Linux - Hardware 1 08-14-2008 01:35 PM
Cups & Hplip double sided printing MartyMcFly Linux - Hardware 6 04-07-2007 12:48 PM
hplip does not support printing to windows printers phats_O Linux - Hardware 1 06-01-2005 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration