CUPS printing - installation script - update 13SEP06

News, happenings
Post Reply
Message
Author
User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

CUPS printing - installation script - update 13SEP06

#1 Post by pakt »

Installing CUPS and a parallel port or USB printer in Puppy 1.xx or 2.xx

5DEC06 - USE THIS NEW DOTPUP INSTEAD: cups-install-v0.3.pup for even easier CUPS and printer installation !
* * * * * * * * * * * * * * * * * * * * * * * * * *
UPDATE 13SEP06: Installation script v0.1f. Changes from script v0.1c:
- verifies any *.ppd file in cups-install dir with 'cupstestppd'
- added 'network' to choice of printer types
- starts default browser with CUPS web interface from script
- checks for missing perl modules only in Puppy 2.01/2.02 (perl 5.8.6).
(Puppy 2.10, using perl 5.8.8, has the missing modules)
- checks that cupsd is running before starting browser
- backs up original /etc/rc.d/rc.local to /etc/rc.d/rc.local_cups
- changed to high-capacity download server ftp://slackware.cs.utah.edu

* Background

Barry K has, through his Puppy Printer Wizard, put printer support in Puppy for a number of Canon, Epson, HP and Lexmark printers. This is good news for those having one of the supported printers. Unfortunately, my Brother HL-1030 parallel port printer is not one of them. To make matters worse, in order to share it in my home network, I had it connected to my D-Link DI-713P Wireless Gateway's printer port. This required a special driver from D-Link to get to work in XP.

When rarsa announced his breakthrough CUPS solution for Puppy some time ago, I used his scripts and the files that were downloaded to get the Brother printer to work in Puppy 1.07. It was easier to set up in Puppy than it was in XP - no special driver was neccessary! I must confess that I did have to search the net for the right 'Device' and 'Device URI' syntax for this unusual configuration. It turned out to be 'Device': 'LPD/LPR Host or Printer' and 'Device URI': lpd://192.168.0.1/lp' for my network. I've been printing happily ever since. The ability to print from Puppy was the one thing that had kept me from running Puppy as my main OS instead of Kanotix.

* The CUPS installation script

I have been following the CUPS threads on the Puppy forum and the great work dewdrop has been doing helping others. However, I found rarsa's instructions awkward, having to execute separate scripts to install the CUPS files. They also needed updating for Puppy 2.xx. So I decided to re-write the scripts into a single script, update the CUPS files from Slackware 10.1 to 10.2 and add the CUPS 'gimp-print' file containing numerous additional printer drivers.

The script will now ask for the type of printer to be installed (parallel, USB or network) and install the correct modules for either Puppy 1.xx or 2.xx (the module names have changed between kernel versions).

Please note that in Puppy 2.00/2.01/2.02, the perl installation is missing some perl modules needed to run CUPS. The missing files are in perl_missing.tar.gz, attached to this post. See the instructions further down on how to install this file.

* Instructions for using the script

Installing the CUPS files (Note - you need to be online so the script can download the necessary files)

1. Download the attached file (cups-install.tar.gz) and copy it to /root/

Then, in a console, do the following:

2. Change to your root directory

# cd /root

3. Unpack the file:

# tar -xzf cups-install.tar.gz

4. Change to the installation directory

# cd cups-install

5. Run the script. This will download and install the four CUPS files. If the files have been previously downloaded, the script will use the these files instead of downloading them again. Just make sure they are in the same directory as the CUPS install script.

# sh cups-install.sh

Adding and configuring your printer

1. After the CUPS files are installed, the script will automatically start up your default browser with the CUPS web interface where you add and configure your printer. The terminal with this script will remain open with instructions to help you add and configure your printer. Once configured, a test page can be printed to check the setup. No re-booting of the PC is neccessary.

If you should want to read the instructions again, they are in the file 'cups-conf.txt'. Open the file with an editor to read it.

Note that you may not need to download a .ppd file for your printer before running this script. It may already be listed on the 'Make' and 'Model' pages of the CUPS web interface. If it is not listed, download a suitable .ppd file from www.linuxprinting.org , copy it to the same directory as this script and then run the script again. It will automatically install the .ppd file. The 'Make' and 'Model' should now be present when you try to add the printer in the CUPS web interface.

