Bug 60983 - doesn't handle CUPS
doesn't handle CUPS
Product: Red Hat Raw Hide
Classification: Retired
Component: printconf (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
: 70885 72454 75981 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2002-03-11 06:37 EST by Bernhard Rosenkraenzer
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-08-24 05:59:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
It didn't work (see?). Here's the patch I tried. I can't figure out what's wrong. (3.45 KB, patch)
2002-03-13 07:41 EST, Tim Waugh
no flags Details | Diff

  None (edit)
Description Bernhard Rosenkraenzer 2002-03-11 06:37:48 EST
Description of Problem:

Version-Release number of selected component (if applicable):

How Reproducible:

Steps to Reproduce:

Actual Results:

Expected Results:

Additional Information:
Comment 1 Bernhard Rosenkraenzer 2002-03-11 06:39:28 EST
Printconf needs to do the right thing if CUPS rather than LPRng is being used: 
If CUPS is running (preferred check: see if anything is running on localhost:631), it 
should just call "htmlview http://localhost:631" instead of bringing up the normal 
printconf. (Both for X11 and text mode - the CUPS admin interface works nicely with lynx 
and htmlview handles that). 
Comment 2 Tim Waugh 2002-03-11 06:53:24 EST
The tricky thing is making PAM happy when you have

  user                                      root
tool [check :631]
  /usr/bin/real-tool [console.apps]
                                     `-->  /usr/sbin/tool

I couldn't convince PAM to do the right thing when I tried.  Patches welcome. :-)
Comment 3 Bernhard Rosenkraenzer 2002-03-11 06:57:46 EST
Since the cups admin tool doesn't need to be run as root (uses its own authentication,   
like any web based tool must), I'd suggest:   
if checkcups; then   
	exec htmlview http://localhost:631/   
	exec printconf-lprng   
Where only printconf-lprng uses consolehelper. 
Am I overlooking any problems with this?
Comment 4 Tim Waugh 2002-03-11 07:28:12 EST
I think so, yes.  Go ahead and try it out: usermode didn't do what I expected it
to when I tried this.
Comment 5 Bernhard Rosenkraenzer 2002-03-11 07:47:51 EST
You probably forgot to rename the pam config files...   
This (ugly) patch to the spec file does the trick for me:   
--- SPECS/printconf.spec.cups   Mon Mar 11 14:33:44 2002 
+++ SPECS/printconf.spec        Mon Mar 11 14:33:50 2002 
@@ -56,6 +56,21 @@ 
 cp /etc/printcap /etc/printcap.save 
+for i in printtool printconf-gui printconf-tui; do 
+       mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/$i-LPRng 
+       mv $RPM_BUILD_ROOT%{_sbindir}/$i $RPM_BUILD_ROOT%{_sbindir}/$i-LPRng 
+       perl -pi -e "s,$i,$i-LPRng,g" 
+       mv $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/$i 
+       mv $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/$i 
+       cat >$RPM_BUILD_ROOT%{_bindir}/$i <<EOF 
+if ls -l /etc/alternatives/print |grep q cups; then 
+       exec htmlview http://localhost:631/ 
+exec $i-LPRng 
+       chmod +x $RPM_BUILD_ROOT%{_bindir}/$i 
 rm -rf $RPM_BUILD_ROOT 
Comment 6 Tim Waugh 2002-03-11 07:52:58 EST
Okay, I'll take another look.  BTW, 'ls -l /etc/alternatives/print |grep q cups'
is not just ugly but wrong.  ITYM 'test `/usr/sbin/alternatives --display print
| grep currently | cut -d. -f2` = cups'.
Comment 7 Tim Waugh 2002-03-13 07:41:49 EST
Created attachment 48384 [details]
It didn't work (see?).  Here's the patch I tried.  I can't figure out what's wrong.
Comment 8 Tim Waugh 2002-08-06 13:40:47 EDT
*** Bug 70885 has been marked as a duplicate of this bug. ***
Comment 9 Tim Waugh 2002-08-24 05:59:51 EDT
*** Bug 72454 has been marked as a duplicate of this bug. ***
Comment 10 Tim Waugh 2002-10-11 12:01:42 EDT
redhat-config-printer 0.6.x handles CUPS.
Comment 11 Tim Waugh 2002-10-15 12:19:48 EDT
*** Bug 75981 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.