OS2 World Forum

OS/2 - Technical => Applications => Topic started by: Dennis on 2007.10.14, 17:21:10

Title: CUPS???
Post by: Dennis on 2007.10.14, 17:21:10
Not being a hi tech person and not monitoring OS/2-eCS developments, I see something called CUPS is replacing win32 development. Please explain what CUPS is.

Thank you

Dennis
Title: Re: CUPS???
Post by: DavidG on 2007.10.14, 21:50:51
CUPS is the Common Unix Printing System.  A decision was made that this would be the best and easiest way to further develop printer support for eCS.

Here is the Trac page.

http://svn.netlabs.org/ecups/wiki/CupsPort

You can print using the command line tools, or try the CUPS port driver.

ftp://ftp.netlabs.org/pub/ecups/

There is a newsgroup

news://news.gmane.org/gmane.org.netlabs.ecups/devel
Title: Re: CUPS???
Post by: RobertM on 2007.10.14, 21:51:09
Hi Dennis,

Check out these links for more info:

On NetLabs (http://svn.netlabs.org/ecups/wiki/CupsPort)

on eComStation Site (http://www.ecomstation.com/news.phtml?action=fullnews&id=2410&title=New%20CUPS%201.30%20%20for%20OS/2%20&%20eComStation%20build%20released)


IF I am correct, it will allow a far wider list of printers to be successfully used under eCS and OS/2... but is still under testing and development. (anyone please feel free to correct me if I am wrong, or expound in my answer)

-Robert
Title: Re: CUPS???
Post by: Paul Smedley on 2007.10.17, 06:25:31
Quote from: RobertM on 2007.10.14, 21:51:09
Hi Dennis,

Check out these links for more info:

On NetLabs (http://svn.netlabs.org/ecups/wiki/CupsPort)

on eComStation Site (http://www.ecomstation.com/news.phtml?action=fullnews&id=2410&title=New%20CUPS%201.30%20%20for%20OS/2%20&%20eComStation%20build%20released)


IF I am correct, it will allow a far wider list of printers to be successfully used under eCS and OS/2... but is still under testing and development. (anyone please feel free to correct me if I am wrong, or expound in my answer)

You are correct.  There is a list of printers that Gutenprint supports at http://gimp-print.sourceforge.net

There has been suprisingly little feedback on the current build - makes me think people aren't interested in support for modern printers...

The current build mostly works for single page documents, multiple page documents tend to fail after the first page - I've isolated this to a problem in the Ghostscript build used - but need to find our where the fault is and correct it still.

We also need to work on making it easier to integrate cups with eComStation - an ongoing challenge.

Cheers,

Paul.
Title: Re: CUPS???
Post by: Saijin_Naib on 2007.10.17, 07:18:32
I think the lack of feedback may be because it seems a bit daunting. I, personally, am not comfortable with the OS/2 printer install routine, and from what I was reading about CUPS, doubted my ability to configure it properly, so I never even bothered to try it. Im sure others in the community are not as OS/2 noobish as I am, but it seems daunting and that may have somethig to do with the lack of feedback?
Title: Re: CUPS???
Post by: RobertM on 2007.10.17, 08:51:12
Hi Paul,

Unfortunately I'd agree with Saijin_Naib. I think at least a few users are scared away by the *seeming* complexity of installing the drivers.

I'll try to give it a go in the near future and report back anything strange I find. Just havent had time to work on installing it.

-Robert
Title: Re: CUPS???
Post by: Saijin_Naib on 2007.10.17, 09:40:51
 :-\ Yeah, I am a GUI noob, and the lack of an installer and GUI application through which to manage and set up things really puts me off it. I desperately need printing support under OS/2 for my HP PSC 1210xi, and it looks like eCUPS is going to provide that, but I was afraid to try it. I may sit down this weekend and give it another shot. I can always re-install if I do something dumb :D
Title: Re: CUPS???
Post by: Pete on 2007.10.18, 23:56:01
Hi Guys

Just chiming in to say that despite the complex look of cups it is not difficult to install:

Just unzip to the Root of a drive and make sure that all required dll files, libcups and libc063, go into a sensible place: either [BootDrive]:\ecs\dll or [BootDrive]:\os2\dll (whichever is 1st in your Libpath) - also while playing with libc*.dll files it might be worth checking how many of what you have on your system and removing any unrequired extras which can cause problems.

Creating a CUPS printer and testing it is not too difficult to do if you follow the instructions in the \cups\readme.os2 file.

Where it does become a pain is when you have completed the above steps and want to create an eCS(OS/2) Postscript Printer Object for your non-postscript printer to hook up with CUPS allowing you to print from applications...

Before going any further you will need some more files:

ftp://ftp.netlabs.org/pub/ecups/ecups.pdr

gccpin.zip - Somewhere, but I cannot find a url currently, is an updated pin.exe package, gccpin.zip, built by Paul which you should use in preference to the pin.exe supplied with pscript.drv - hopefully Paul will spot this post and respond with the current url.

(not so) Very briefly:

1] The CUPS PPD file for the printer is in .ppd.gz format - located in \cups\share\cups\model\gutenprint\5.1\en_GB This needs to be UNTGZ'd to just a ppd file. I found this easiest to do by copying the required ppd file to the same directory as the UNTGZ files. I'm using a Canon PIXMA iP4000 in this example UNTGZ line - and also take the chance to shorten the decompressed filename somewhat:-

untgzos2 -d stp-bjc-iP4000.5.1.ppd.gz ip4000.ppd ip4000.ppd

I found UNTGZ on hobbes http://hobbes.nmsu.edu/pub/os2/util/archiver/untgz095.zip

2] You need a "Virgin" (never even been looked at) PSCRIPT package unzipped into a clean directory - I've had problems adding ppd files to pscript.drv 30_827 but 30_822 seems to work OK. Copy the decompressed (ip4000.ppd) ppd file to this directory from wherever you UNTGZ'd it.

3] When found and downloaded unzip gccpin.zip into the same directory as the  PSCRIPT package overwriting the original files.

4] Use pin.exe to add the UNTGZ'd ppd file to the PSCRIPT driver; an example where all files required are in H:\temp\printer:-

