Contents LD_LIBRARY_PATH cleared by xterm

Bug #76618 reported by Mike Rochester
4
Affects Status Importance Assigned to Milestone
xterm (Ubuntu)
Invalid
Undecided
Tollef Fog Heen

Bug Description

Binary package hint: xterm

To make shared libraries available locally to programs launched from xterm, it is usual to place

                             export LD_LIBRARY_PATH= path to libraries

in either.bash_profile or .bashrc, or in /etc/profile.

This works in most linux distributions, but not, as often reported, in Debian and Ubuntu. When xterm is launched it wipes LD_LIBRARY_PATH.

In addition xterm ignores additional paths to libraries in /etc/ld.so.conf.

The only way I have found to solve this problem is to place links to libraries in /usr/lib, which is a nuisance.

Does anyone know how to stop xterm doing this?

N.B. gnome-terminal works properly if launched as a login shell.

Revision history for this message
Thomas Dickey (dickey-his) wrote :

Apparently "most" refers to Redhat, using utempter. Otherwise, xterm's
installed setgid. The X libraries (as you should have noted, having
commented "as often reported") for several years have stripped
certain environment variables from setuid and setgid programs.

utempter isn't much of an improvement (read it - or gnome-terminal ;-)

There's other ways to use the linker than by hacking up your filesystem.
Look into rpath, for instance.

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

Rejecting with the reasoning from Thomas.

Changed in xterm:
assignee: nobody → tfheen
status: Unconfirmed → Rejected
Revision history for this message
SimonX200 (simonx200) wrote :

The problem is solved by removing the s-flags from xterm. Why the hack does a user application like xterm s-flags in the first place?

Revision history for this message
Thomas Dickey (dickey-his) wrote : Re: [Bug 76618] Re: Contents LD_LIBRARY_PATH cleared by xterm

On Sun, 10 May 2009, SimonX200 wrote:

> The problem is solved by removing the s-flags from xterm. Why the hack
> does a user application like xterm s-flags in the first place?

xterm could be installed (and configured...) for systems that use setuid,
setgid. setuid is rarely used now (was mainly for pre-Unix98 ptys).
setgid is generally used to provide utmp access for systems without the
utempter library.

(even when utempter is used, some packagers have odd environments that
confuse the configure script).

> --
> Contents LD_LIBRARY_PATH cleared by xterm
> https://bugs.launchpad.net/bugs/76618
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.