Description of problem: xfig ignores the arguments on the command line Version-Release number of selected component (if applicable): xfig-3.2.4-17.2.i386 How reproducible: try any argument, e.g. xfig -help, xfig does not list help Steps to Reproduce: 1. % xfig -help 2. 3. Actual results: starts xfig window Expected results: show print the help Additional info: The Reason is that in FC5 (at least xfig-3.2.4-17.2), /usr/bin/xfig is a shell wrapper which sets env and then calls "exec /usr/bin/xfig.bin" without copying the command line arguments. To correct, apply the following patch: --- /usr/bin/xfig.DIST 2006-02-12 19:59:07.000000000 +0100 +++ /usr/bin/xfig 2006-06-04 19:48:26.000000000 +0200 @@ -1,4 +1,4 @@ #! /bin/sh export XAPPLRESDIR=/usr/share/X11/app-defaults export LANG=${LANG%.UTF-8} -exec /usr/bin/xfig.bin +exec /usr/bin/xfig.bin "$@"
Sorry, my path is not sufficient, as the binary xfig seems to ignore the arguments if its name is not xfig (in fc5, the it is xfig.bin) This is shown by trying xfig -metric: the display is still in inches. So a full correction is the following 1/ Put the ELF binary in some directory with name xfig, for example /usr/libexec/xfig 2/ Apply this patch --- /usr/bin/xfig.DIST 2006-02-12 19:59:07.000000000 +0100 +++ /usr/bin/xfig 2006-06-04 20:11:08.000000000 +0200 @@ -1,4 +1,4 @@ #! /bin/sh export XAPPLRESDIR=/usr/share/X11/app-defaults export LANG=${LANG%.UTF-8} -exec /usr/bin/xfig.bin +exec /usr/libexec/xfig "$@" PS : the bug in xfig is explicitely said to be fixed in the source of xfig! cf. the CHANGE file in source rpm: o If xfig was renamed to anything else, the command-line arguments and X resources weren't parsed by the Intrinsics. This is fixed.
A other solution for the bug is to force the application name in the wrapper, that is: 1/ leave the ELF binary as /usr/bin/xfig.bin 2/ Apply this patch --- /usr/bin/xfig.DIST 2006-02-12 19:59:07.000000000 +0100 +++ /usr/bin/xfig 2006-06-05 13:48:20.000000000 +0200 @@ -1,4 +1,5 @@ #! /bin/sh export XAPPLRESDIR=/usr/share/X11/app-defaults export LANG=${LANG%.UTF-8} -exec /usr/bin/xfig.bin +export RESOURCE_NAME=xfig +exec /usr/bin/xfig.bin "$@"
I was still trying to correct the binray itself, but it seems complicated, so I submit a bug report to xfig I found an other simpler solution as the wrapper is using bash: use the -a option of exec to force the command name ==> 1/ leave the ELF binary as /usr/bin/xfig.bin 2/ Apply this patch --- /usr/bin/xfig.DIST 2006-02-12 19:59:07.000000000 +0100 +++ /usr/bin/xfig 2006-06-05 16:14:40.000000000 +0200 @@ -1,4 +1,4 @@ #! /bin/sh export XAPPLRESDIR=/usr/share/X11/app-defaults export LANG=${LANG%.UTF-8} -exec /usr/bin/xfig.bin +exec -a xfig /usr/bin/xfig.bin "$@"
xfig from rawhide does not use the wrapper anymore. I will build new xfig for FC5 update soon. Thanks for your report.