[H:\temp\printer]pin.exe ppd H:\temp\printer\ip4000.ppd H:\temp\printer\pscript.drv

The screen will flash lots of messages that you will not be able to read but the final message should say something like this:-

...... OK (Canon iP4000)
done: 1 devices converted, 0 failed
FINISHED, SHUTTING DOWN
done


The above suggests that the ppd file was succesfully added to pscript.drv.

To check doubleclick the pscript.drv and see if the printer you added is listed.

If "Yes" then you can RMB that printer and should get the option Install...

Selecting that should copy all files to \os2\dll\pscript - standard location for this driver in OS/2 systems.

You should then be able to install the printer but remember to set the install routine to look in \os2\dll\pscript rather than A:

When you have the printer installed you need to open the Properties and set eCUPS as the Output port - you will have to do the Install new port bit first. The eCUPS port will require some settings:-

Host - localhost
Printer - name of CUPS printer setup and tested earlier

It is also a good time to set various defaults to the same as those used by the CUPS printer to avoid any strange output problems.


Close Properties. It may be wise to have a reboot here - although it may not be necessary.


The eCS(OS2) printer - in my case the Canon PIXMA iP4000 - should now be capable of producing output at the printer. I suggest trying from a text editor: open a text file and select to print, make sure that the correct printer is selected.

If that works try a few apps - some print with the limitations mentioned by Paul and some do not print at all here.

Hopefully Paul will get the multiple pages problem resolved in the near future.


Another problem that I became aware of recently is that cupsd.exe can exit with no warning when using the browser admin interface. As I had not had this problem at all prior to upgrading my system from single core to dual core cpu I think that there is an interaction problem somewhere within all the software involved. When I turn off cpu2 using the cpu monitor in Utils the problem does not exist. Just something to be aware of....



Why bother with this testing? - it is just a lot of work.

My answer is fairly simple: It removes a lot of the "What driver has a vague chance of working with my brand new printer that is at least several generations removed from the most recent listed printers?" when looking at possible printer purchases.


Hope the above is of help should you decide to test CUPS.

Pete







Title: Re: CUPS???
Post by: Paul Smedley on 2007.10.22, 12:18:20
Hi Pete,
Quote from: Pete on 2007.10.18, 23:56:01
Hopefully Paul will get the multiple pages problem resolved in the near future.

I'm at least a little closer to understanding the problem.  It's definitely a ghostscript problem - as running pstoraster from the command line, ghostscript gives an error after one page.

I'm currently trying to get Ghostscript 8.60 building with libc, as the cups stuff is now merged into the main ghostscript tree.

However, my free time amount has decreased significantly of late - roll on Christmas vacation :)

Cheers,

Paul
Title: Re: CUPS???
Post by: kdxensen on 2007.10.23, 01:52:52
Hi all,
I've used os/2 since v2.0 and am a loyal fan... I'm delighted to watch the cups project but so far I have not been able to connect to my printers. I am able to use cups for my hp color laserjet 2600n under linuz. There is a ppd for this printer. I'm wondering if I can use this ppd under cups/eCS.

