sorry pressed enter before entering all the bug info... When I open a pdf file with xpdf and click print, the "Print with command:" text box is empty. This is annoying because I'd rather it said "lpr" so I didn't have to type that every time. From reading the man pages for xpdf and xpdfrc I should be able to put the following in my .xpdfrc (or the system wide /etc/xpdfrc): psFile "|lpr" But that doesn't work for me (nothing shows up in either the "Print with command:" or "Print to file:" textboxes. I've read the source code (starting at line 2208 of XPDFViewer.cc) that should handle this stuff: //----- initial values if ((psFileName = globalParams->getPSFile())) { if (psFileName->getChar(0) == '|') { XmTextFieldSetString(printCmdText, psFileName->getCString() + 1); } else { XmTextFieldSetString(printFileText, psFileName->getCString()); } delete psFileName; } Can someone check if their system also behaves like this or not? I'm running xpdf-3.00-r1 on ~x86, emerge info follows: Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040619-r0, 2.4.26) ================================================================= System uname: 2.4.26 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.5.1 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d aalib alsa apm arts berkdb cdr cjk crypt cups dga directfb dvd emacs encode esd f77 faad fbcon fftw flac gcj gdbm gif gimpprint ginac gnome gphoto2 gpm gstreamer gtk gtk2 guile imlib jack java jpeg ldap leim libg++ libwww lirc live mad matroska mikmod mmx mng motif mozilla moznocompose moznoirc moznomail mozsvg mpeg mule mysql nas ncurses nls objc offensive oggvorbis opengl oss pam pdflib perl plotutils png ppds python qhull qt quicktime radeon readline scanner sdk sdl slang speex spell sse ssl svg tcltk tcpd tetex theora tiff truetype usb v4l video_cards_radeon wxwindows x86 xinerama xml xml2 xmms xosd xv xvid zlib"
works fine here with psFile "|lpr"
Ok I've isolated the problem. I have export LC_CTYPE="zh_CN" in my .bash_profile (so I can use SCIM). If I export LC_CTYPE="" then xpdf shows the print command correctly. This page gave me the idea that it was related to LC stuff... (I don't speak/read japanese but I'm assuming it explains it): http://www.k.ctrl.titech.ac.jp/~sun/diary/ (grep for LANG) Unsetting LC_CTYPE also got rid of the pages and pages of warnings like the following: Warning: Name: Text Class: XmTextField Character '\167' not supported in font. Discarded. I guess its unlikely this is a gentoo bug... more likely a motif problem. I will try to confirm that the same problem happens on my slackware box. Maybe lesstif would work better too... Anyway, if anyone cares, here's how to reproduce this problem: export LC_CTYPE="" xpdf blah.pdf (note that print command is ok) export LC_CTYPE="zh_CN" xpdf blah.pdf (note that print command doesn't work) Should I mark this CANTFIX or UPSTREAM?
Ok here's a fix: export LD_PRELOAD="/lib/libBrokenLocale.so.1" xpdf blah.pdf read it here: http://www.nr.no/~joachim/Niki/index.php/NeditFaq/bugs (grep for libBrokenLocale) I guess I will make a /usr/local/bin/xpdf which is a shell script: #!/bin/sh export LD_PRELOAD="/lib/libBrokenLocale.so.1" xpdf $1 or maybe rename xpdf to xpdf-binary and make /usr/bin/xpdf the shell script as above. Not much chance of that happening in portage I assume? Btw, I think nedit and possibly other motif apps may have similar problems for users with LC_CTYPE set.
it's obviously a motif bug, so we won't fix it in xpdf
use openmotif-2.2.3
Yes new openmotif fixed it! Excellent.