Re: [gdm-list] gdm doesn't use /etc/ libraries.

On Fri, Sep 26, 2008 at 7:05 AM, Ray Strode <halfline gmail com> wrote:
> Hi,
>> I use Mathematica together with my image-processing library what means
>> that I call
>> functions of this lib out of the Mathematica frontend. The library
>> itself depends on several libs (some of them in my home/lib) which are
>> either known by the system or which were made visible with
>> the /etc/ and the ldconfig tool.
>> When I start Mathematica from a console everything works fine (notice: I
>> have not set the LD_LIBRARY_PATH variable). Starting Mathematica by an
>> gdm-application launcher and my image-tools don't work. One solution is
>> to set the LD_LIBRARY_PATH in my or in the system-wide .profile file
>> which is read by gdm.
> What do you mean by gdm-application launcher?  Do you mean a GNOME
> panel launcher?
>> Is there a reason why gdm doesn't use the ldconfig settings?
> You're probably seeing a bug similar to this old issue:
> What distro are you running?
> When you log in on some distros gdm ends up running something like:
> exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"$1\""
> where $SSH_AGENT is /usr/bin/ssh-agent $SHELL is usually /bin/bash and
> $1 is usually gnome-session
> The problem is /usr/bin/ssh-agent is setgid for security reasons which
> means libc will strip out any variables starting with LD_ before
> running it (LD_ variables have the ability to alter how the program
> would execute)
> The solution is to fix the Xsession file to invoke ssh-agent using
> it's alternate syntax
> eval `ssh-agent -s`

One problem with doing this is that ssh-agent will reparent to pid 1,
which means it won't reaped when the session ends. This essentially
means that `ssh-agent -k' needs to be run when the session completes.
Last time I checked, there was no straightforward way to run commands
at the end of the session, mostly because we exec the session process.
That means you'd have to add the command somewhere in gnome-session or
.bash_logout or something.

> Alternatively you could throw the LD_ variables over the ssh-agent
> wall with env, like:
> exec $SSH_AGENT /usr/bin/env LD_LIBRARY_PATH=$LD_LIBRARY_PATH /bin/sh
> -c "exec -l $SHELL -c \"$1\""
> Anyway, if this is the problem you're seeing, then you should file
> this issue with your distro (or upgrade your distro if it's old and
> might already be fixed)

In this case, though, he's talking about having the library path in, not in LD_LIBRARY_PATH.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]