I have followed the readme.os2 and much is still hazy to me but I enjoy tinkering... I'm just not very smart.

The examples in the readme are for 2 printers of which I have neither. I'd hoped to use the examples as "models" for my own printers to no avail...yet.  Am I correct in assuming that I can use this syntax for my printers? Both of my printers are connected thru the lan... the 2600n has a lan interface built in. The other printer is an hp Photosmart 8250 connected to a Trendnet print server.

-Ken
Title: Re: CUPS???
Post by: magog on 2007.10.24, 02:42:12
I tried CUPS last week but the Daemon died when I was jumping through the configuration steps using the webbrowser (read something on the website but I thought the problem was fixed with the current release...whatever).
I've not tried it again because I was testing Pauls PostgreSQL build. ;)

I also don't think the printer I've got here will work. It's a Canon IP 4300 which I only got to print some nice pictures and text on my CD/DVDs.
For the other stuff I've got my OKI C5450DN Color Laser printer (PS3/PCL6) which is working with IBMs Postscript drivers after I generated the driver using the PPD file from OKI.
Title: Re: CUPS???
Post by: Pete on 2007.10.24, 16:29:39
Hi Juergen

Are you running dual core cpu?

As mentioned in my previous post cupsd.exe crashes when accessing the browser admin interface if both cpu cores are On.

Use the CPU Monitor (in Desktop -> Utils) to turn Off CPU2 while using the browser admin; turn On after.


If we are talking single core CPU Please let Paul know - there is a discussion group where you can post bugs/problems  news.gmane.org/gmane.org.netlabs.ecups.devel


As CUPS contains the file stp-bjc-PIXMA-iP4300.5.1.ppd.gz my guess is that your Canon PIXMA iP4300 has a very good chance of working with CUPS - within the limitations of the current port; see Paul's post.

Just to try to be encouraging my Canon PIXMA iP4000 works with CUPS - sort of.

Remember this is software in development and the more people testing and posting reports the quicker the software reaches real usability - hopefully.

Regards

Pete







Title: Re: CUPS???
Post by: magog on 2007.10.24, 18:21:42
Quote from: Pete on 2007.10.24, 16:29:39
Hi Juergen

Are you running dual core cpu?

As mentioned in my previous post cupsd.exe crashes when accessing the browser admin interface if both cpu cores are On.

Use the CPU Monitor (in Desktop -> Utils) to turn Off CPU2 while using the browser admin; turn On after.

Ok, thank you. Yes it's a Dual Core (Athlon64 X2 3800+ EE) so this hint may help.
Another option that should help is marking cupsd.exe as Single Processor app using EXECMODE:
EXECMODE -sp cupsd.exe

[UPDATE]
I did try EXECMODE but it's still crashing when I want to continue after I entered the URI of the printer queue.

If it's crashing on SMP systems there seems to be some kind of race condition.
Title: Re: CUPS???
Post by: Paul Smedley on 2007.10.25, 06:20:33
Hi Guys,

Quote from: Pete on 2007.10.24, 16:29:39
Are you running dual core cpu?

Note that I don't really understand why this is an issue - almost all of my testing is done on an Athlon X2 6000+ with both cores enabled with ACPI.

Cheers,

Paul.
Title: Re: CUPS???
Post by: RobertM on 2007.10.25, 06:58:31
Hey Paul,

I dont know if this is related, but I have a copy of ffMPEG which, only on certain files, crashes... but only on my Athlon 1100 system. On my Xeon based system (which is 4 CPU) it finishes with no crash. Is either issue possibly due to some incompatible optimization in the app or libraries?
Title: Re: CUPS???
Post by: Pete on 2007.10.25, 18:00:34
Quote from: Paul Smedley on 2007.10.25, 06:20:33
Hi Guys,

Quote from: Pete on 2007.10.24, 16:29:39
Are you running dual core cpu?

Note that I don't really understand why this is an issue - almost all of my testing is done on an Athlon X2 6000+ with both cores enabled with ACPI.
Cheers,

Paul.



Hi Paul

I was running a single core amd64 3000+ and cupsd.exe never crashed. Early builds had a very slow browser response measured in minutes when trying to access any webpages but the more recent releases worked very well.

I upgraded the cpu to amd64 3800+ and upgraded to the latest CUPS build at about the same time - well, had to get acpi working 1st but within a day or so.

