Bug 508739

Summary: xvfb-run <command> errors out with: "mktemp: too few X's in template `Xauthority'"
Product: [Fedora] Fedora Reporter: Lorand Bruhacs <nahuaque>
Component: xorg-x11-serverAssignee: Adam Jackson <ajax>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: kengert, mcepl, olesen, orion, psabata, xgl-maint
Target Milestone: ---Keywords: EasyFix, Patch, Reopened, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-14 16:06:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lorand Bruhacs 2009-06-29 17:15:25 UTC
Description of problem:

xvfb-run fails to create temporary Xauthority file due to mktemp incompatibility.

Version-Release number of selected component (if applicable):

xorg-x11-server-Xvfb-1.6.1.901-1.fc11.x86_64
coreutils-7.2.1.fc11.x86_64

How reproducible:

e.g.
$ xvfb-run /usr/local/bin/flashplayer

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Matěj Cepl 2009-06-30 08:43:02 UTC
Yes, this just cannot work:

# If the user did not specify an X authorization file to use, set up a temporary
# directory to house one.
if [ -z "$AUTHFILE" ]; then
    XVFB_RUN_TMPDIR="${TMPDIR:-/tmp}/$PROGNAME.$$"
    if ! mkdir -p -m 700 "$XVFB_RUN_TMPDIR"; then
        error "temporary directory $XVFB_RUN_TMPDIR already exists"
        exit 4
    fi
    AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority)
fi

-- 
testing signature

Comment 2 Kai Engert (:kaie) (inactive account) 2009-08-20 06:57:44 UTC
Matej, I ran into the same problem but I don't understand how your proposal can work.

I ran the commands in your script manually, but when mktemp command gets executed, it still complains with the very same error message "to few X in template". This is because mktemp seems to expect a filename template that contains mutliple XXX in order to replace them with the temporary name.

So, but your hint towards Xauthority was helpful.

I ran
  xvfb-run --help
and saw that one can manually specify a file.

I used

  xfvb-run -f /tmp/any-filename-for-xauthority run-my-command

and that works for me.

Comment 3 Orion Poplawski 2009-09-09 03:48:01 UTC
Should be:

    XVFB_RUN_TMPDIR="${TMPDIR:-/tmp}/$PROGNAME.XXXXXXXXXX"

or some such.

Comment 4 Matěj Cepl 2009-11-05 18:33:27 UTC
Since this bugzilla report was filed, there have been several major updates in various components of the Xorg system, which may have resolved this issue. Users who have experienced this problem are encouraged to upgrade their system to the latest version of their packages. For packages from updates-testing repository you can use command

yum upgrade --enablerepo='*-updates-testing'

Alternatively, you can also try to test whether this bug is reproducible with the upcoming Fedora 12 distribution by downloading LiveMedia of F12 Beta available at http://alt.fedoraproject.org/pub/alt/nightly-composes/ . By using that you get all the latest packages without need to install anything on your computer. For more information on using LiveMedia take a look at https://fedoraproject.org/wiki/FedoraLiveCD .

Please, if you experience this problem on the up-to-date system, let us now in the comment for this bug, or whether the upgraded system works for you.

If you won't be able to reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you.

[This is a bulk message for all open Fedora Rawhide Xorg-related bugs. I'm adding myself to the CC list for each bug, so I'll see any comments you make after this and do my best to make sure every issue gets proper attention.]

Comment 5 Orion Poplawski 2009-11-05 22:04:42 UTC
This is still an issue.  Fix is in the bug report - should be simple.

Comment 6 olesen 2010-04-15 18:43:26 UTC
Still an issue in FC12 using coreutils-7.6-9.fc12.i686 

Thanks Orion for the "some such!"

the actual edit (vi `which xvfb-run`) is 2 lines down : 

- AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority)
+ AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority.XXXXXXXX)

Comment 7 Bug Zapper 2010-04-27 15:21:02 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Bug Zapper 2010-06-28 13:22:36 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Matěj Cepl 2010-08-20 17:20:25 UTC
Still alive and well in xorg-x11-server-Xvfb-1.8.99.906-2.fc14.x86_64

Comment 10 Matěj Cepl 2010-09-14 16:06:44 UTC

*** This bug has been marked as a duplicate of bug 544036 ***