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:
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. ***