mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: June 01 2007,16:29 |
|
The LD_LIBRARY_PATH variable can be set at any time between your login and the time the application that requires it is run. It would probably be most convenient to set it just before running the application that needs it, just for the sake of being organized.
There is a particular way to start applications from .xinitrc, particularly in DSL due to its use of multiple window managers. There is a "case" block in .xinitrc that controls which window manager is started. If you want an application to load in X, it must start before that part of .xinitrc runs. The command to start your application should also be followed by "&" to allow .xinitrc to continue and complete the X startup.
Here's an example:
Code Sample | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/something/lib" my_application & case "$DESKTOP" in ..... |
another example:
Code Sample | LD_LIBRARY_PATH=/opt/something/lib my_application & case "$DESKTOP" in ..... |
The first example exports LD_LIBRARY_PATH, including any paths that may already exist in the variable, so it is available to all applications run from X, unless the variable is again changed for use in a child shell.
The second example sets LD_LIBRARY_PATH only for my_application
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|