OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Setup & Installation => Topic started by: Neil Waldhauer on December 25, 2024, 05:55:22 pm

Title: Installing CUPS on MCP
Post by: Neil Waldhauer on December 25, 2024, 05:55:22 pm
Well, the short answer is to install rpm/yum on MCP, then cups.

But I like the interfaces for Printman and Cupswiz. It makes configuring printers so much easier. I can download these from Alex Taylor's website, and, after installing the prerequisites, I can get Printman to start. Cupswiz initially starts with an error in DosLoadModule, but can be corrected by fiddling with UCONV.DLL and friends.

But, after that, Cupswiz comes up empty. I have both cups and hplip installed, but where did the printer models go? (see attached screenshot)

Title: Re: Installing CUPS on MCP
Post by: Martin Iturbide on December 26, 2024, 12:18:04 am
Hello Neil

I experienced a similar thing on ArcaOS 5.1, it used to said "Bad", but it got fixed with magic, I don't know how.

Here it is the thread, sorry it does not help: https://www.os2world.com/forum/index.php/topic,3434.15.html (https://www.os2world.com/forum/index.php/topic,3434.15.html)

Maybe it is that cups daemon is not starting.

Regards
Title: Re: Installing CUPS on MCP
Post by: Pete on December 26, 2024, 05:40:40 am
Hi Neil

Looks like the cups daemon - aka %UNIXROOT%:\usr\sbin\cupsd.exe - is not running.

Do you have the cups daemon in the Startup folder?


Regards

Pete
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on December 26, 2024, 04:01:50 pm
The cups daemon wasn't running. If I start it, and then run cupswiz, I still don't see any printers.

Title: Re: Installing CUPS on MCP
Post by: Alex Taylor on December 27, 2024, 02:46:09 pm
Click on the logo icon on the left of the cupswiz window to bring up the product information. Is the path to CUPS correct?

What does
Code: [Select]
<cupspath>\sbin\lpinfo.exe -m produce?
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on December 27, 2024, 04:20:31 pm
Well, that helps!

Version 1.18

System boot volume: C:
Local CUPS directory: C:\CUPS
Local driver repository: D:\OS2IMAGE

which lpinfo
c:\usr\sbin\lpinfo.exe

lpinfo -m
lpinfo: bad file number

which cupsd
c:\usr\sbin\cupsd.exe

set unixroot
UNIXROOT=C:




Title: Re: Installing CUPS on MCP
Post by: Pete on December 27, 2024, 07:03:48 pm
Hi Neil


lpinfo -m
lpinfo: bad file number



Are you sure cupsd.exe is running? - the above result suggests it is not or possibly lpinfo cannot find a support file.
If you have PMdll installed it might be worth dropping lpinfo.exe onto the PMdll object to see if there are other problems.


Regards

Pete





Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on December 27, 2024, 07:46:25 pm
Thanks, Pete. While running cupsd made no difference to cupswiz, it made a difference for lpinfo.

The output from lpinfo is attached.
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on December 29, 2024, 03:52:12 am
I created an icon in the startup folder to start the CUPS daemon. I gave cupswiz.exe a command line containing the parent cups directory, C:\usr in my case. Now I get a list of printers.

I can select my printer, scan the local network and discover the printer, but when I go to create the printer object, Cupswiz displays an error (see attached). No printer is created.
Title: Re: Installing CUPS on MCP
Post by: Rich Walsh on December 29, 2024, 06:47:53 am
Do you have the 'PSPRINT' driver installed? I believe it provides the list of printers. You can find it on any AOS install DVD at 'x:\CID\SERVER\PRINTPAK\PSPRINT.ZIP'
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on December 30, 2024, 01:14:33 am
I think I have PSPRINT installed. The installation routine does not actually notify you of success or failure. Cups Wiz does select PSPRINT in the screen before the Error.

Here is a fragment of error_log from my attempt to create a printer

Quote
E [29/Dec/2024:16:02:29 +0800] Unable to get hostname: Function not implemented
E [29/Dec/2024:16:06:01 +0800] [CGI] Unable to execute ippfind utility: No such file or directory
E [29/Dec/2024:16:06:27 +0800] [CGI] Unable to execute ippfind utility: No such file or directory
W [29/Dec/2024:16:06:31 +0800] cupsdDoSelect: select() returned 4 (Interrupted system call)... pause and retry select()

Also, CUPSWIZ thinks my local driver repository is D:\OS2IMAGE, while I think it should be C:\OS2\DLL\PSPRINT or maybe C:\OS2\DLL. I don't know how to tell Cups Wiz otherwise.
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on January 03, 2025, 04:55:10 pm
I found Cups Wiz is getting the driver location from OS2.INI

