After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 491488 - GTK_PRINT_PREVIEW_COMMAND
GTK_PRINT_PREVIEW_COMMAND
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: Printing
2.12.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
: 505453 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-29 19:02 UTC by Morten Welinder
Modified: 2009-04-13 00:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2007-10-29 19:02:51 UTC
From gtk+-2.12.0/gtk/Makefile.am:

GTK_PRINT_PREVIEW_COMMAND="evince --unlink-tempfile --preview --print-settings %s %f"

Not all evince versions support --print-settings.  That results in
totally broken preview, see Debian b-u-g 448445:

http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/4ba028f5204c1629/e76a6add379d3f5e?hl=en&lnk=st&q=gnumeric#e76a6add379d3f5e

Either --print-settings should not be used, or else configure should check
if evince supports it.  The latter is only a partial solution as the compilation
evince might be different from the run-time evince.

Personally I have setup a wrapper.  gtk+ could use something like that.




#!/usr/bin/perl -w

my @argv;
my @unlink = ();
my $unlink;

while (@ARGV) {
	my ($arg) = shift @ARGV;
	# print STDERR "[$arg]\n";

	if ($arg eq '--print-settings') {
	    my $fn = shift @ARGV;
	    push @unlink, $fn;
	    next;
	}

	if ($arg eq '--unlink-tempfile') {
	    $unlink = 1;
	}

	if ($arg !~ /^--/) {
	    push @unlink, $arg;
	}

	push @argv, $arg;
}

my $bin;
foreach ("/usr/bin/evince", "/opt/gnome/bin/evince") {
    if (-x $_) {
	$bin = $_;
	last;
    }
}
die "$0: No proper evince found.\n" unless $bin;

my $res = system ($bin, @argv);

unlink @unlink if $unlink;

exit $res;
Comment 1 Claudio Saavedra 2008-02-25 17:09:38 UTC
*** Bug 505453 has been marked as a duplicate of this bug. ***
Comment 2 Matthias Clasen 2008-08-15 18:18:01 UTC
It is really the responsibility of the distribution to ship with defaults that work...