Bug 60983
Summary: | doesn't handle CUPS | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | Bernhard Rosenkraenzer <bero> | ||||
Component: | printconf | Assignee: | Tim Waugh <twaugh> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Ben Levenson <benl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 1.0 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2002-08-24 09:59:56 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Bernhard Rosenkraenzer
2002-03-11 11:37:48 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). 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. :-) 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? I think so, yes. Go ahead and try it out: usermode didn't do what I expected it to when I tried this. 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 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'. Created attachment 48384 [details]
It didn't work (see?). Here's the patch I tried. I can't figure out what's wrong.
*** Bug 70885 has been marked as a duplicate of this bug. *** *** Bug 72454 has been marked as a duplicate of this bug. *** redhat-config-printer 0.6.x handles CUPS. *** Bug 75981 has been marked as a duplicate of this bug. *** |