PM_INSTALL
PDR_DIR

Unfortunately, I cannot set a value that evades the syntax error message from VX-REXX. Probably I should look at the source code for Cups Wiz on Net labs.
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on January 06, 2025, 03:37:18 pm
The source code led me to my installation of PSPRINT.DRV. I think I installed it correctly, but when I try to create a printer, PSPRINT adds this to POPUPLOG.OS2

Code: [Select]
01-06-2025  06:28:59  SYS3175  PID 0022  TID 0002  Slot 0042
C:\OS2\PMSPOOL.EXE
c0000005
1ef407c7
P1=00000001  P2=00000007  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00000000  EBX=00535d6c  ECX=1cb80c80  EDX=00000007
ESI=1a34a7f0  EDI=00535ed4 
DS=0053  DSACC=d0f3  DSLIM=7fffffff 
ES=0053  ESACC=d0f3  ESLIM=7fffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1ef407c7  CSACC=d0df  CSLIM=7fffffff
SS:ESP=0053:00535978  SSACC=d0f3  SSLIM=7fffffff
EBP=00535c00  FLG=00012202

PSPRINT.DRV 0002:000107c7
Title: Re: Installing CUPS on MCP
Post by: Alex Taylor on January 15, 2025, 03:52:27 am
You may need to add the path to the correct CUPS install as a parameter to cupswiz.exe.

Regarding the trap, the only thing I can think of is the PSPRINT install is broken somehow. 

If you go into PrintMan and choose File -> Manage presentation drivers, what does the entry for PSPRINT report? In particular the Version and Status columns.  Next, if you double-click on the PSPRINT entry, does it pop up its list of supported printers?
Title: Re: Installing CUPS on MCP
Post by: Roderick Klein on January 16, 2025, 02:05:03 pm
You may need to add the path to the correct CUPS install as a parameter to cupswiz.exe.

Regarding the trap, the only thing I can think of is the PSPRINT install is broken somehow. 

If you go into PrintMan and choose File -> Manage presentation drivers, what does the entry for PSPRINT report? In particular the Version and Status columns.  Next, if you double-click on the PSPRINT entry, does it pop up its list of supported printers?

Alex is installing CUPS in MCP or ECS even worth the trouble ? As I seem to recall the that the postscript driver in ArcaOS has had extensive updates, this also includes PIN.EXE.
A lot of the postscript PPD files with PIN.EXE would just crash because of bad coding.
Is that correct Alex ?

Roderick
Title: Re: Installing CUPS on MCP
Post by: Alex Taylor on January 16, 2025, 02:22:00 pm
Alex is installing CUPS in MCP or ECS even worth the trouble ? As I seem to recall the that the postscript driver in ArcaOS has had extensive updates, this also includes PIN.EXE.
A lot of the postscript PPD files with PIN.EXE would just crash because of bad coding.
Is that correct Alex ?

That's true of the old IBM PSCRIPT driver, but since Neil is installing PSPRINT that should be moot. 
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on January 17, 2025, 04:49:42 am
You may need to add the path to the correct CUPS install as a parameter to cupswiz.exe.

Regarding the trap, the only thing I can think of is the PSPRINT install is broken somehow. 

If you go into PrintMan and choose File -> Manage presentation drivers, what does the entry for PSPRINT report? In particular the Version and Status columns.  Next, if you double-click on the PSPRINT entry, does it pop up its list of supported printers?

I think you are correct about the path to the cups install. If I give CUPSWIZ C:\usr as a parameter, I get a list of printers.

The process goes well until I say create printer, then I get the VX-REXX error shown earlier in the thread.

If I select Manage presentation drivers, then the list is blank. So something is wrong with PSPRINT install.
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on January 17, 2025, 05:26:18 am
I installed PSPRINT using Manage Printers, and now I get an entry in the presentation drivers list.

When I create my printer, I get a new error message; screenshot is attached.
Title: Re: Installing CUPS on MCP
Post by: Remy on January 17, 2025, 05:39:39 am
Do you have the unlock command into path  statement ?
Title: Re: Installing CUPS on MCP
Post by: ivan on January 17, 2025, 09:07:52 am
What printer are you trying to get to work with cups?
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on January 17, 2025, 04:25:49 pm
With unlock.exe provided from HobbesArchive, the printer creation now fails this way. It's an HP Color Laserjet Pro M252, which works pretty well under ArcaOS. My goal is to get Manage Printers, CupsWiz and PSPRINT to work under MCP, and eventually under Warp 4.