Tip: If you have an HP printer, you can check which 'Model' name to use in the CUPS web interface by looking up the 'Printer Class' for your printer on HP's 'All Supported Devices' page: http://hplip.sourceforge.net/supported_ ... bined.html
Example: HP PSC1410 'All in one' printer - use 'DJ3320'

2. Finish by deleting the temporary directory (if you don't want to save the downloaded files).

# cd ..
# rm -R cups-install

* Adding the missing perl modules for Puppy 2.00/2.01/2.02

1. Download the attached file (perl-add-missing.tar.gz) and copy it to /root/

Then, in a console, do the following:

2. Change to your root directory

# cd /root

3. Unpack the file. This will create temporary directory perl-add-missing

# tar -xzf perl-add-missing.tar.gz

4. Change to directory perl-add-missing

# cd perl-add-missing

5. Run the script.

# sh perl-add-missing.sh

6. Finish by deleting the temporary directory

# cd ..
# rm -R perl-add-missing

* Feedback

Please report in this thread if you are successful or if you have problems installing a printer using the script and these instructions.

Good luck!

Paul
Attachments
cups-install.tar.gz
Updated installation script v0.1f
(11.08 KiB) Downloaded 1282 times
perl-add-missing.tar.gz
Only needed for Puppy 2.00/2.01/2.02
(75.07 KiB) Downloaded 1384 times
Last edited by pakt on Fri 11 May 2007, 06:13, edited 17 times in total.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#2 Post by Lobster »

Seems this could make people happy. Testers needed.
Have put it on the wiki news . . .
http://puppylinux.org/wikka/LatestNews

8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#3 Post by pakt »

Lobster wrote:Seems this could make people happy. Testers needed.
Have put it on the wiki news . . .
http://puppylinux.org/wikka/LatestNews

8)
Thanks Lobster :D

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#4 Post by rarsa »

I'll test your script as soon as I can.

I've had way to many people at home this summer and feel like a turist guide. Not that I'm complaining.

I know how important it is to have testers. I wouldn't have been able to refine the installation the first time around if it wasn't for dewdrop and other people testing and giving advice.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
dewdrop
Posts: 298
Joined: Tue 30 Aug 2005, 01:54
Location: Texas USA

Installing CUPS and a parallel port or USB printer in Puppy

#5 Post by dewdrop »

Hi Paul,

This is just tremendous. I've downloaded the files and will try today to do pristine installs of Puppy 109CE, and Puppy 2.02, using them with my HP6540 USB printer.

Thanks for all this work.

I'll send this thread's address to Flash so that he can include it in his beginners thread.....

http://www.murga.org/~puppy/viewtopic.php?t=597

dewdrop

Kal
Posts: 626
Joined: Thu 05 May 2005, 16:59
Location: California, High Desert

Cups

#6 Post by Kal »

Hi, Paul
I did a fresh Puppy 2.02, hdd #1 install and tried the new cups installer. This is with a usb HP3740 printer. I used xarchive to untar, instead of xterm, but the same smell. Install your perl package and than run sh cups-install.sh in terminal, used "Xterm here" from right click menu in cups-install window. Installed the printer in the print manager and all went well. You have a nice spacings on the entries in rc.local. No having to "modprobe usblp" or reboot! Printed test page. A+ score on this Cups installer. Very good upgrade. I only made one mistake, I forgot to hookup to the internet first (rushed it).
Thanks, Kal

User avatar
Buteman
Posts: 16
Joined: Mon 24 Jul 2006, 11:41
Location: Bute - Scotland

#7 Post by Buteman »

Thanks for your efforts,
Unfortunately it's not quite there for me yet as I get some errors.
The link to www.linuxprinting.org is malformed as there is a comma immediately after .org and before the final /
I did spot this but it is not easy to see.
That is a minor problem because I am getting the same errors as I had before when running cups-install.sh
they are :