My 1st attempt at using the new cpu and CUPS browser admin at the same time resulted in the main CUPS  webpage appearing successfully but any attempt to open any other webpage resulted in an unable to connect message.

I backleveled the CUPS installation without getting rid of the problem that did *not* exist prior to upgrading the CPU and installing ACPI.

That is when I discovered there is a problem with DualCore CPUs and CUPS as the browser admin that had worked fine now crashed cupsd.exe

Note: This is not an occasional crash of cupsd.exe - this crash happens every time the browser admin is used.


This is easily reproduced here: open the CUPS browser admin and attempt to "admin" the printer. Goodbye cupsd.exe...

If I use the CPU Monitor to Turn Off CPU2 there is no problem with accessing the CUPS browser admin at all.

Turn CPU2 back On, access the CUPS browser admin and Goodbye CUPS.


Therefore there is an issue but I do not know if it is ACPI version related.

I am limited to the ACPI 2.22 package as I do not have a current eCS Software Subscription; mine ran out shortly after eC2beta3 which is where I have "lifted" ACPI support from.

Maybe later ACPI builds work OK - shame Juergen does not mention which version of ACPI he is using.

Presumably you are using a more current build of ACPI?

Regards

Pete



Title: Re: CUPS???
Post by: Pete on 2007.10.25, 19:17:34
Quote from: kdxensen on 2007.10.23, 01:52:52
Hi all,
I've used os/2 since v2.0 and am a loyal fan... I'm delighted to watch the cups project but so far I have not been able to connect to my printers. I am able to use cups for my hp color laserjet 2600n under linuz. There is a ppd for this printer. I'm wondering if I can use this ppd under cups/eCS.

I have followed the readme.os2 and much is still hazy to me but I enjoy tinkering... I'm just not very smart.

The examples in the readme are for 2 printers of which I have neither. I'd hoped to use the examples as "models" for my own printers to no avail...yet.  Am I correct in assuming that I can use this syntax for my printers? Both of my printers are connected thru the lan... the 2600n has a lan interface built in. The other printer is an hp Photosmart 8250 connected to a Trendnet print server.

-Ken


Hi Ken

I think the HP CL 2600n may already be supported by "native" OS/2 printer drivers - postscript and maybe pcl drivers. I have not spotted a driver specific to that model but have seen some discussions about it over the past year(s) so suggest you use Google to discover which driver to use.

If I am wrong you may be able to add the PPD file to the OS/2 postscript driver; have a look at my previous post for a few details on this.


As regards setting up CUPS on OS/2: the readme does indeed have a couple of examples. I could add 1 or 2 more...

[H:\cups\sbin]lpadmin -p HP2250 -E -v lpd://192.168.2.1/lpt1 -m gutenprint/5.1/en_gb/stp-hp-bij_2250.5.1.ppd.gz

[H:\cups\sbin]lpadmin -p PIXMA -E -v lpd://192.168.2.1/lpt1 -m gutenprint/5.1/en_gb/stp-bjc-iP4000.5.1.ppd.gz


And attempt an explanation (from a lack of knowledge)...

I have a command window open in directory [H:\cups\sbin] which is where lpadmin, used to create/add a printer, resides

-p creates/adds a printer using the detail provided on the rest of the line:

PIXMA (or HP2250) is a printer name so that you can identify which printer

-E  Not sure about this - I use it because the examples do but I'm sure it has a purpose  :-)

-v device address (I think)
In both my examples the printer is connected to a print server (built into a router) that has the ip address 192.168.2.1 with the printer port being /lpt1

lpd is, possibly, a print to this address command

-m model of printer driver to use
This is the path and filename of the driver to use so you need to spot the driver for the printer in the directory
\cups\share\cups\model\gutenprint\5.1\en_gb\

Note: CUPS seems to be hardcoded for some parts of the paths involved so when using the -m switch CUPS automatically starts from \cups\share\cups\model\

Please feel free to reverse the slashes if it helps  :-)


Of course, before trying to create a CUPS printer you should have:-

copied libcups.dll to somewhere on the LIBPATH - either \ecs\dll or \os2\dll are the usual places
installed the libc063 support files to the same location
started \cups\sbin\cupsd.exe


Hopefully the above will get you started.

Regards

Pete



Title: Re: CUPS???
Post by: Saijin_Naib on 2007.10.25, 23:08:30
I found a Mac OSX PPD driver pack that includes my HP PSC 1210xi, you are saying that if I can get that PPD file, I may be able to import it for use under OS/2?
Please help!
Title: Re: CUPS???
Post by: Pete on 2007.10.26, 02:48:41
Quote from: Saijin_Naib on 2007.10.25, 23:08:30
I found a Mac OSX PPD driver pack that includes my HP PSC 1210xi, you are saying that if I can get that PPD file, I may be able to import it for use under OS/2?
Please help!