(The screen shot says see CupsWiz.L1. Scroll down to the end of CupsWiz.L1 to see the most recent errors.)

I see ArcaOS has a more recent unlock.exe than HobbesArchive.
Title: Re: Installing CUPS on MCP
Post by: Alex Taylor on January 18, 2025, 03:48:48 pm
With unlock.exe provided from HobbesArchive, the printer creation now fails this way. It's an HP Color Laserjet Pro M252, which works pretty well under ArcaOS. My goal is to get Manage Printers, CupsWiz and PSPRINT to work under MCP, and eventually under Warp 4.

(The screen shot says see CupsWiz.L1. Scroll down to the end of CupsWiz.L1 to see the most recent errors.)

It's failing when it attempts to run prntobj.exe to create the WPS printer object and queue.  The error from prntobj.exe should be recorded in cupswiz.l2 (in the same directory as cupswiz.l1). That should tell us which API function call in prntobj actually failed.  (prntobj.exe comes with cupswiz and is installed in the same directory.)

FWIW the exact command it's running should be:
Code: [Select]
prntobj HPCOLOR1 CUPS3 "PSPRINT.HP Color LaserJet M552" "HP Color LaserJet M552"
It seems the actual error code the OS/2 spooler is returning is 5, which is an Access Denied error. I'm not sure what would cause that.

By the way, do make sure that C:\OS2\DLL\PSPRINT\PSPRINT.DRV has all its extended attributes (the output from 'dir' should show about 20Kb of EAs).  In general, printer drivers will break horribly if they lose their EAs, because they contain a lot of essential information.
Title: Re: Installing CUPS on MCP
Post by: Alex Taylor on January 18, 2025, 03:55:38 pm
BTW, one possible problem is that, if your previous actions created a partial but incomplete setup (e.g. a WPS printer object without a print queue, an orphaned print queue without a printer object, or something else along those lines) then I could see the spooler getting upset when it tries to create a new object with the same queue name.

ISTR there was a command-line tool from FaxWorks that could purge broken print configs if the system got into such a state. It might be worth trying that to make sure you're starting clean.
Title: Re: Installing CUPS on MCP
Post by: Tom on January 18, 2025, 07:27:32 pm
ISTR there was a command-line tool from FaxWorks that could purge broken print configs if the system got into such a state. It might be worth trying that to make sure you're starting clean.

You mean prndrv.exe ? Can be found at Hobbes: http://hobbesarchive.com/Home/Download?path=/Hobbes/pub/os2/util/printer/PrnDrv_2000-01-16.zip
Title: Re: Installing CUPS on MCP
Post by: Neil Waldhauer on January 26, 2025, 04:12:03 pm
Well, I tried PRNDRV, and it was unable to fix all the broken parts of my install.

I'm continuing my experiment on my Warp 4 system. The MCP system will be restored to first boot and rebuilt. (Snapshots on VirtualBox make this easy)

I got a little further with Warp 4, but the import of the PPD fails. This is a built-in PPD from hplip installed from Netlabs stable respository.

I thought about the failure, and then ran CUPS.PDR through PMDLL (Because I know a PDR is a kind of EXE). I do this on ArcaOS, and I get UCONV.DLL depending on UCV32.DLL. There is no UCV32 on MCP or Warp 4. Can you help me find a copy of the up-to-date UCONV.DLL and UCV32.DLL?
Title: Re: Installing CUPS on MCP
Post by: Rich Walsh on January 26, 2025, 06:24:35 pm
I thought about the failure, and then ran CUPS.PDR through PMDLL (Because I know a PDR is a kind of EXE). I do this on ArcaOS, and I get UCONV.DLL depending on UCV32.DLL. There is no UCV32 on MCP or Warp 4.

This is *not* the problem. CUPS.PDR does not link to UCONV. It links to PMMERGE which links to UCONV which in turn (on Warp 4.5 at least) links to UCV32. If UCV32 were needed but missing, PMMERGE would have failed to load and your system would have blown up during boot. This is a red hering. Chances are that the Warp 4 version of UCONV doesn't even load UCV32, so it isn't "missing".

What you may be seeing is a flaw(?) in PMDLL. If I run it against the CUPS.PDR on my current boot drive, everything is fine. If I run it against a copy of that file on another boot drive, PMDLL tells me DOSCALL1.DLL can't be found - and that's ridiculous.

To fix the real(?) problem, can't you just use PIN.EXE to manually attach the PPD to the driver?