sh-3.1# sh cups-install.sh
--19:27:24-- ftp://ftp.linux.cz/pub/linux/slackware/ ... ackware/a/ cups-1.1.23-i486-1.tgz
=> `cups-1.1.23-i486-1.tgz'
Resolving ftp.linux.cz... done.
Connecting to ftp.linux.cz[147.251.48.205]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/linux/slackware/slackware-10.2/slackware/a .. . done.
==> PORT ... done. ==> RETR cups-1.1.23-i486-1.tgz ...
Error in server response, closing control connection.
Retrying.

--19:30:44-- ftp://ftp.linux.cz/pub/linux/slackware/ ... i486-1.tgz
(try: 2) => `cups-1.1.23-i486-1.tgz'
Connecting to ftp.linux.cz[147.251.48.205]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/linux/slackware/slackware-10.2/slackware/a ... done.
==> PORT ... done. ==> RETR cups-1.1.23-i486-1.tgz ...
Error in server response, closing control connection.

These contiue for a number of times ( 20 I think ) then it gives up.
best wishes,
Norm

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#8 Post by Sit Heel Speak »

Whew...well, now I know how I am going to spend this weekend. I will be trying it on my two Canon printers. One is an i70 portable, the other an MP780 multifunction (scanner+printer), both through the USB port. One thing I cannot do in Win 98SE is make either printer work through a PCMCIA USB 2.0 adapter. Good heavens, if that works then I am going to have to learn the Swedish national anthem...

Kal
Posts: 626
Joined: Thu 05 May 2005, 16:59
Location: California, High Desert

Cups

#9 Post by Kal »

Hi, Buterman
Just wondering if you have tried going to the slackware site and downloading from another server manually.
http://slackware.it/en/pb/package.php?q ... 1#download

Good Luck, Kal

User avatar
dewdrop
Posts: 298
Joined: Tue 30 Aug 2005, 01:54
Location: Texas USA

Installing CUPS and a parallel port or USB printer in Puppy

#10 Post by dewdrop »

dewdrop wrote:Hi Paul,

This is just tremendous. I've downloaded the files and will try today to do pristine installs of Puppy 109CE, and Puppy 2.02, using them with my HP6540 USB printer.


dewdrop
I did pristine installs for Puppy109CE and Puppy2.02 for my USB printer noted above....both installs worked perfectly.

Thanks again Paul.

dewdrop

User avatar
Buteman
Posts: 16
Joined: Mon 24 Jul 2006, 11:41
Location: Bute - Scotland

Re: Cups

#11 Post by Buteman »

Kal wrote:Hi, Buterman
Just wondering if you have tried going to the slackware site and downloading from another server manually.
http://slackware.it/en/pb/package.php?q ... 1#download

Good Luck, Kal
I did download the files for slack 10.1 at the suggestion of another forum member and edited cups-install.sh but I cannt seem to get anything to print to my remote printer. running the printer wizard gives no option for remote printer uuse either.
Norm

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#12 Post by kirk »

Works for me with a networked postscript printer. But I didn't have to have it, xpdq included in Puppy works for me as well.


Thanks
:D

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

Re: CUPS Printing - New installation script - Please test...

#13 Post by edoc »

pakt wrote:Installing CUPS and a parallel port or USB printer in Puppy 1.xx or 2.xx

Instructions

1. Download the attached file (cups-install.tar.gz) and copy it to /root/
Then, in a console, do the following:

2. Change to your root directory
# cd /root

3. Unpack the file:
# tar -xzf cups-install.tar.gz

4. Change to the installation directory
# cd cups-install
Here is my experience -- HDD install of Puppy 2.02 on a Laptop:

sh-3.1# cd /root
sh-3.1# tar -xzf cups-install.tar.gz
sh-3.1# cd cups-install
sh: cd: cups-install: No such file or directory


Never a simple install or setup of anything here ... doc
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

Re: CUPS Printing - New installation script - Please test...

#14 Post by edoc »

edoc wrote:
Here is my experience -- HDD install of Puppy 2.02 on a Laptop:

sh-3.1# cd /root
sh-3.1# tar -xzf cups-install.tar.gz
sh-3.1# cd cups-install
sh: cd: cups-install: No such file or directory

Perhaps I need to phrase my question more directly?

Was I supposed to manually create /root/cups-install or was
tar -xzf cups-install.tar.gz supposed to do that?

If supposed to be installed automatically what would cause it to
fail and what need I do?

I really need to be able to install my color printer. I have been
without it now for several weeks.

Thanks! doc
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

