Bug 1010 - default printer for CUPS not recognised by Xprint
Summary: default printer for CUPS not recognised by Xprint
Status: RESOLVED WONTFIX
Alias: None
Product: xprint
Classification: Unclassified
Component: Server: Spooler support: CUPS (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Roland Mainz
QA Contact:
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-07 23:41 UTC by Drew Parsons
Modified: 2011-09-13 12:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Drew Parsons 2004-08-07 23:41:10 UTC
I'm having a field day with CUPS-Xprint bugs today.  Maybe we need a tracking
bug to follow them all?  The tracking bug would also want to link to the earlier
bug about picking up printer capabilities from CUPS, from the CUPS ppd file.

Anyway, this particular Debian bug #229255 (see also #263541) says that the
printer spool's default printer ought to be recognised by Xprint, without having
to separately configure Xprint or set the environment variable XPRINTER.

It might be that this question is relevant to the other printer spools too, not
just CUPS.

Bug #229255 suggests a patch for our /etc/X11/Xsession.d script, which I think I
will include in Debian's version:

--- 92xprint-xpserverlist	2004-01-15 01:22:00.000000000 -0600
+++ mod	2004-01-23 15:34:52.000000000 -0600
@@ -27,4 +27,15 @@
   export XPSERVERLIST
 fi
 
+
+# If no defalt printer is defined, get default printer 
+# from lp system
+if [ -z "$XPRINTER" ]; then
+  if lpstat -d > /dev/null; then
+    PRINTER=`lpstat -d | sed -e 's/^[^:]\+: \(.*\)$/\1/'`
+    SERVER_ARRAY=( $XPSERVERLIST )
+    export XPRINTER="${PRINTER}@${SERVER_ARRAY[0]}"
+  fi
+fi
+
 ##########################         eof       #####################
Comment 1 Drew Parsons 2004-08-11 15:50:55 UTC
By the way, I think this little patch is not adequate on its own.

If there is no default printer defined in CUPS, then lpstat -d returns "no
default printer", and so XPRINTER gets set by this patch to "no default
printer", which isn't much good.

Comment 2 Corbin Simpson 2011-09-13 12:40:09 UTC
Closing WONTFIX because nobody cares about Xprint. Reopen if you plan to address this bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.