Set LD_LIBRARY_PATH for applications started from the desktop

This seems like a bug in the application itself. It should have a wrapper script that correctly sets any needed LD_LIBRARY_PATH variables. Be careful when writing such a script, though, since you do not want to have any empty portion of the LD_LIBRARY_PATH string between the colons it uses as path separators. For example, this could result in a bad path, if the variable was empty initially (resulting in a leading empty string before the colon):

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/some/path/for/app"

So, when adding a path, you'll want to test for the empty string first. For example, using shell code:

LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/some/path/for/app

Create a new file /etc/ld.so.conf containing:

# Begin /etc/ld.so.conf
/lib
/usr/lib
/usr/X11R6/lib
# whatever else #

Update the dynamic loader cache by running:

ldconfig