[X2Go-User] x2go overwrites LD_LIBRARY_PATH

Henry hjs4int at live.com
Fri Mar 11 07:07:44 CET 2016


> LD_LIBRARY_PATH is set in a script in /etc/profile.d because this is a 
> system wide configuration and it needs to be performed once per login. 
> Using ssh to remote login, LD_LIBRARY_PATH is correct:
> 
> echo $LD_LIBRARY_PATH
> /usr/lib/fsl/5.0
> 
> When I login using x2go, LD_LIBRARY_PATH seems to be reset and contains 
> only the entries regarding x2go:
> 
> echo $LD_LIBRARY_PATH
> /usr/lib/nx/X11/Xinerama:/usr/lib/nx/X11

Hi Thomas,

You posted a month ago, so I hope you've already found a fix.  I'm 
responding anyway, if anything for future-me, as I just encountered this 
problem, troubleshot it, and then realized that I ran into the same thing a 
few years ago the last time I installed x2go.


> My guess is that there is probably an error in /usr/bin/x2goruncommand, 
> along these lines:
> 
> test -n "$LD_LIBRARY_PATH" && \
>    LD_LIBRARY_PATH="$NX_XINERAMA_LIBS:$NX_LIBS:$LD_LIBRARY_PATH" || \
>    LD_LIBRARY_PATH="$NX_XINERAMA_LIBS:$NX_LIBS"
> "$X2GO_LIB_PATH/x2gosyslog" "$0" "debug" "exporting 
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
> export LD_LIBRARY_PATH


The lines that you excerpted from x2goruncommand are correct.  The problem 
is that your profile(s) isn't being run because bash isn't being invoked as 
a login shell.  There are a number of fixes for this; see:

     https://bugzilla.redhat.com/show_bug.cgi?id=1038834

My fix of choice is to change the first line of /usr/bin/x2goruncommand to:

     #!/bin/bash -l

That's it!  Just add a space and two characters!  This probably violates 
all sorts of shell and X propriety, but I pretty much always use x2go to 
run full desktop sessions, so this has the desired effect for me.

Best regards,
H


Thomas Stephan <Thomas.Stephan at ...> writes:

> I am using x2go to connect to machines running Ubuntu 14.04.3 LTS. I had 
> trouble running commands that rely on finding libraries via the 
> environment variable LD_LIBRARY_PATH.

> 





More information about the x2go-user mailing list