← Back to team overview

ubuntu-x-swat team mailing list archive

[Bug 380360] [NEW] X.Org session start (via xinit) loses LD_LIBRARY_PATH

 

Public bug reported:

Binary package hint: x11-common

Some background:
I am working on the Mesa Radeon driver. When testing out Git-based X.Org and Mesa, I keep self-compiled things in their own prefix (contained in my home directory) because I want to keep Ubuntu-supplied packages clean. To test things, I shutdown GDM and start X manually. However, I want to keep as much of the default Ubuntu *client* aspects the default, so I start via xinit (passing a sudo-wrapper for the X server and setting environment variables as appropriate).

In particular, I need to set LD_LIBRARY_PATH, as otherwise clients will
not find the right libGL.so.

Expected behaviour would be that the environment with which I call xinit
is the environment that clients in the session will see.

However, this is not the case, because ssh-agent (which is setuid) is
indirectly a parent of all clients.

I worked around this by adding a small script to /etc/X11/Xsession.d, which essentially is just:
  STARTUP="/usr/bin/env LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${STARTUP}"
before the script that adds the ssh-agent (I guess it would make more sense to put this into the script that adds the ssh-agent to $STARTUP, but I didn't want to change any files installed by packages).

I realize that I'm as fringe a usecase as you can be, but since this is
*really* surprising behaviour, took me about two hours to figure out
(just digging to what happens at X session startup takes a long time if
you've never done it), and is quite simple to fix,so I'd appreciate it
if you considered fixing this.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: xorg 1:7.4~5ubuntu18
ProcEnviron:
 LANGUAGE=
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
SourcePackage: xorg
Uname: Linux 2.6.28-11-generic i686

** Affects: xorg (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386

-- 
X.Org session start (via xinit) loses LD_LIBRARY_PATH
https://bugs.launchpad.net/bugs/380360
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.



Follow ups

References