Billcnz
Posts: 215
Joined: Fri 30 Jun 2006, 23:07
Location: Wellington New Zealand

Re: CUPS Printing - New installation script - Please test...

#15 Post by Billcnz »

edoc wrote:
edoc wrote: Perhaps I need to phrase my question more directly?

Was I supposed to manually create /root/cups-install or was
tar -xzf cups-install.tar.gz supposed to do that?

Thanks! doc
When changing to a directory I find it useful to use the ls command to check exactly where I am. Also if you click on the tar.gz file in Rox, Puppys pupzip will open and you can select all files and extract ( it saves remembering all the right xzf etc options).

sh-3.1# cd my-documents/
sh-3.1# ls
clipart cups-install.tar.gz
cups-install tmp
sh-3.1# cd cups-install
sh-3.1# ls
cupsconf.tar.gz cups-conf.txt cups-install.sh read_me.txt
sh-3.1# sh cups-install.sh

Bill

gamfa
Posts: 113
Joined: Thu 27 Oct 2005, 00:29
Location: So. Central Indiana, USA

#16 Post by gamfa »

Very interesting. I used the cups>espgs>gimp-print combination on 1.09 in order to get my Epson printers to work on puppy. I do have a few comments. Why use slack 10.2. The cups, gimp-print, and hpijs are the same as 10.1 but the espgs is 2.2mb larger on 10.2. The 10.1 version is only 3.8m and 10.2 is 6.0. What advantage is there to the newer version of espgs? You might also give the user a choice to load hpijs or not. Most non-hp printers don't need it. It's is taken care of in gimp-print.

By the way, the script worked flawlessly.

Edit..
I installed the 3 app printing combo on 1.09,2.01,Optimized and 2.02 and it did not require doing anything with the perl libs as they were delivered on the iso's.

User avatar
dewdrop
Posts: 298
Joined: Tue 30 Aug 2005, 01:54
Location: Texas USA

Re: CUPS Printing - New installation script - Please test...

#17 Post by dewdrop »

edoc wrote:
pakt wrote:Installing CUPS and a parallel port or USB printer in Puppy 1.xx or 2.xx


Instructions

1. Download the attached file (cups-install.tar.gz) and copy it to /root/
Then, in a console, do the following:

2. Change to your root directory
# cd /root

3. Unpack the file:
# tar -xzf cups-install.tar.gz

4. Change to the installation directory
# cd cups-install
Here is my experience -- HDD install of Puppy 2.02 on a Laptop:

sh-3.1# cd /root
sh-3.1# tar -xzf cups-install.tar.gz
sh-3.1# cd cups-install
sh: cd: cups-install: No such file or directory


Never a simple install or setup of anything here ... doc

Hi doc,


/////EDIT on 8/5/06

I have removed the 2 printscreens to save space on the Forum. Doc has reviewed this post, so they are no longer needed.

dewdrop


Might I suggest you do the following:

1. After you have downloaded the cups-install.tar.gz file and you find where it is located on your machine.... I expect it might be in your root directory..... do the following:

a. Single left click on your mouse while holding the mouse arrow over the cups-install.tar.gz file. This will open up XArchive and you should see 4 files listed. See printscreen below.

b. Click on the word Select All in the menu bar of XArchive.

c. Then click on the word Extract in the menu bar.

This will bring up a small window that shows you where the files will be extracted to....it should be the same place that the cups-install.tar.gz file is located....click on OK.

d. Open the file where all the files were extracted to in c. above....see the next printscreen with the extracted files in it.

e. Put your mouse over the open file and RIGHT click on your mouse. This will bring up a menu. Left click on the words Xterm Here. This will open the Console Window.

f. In the Console window after the # type the following:

#sh cups.install.sh (hit return to begin the installation)

You should now see activity from the slackware download site as your machine downloads and installs the various items needed for printing.

When the downloading/installation is finished with the cups.install.sh file is finished, you might need to download and install the perl file. If you do, just repeat the above process except this time you will be working with the perl file.

Does this short step by step help?

dewdrop
Last edited by dewdrop on Sat 05 Aug 2006, 11:48, edited 2 times in total.

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

Re: CUPS Printing - New installation script - Please test...

#18 Post by edoc »