Hi

Yes - but "may be able to" is the important phrase.

Secondly, as the above printer is not a postscript printer it would not work if you just import the PPD file, the above PPD file would also need some support files to provide postscript to raster capability so that postscript output actually gets printed on the raster printer.

This is where CUPS comes in.

The psc1210 is probably supported by CUPS - I cannot see a driver file for it at a quick glance but I would take a guess that 1 of the many psc_xxx ppd files included also supports the 1210.

CUPS includes the necessary ps to raster filter(s) required to produce output at the printer.

To be able to use CUPS as the printing system on an OS/2 based system it is necessary to

1] create and test a CUPS printer - the readme gives a few examples

2] add the PPD file - either the CUPS or Mac version - to the OS/2 pscript.drv and create a Printer Object.

3] adjust Properties of OS/2 Printer Object; it needs to print through the eCUPS output port - this sends the output from the OS/2 printer to the CUPS printing system.


I'm going to refer you to my earlier post for more details on how to achieve the above.

You may have to email Paul (CUPS porter) to find out where a package called gccpin.zip is available for download as it contains an updated pin.exe which you need to add the PPD file to the OS/2 pscript.drv


Yes, the above does work here with a Canon PIXMA iP4000 connected to a print server.

I gather there are some additional tricks required to get USB connected printers to work but the readme has some brief instructions.

Have fun  :-)

Pete


Title: Re: CUPS???
Post by: Saijin_Naib on 2007.10.26, 03:08:22
Oh boy. This should be exciting, I tried to get cups set up right but  ???
Hopefully this time around I can get somewhere :P
Title: Re: CUPS???
Post by: Paul Smedley on 2007.10.26, 06:24:56
Quote from: Saijin_Naib on 2007.10.25, 23:08:30
I found a Mac OSX PPD driver pack that includes my HP PSC 1210xi, you are saying that if I can get that PPD file, I may be able to import it for use under OS/2?
Please help!

You need more than just the PPD file...... For HP printers there is HPLIP (http://hplip.sourceforge.net/) - which I'll work on once the current issues with CUPS are resolved.

I did make some progress in understanding why the second page fails last night.

The cups changes are supposed to introduce a new switch for Ghostscript - NOMEDIAATTRS - with this switch in pstoraster (which cups uses to invoke ghostscript), ghostscript gives an error.

Trying to understand why now......

Cheers,

Paul.
Title: Re: CUPS???
Post by: Paul Smedley on 2007.10.26, 06:27:22
Quote from: RobertM on 2007.10.25, 06:58:31
Hey Paul,

I dont know if this is related, but I have a copy of ffMPEG which, only on certain files, crashes... but only on my Athlon 1100 system. On my Xeon based system (which is 4 CPU) it finishes with no crash. Is either issue possibly due to some incompatible optimization in the app or libraries?

It could be CPU optimisation related - IIRC correctly, the ffmpeg build process tries to identify the CPU on which it's running to set appropriate optimisations  (in my case Athlon64 X2 processors).  It possible sets some CPU instructions that a plain Athlon doesn't support (SSE?)

If it's a real problem - I could look at different optimisation levels for better compatability.

Cheers,

Paul.
Title: Re: CUPS???
Post by: magog on 2007.10.26, 13:23:28
Quote from: Pete on 2007.10.25, 18:00:34
Quote from: Paul Smedley on 2007.10.25, 06:20:33
Hi Guys,

Quote from: Pete on 2007.10.24, 16:29:39
Are you running dual core cpu?

Note that I don't really understand why this is an issue - almost all of my testing is done on an Athlon X2 6000+ with both cores enabled with ACPI.
Cheers,

Paul.
[..]
I am limited to the ACPI 2.22 package as I do not have a current eCS Software Subscription; mine ran out shortly after eC2beta3 which is where I have "lifted" ACPI support from.

Maybe later ACPI builds work OK - shame Juergen does not mention which version of ACPI he is using.

Just ask. ;)
Ist ACPI v2.22 as newer Versions (3.00-3.03) are totally messed up...at least if you have an Athlon64 X2.
On the other hand my Core2Duo System wasn't able to boot with ACPI 3.0 (?) from the eCS RC2 CD either.
I'm waiting for the next ACPI version which should be available soon.