Bug 60983 - doesn't handle CUPS
Summary: doesn't handle CUPS
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: printconf
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
: 70885 72454 75981 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-11 11:37 UTC by Bernhard Rosenkraenzer
Modified: 2007-04-18 16:40 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-08-24 09:59:56 UTC
Embargoed:


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 12:41 UTC, Tim Waugh
no flags Details | Diff

Description Bernhard Rosenkraenzer 2002-03-11 11:37:48 UTC
Description of Problem:


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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Comment 1 Bernhard Rosenkraenzer 2002-03-11 11:39:28 UTC
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 11:53:24 UTC
The tricky thing is making PAM happy when you have

  user                                      root
tool [check :631]
execs
  /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 11:57:46 UTC
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:   
   
/usr/bin/printconf:   
if checkcups; then   
	exec htmlview http://localhost:631/   
else   
	exec printconf-lprng   
fi   
   
Where only printconf-lprng uses consolehelper. 
 
Am I overlooking any problems with this?

Comment 4 Tim Waugh 2002-03-11 12:28:12 UTC
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 12:47:51 UTC
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 
 /usr/share/printconf/util/import_printtool_queues.py 
 
+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" 
$RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/$i 
+       mv $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/$i 
$RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/$i-LPRng 
+       mv $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/$i 
$RPM_BUILD_ROOT%{_sysconfdir}/pam.d/$i-LPRng 
+       cat >$RPM_BUILD_ROOT%{_bindir}/$i <<EOF 
+if ls -l /etc/alternatives/print |grep q cups; then 
+       exec htmlview http://localhost:631/ 
+fi 
+exec $i-LPRng 
+EOF 
+       chmod +x $RPM_BUILD_ROOT%{_bindir}/$i 
+done 
+ 
 %clean 
 rm -rf $RPM_BUILD_ROOT 
 


Comment 6 Tim Waugh 2002-03-11 12:52:58 UTC
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 12:41:49 UTC
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 17:40:47 UTC
*** Bug 70885 has been marked as a duplicate of this bug. ***

Comment 9 Tim Waugh 2002-08-24 09:59:51 UTC
*** Bug 72454 has been marked as a duplicate of this bug. ***

Comment 10 Tim Waugh 2002-10-11 16:01:42 UTC
redhat-config-printer 0.6.x handles CUPS.

Comment 11 Tim Waugh 2002-10-15 16:19:48 UTC
*** 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.