dewdrop wrote: Might I suggest you do the following:

1. After you have downloaded the cups-install.tar.gz file and you find where it is located on your machine.... I expect it might be in your root directory..... do the following:

a. Single left click on your mouse while holding the mouse arrow over the cups-install.tar.gz file. This will open up XArchive and you should see 4 files listed. See printscreen below.

b. Click on the word Select All in the menu bar of XArchive.

c. Then click on the word Extract in the menu bar.

This will bring up a small window that shows you where the files will be extracted to....it should be the same place that the cups-install.tar.gz file is located....click on OK.

d. Open the file where all the files were extracted to in c. above....see the next printscreen with the extracted files in it.

e. Put your mouse over the open file and RIGHT click on your mouse. This will bring up a menu. Left click on the words Xterm Here. This will open the Console Window.

f. In the Console window after the # type the following:

#sh cups.install.sh (hit return to begin the installation)

You should now see activity from the slackware download site as your machine downloads and installs the various items needed for printing.

dewdrop
Nope. 2.02 seems to have broken something. Processes like this that worked fine under
2.00 and 2.01 fail under 2.02 on both my laptop and one desktop. No idea what is broken.

Same results:

sh-3.1# sh cups.install.sh
sh: cups.install.sh: No such file or directory
sh-3.1#


Sigh ... doc
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Billwho?
Posts: 559
Joined: Tue 06 Dec 2005, 09:28
Location: still "In The Dog House" East Coast Oz
Trialing 4.20

#19 Post by Billwho? »

Thanks for the new script pakt. It worked like a charm. :) The only problem I had was I forgot which ppd file to use. :twisted: :oops:

I finally tracked down this chart at
http://hplip.sourceforge.net/supported_ ... t_aio.html
which allowed me to find which ppd to use (in my case DJ3320)
I believe the chart should work for all HP All In One's not already listed in the Cups configuration. :D

I hope one day to get scanning as well as printing to work with the hplip driver from source, but this has turned out to be a long term project for me (I started in 1.0.8 and am still trying). If I ever succeed I will let you know

Hard drive:/ 80Gb
hda1:/ 3Gb hidden vfat partion
hda2:/ 36.5Gb bootable vfat partition Window$ XP
hda5:/ 36.8Gb vfat data storage partition

Printer:/ HP PSC1410 All in one

Puppy version:/ 2.01 Live CD with pup_save.3fs file on hda5

Pearl:/ devx_200.sfs renamed as devx_201.sfs on hda5 beside pup_save.3fs
Linux = Learning through doing :shock: :? :D
The learning curve may be steep but there is a light at the end of the tunnel.
You just have to pass the occasional oncoming train to get there.

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#20 Post by pakt »

Buteman wrote: The link to www.linuxprinting.org is malformed as there is a comma immediately after .org and before the final /
I did spot this but it is not easy to see.
Thanks for pointing that out. I've put a space between the link and the comma.
Buteman wrote: That is a minor problem because I am getting the same errors as I had before when running cups-install.sh
they are :

sh-3.1# sh cups-install.sh
--19:27:24-- ftp://ftp.linux.cz/pub/linux/slackware/ ... ackware/a/ cups-1.1.23-i486-1.tgz
=> `cups-1.1.23-i486-1.tgz'
Resolving ftp.linux.cz... done.
Connecting to ftp.linux.cz[147.251.48.205]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/linux/slackware/slackware-10.2/slackware/a .. . done.
==> PORT ... done. ==> RETR cups-1.1.23-i486-1.tgz ...
Error in server response, closing control connection.
Retrying.

--19:30:44-- ftp://ftp.linux.cz/pub/linux/slackware/ ... i486-1.tgz
(try: 2) => `cups-1.1.23-i486-1.tgz'
Connecting to ftp.linux.cz[147.251.48.205]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/linux/slackware/slackware-10.2/slackware/a ... done.
==> PORT ... done. ==> RETR cups-1.1.23-i486-1.tgz ...
Error in server response, closing control connection.

These contiue for a number of times ( 20 I think ) then it gives up.
This seems to have been a problem with the server not being available when you attempted your downloads.

I have been thinking that it may be a good idea to put the files on the pup-get repository and download them from there instead.

Post Reply