Starting with xterm-223-2.fc6.src.rpm, xterm unsets TMPDIR before invoking the shell: $ echo $TMPDIR /tmp/username-j22290 $ export TMPDIR $ echo $TMPDIR /tmp/username-j22290 $ xterm -e 'echo TMPDIR=$TMPDIR; sleep 5' The output that appears in the resulting xterm is: TMPDIR= If I compare the behavior of xterm to gnome-terminal, the only real difference in the environment of the shell is TMPDIR. (The environment variables COLORTERM, PPID, and WINDOWID differ, but that's to be expected.) I don't see any [un]setenv calls in xterm's code, so I suspect some other library call that xterm is using is having a side-effect of unsetting TMPDIR.
Actually, it doesn't matter whether xterm
Dynamic linker is unsetting the variable since the xterm binary has setgid utempter. Without the setgid xterm won't have a record in utmp. But you can put the setting to .bashrc.
*** Bug 243069 has been marked as a duplicate of this bug. ***
This *is* a bug, and should be re-opened as such. "Putting the setting to .bashrc" is a kludgy workaround, not a fix, especially for variables like LD_LIBRARY_PATH which a user might want set for the entire session. In fact, all the documentation recommends *against* setting variables in .bashrc & /etc/bashrc. One better solution would be to use a wrapper script which restores the environment. Is there any way to get records in utmp using e.g. SELinux context rather than group? (Another workaround is to use module-init-tools and add "module update" to /etc/bashrc).
The problem was recently discussed at fedora-devel list. A request against libutempter to drop the setgid requirement is filed at bug #246063.
*** Bug 296131 has been marked as a duplicate of this bug. ***
xterm-231-1.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update xterm'
xterm-231-1.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update xterm'
xterm-231-1.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.
xterm-231-1.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.