Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Environment variables< Next Oldest | Next Newest >
gunter Offline





Group: Members
Posts: 4
Joined: Aug. 2006
Posted: June 01 2007,14:20 QUOTE

Hello,

Im trying to initialize an application after X starts. To do this, I have to set LD_LIBRARY_PATH. Now I have two questions:

Where can i set the variable so that it is available whenever  i reboot?

And the app? I tryed the .xinitrc but dont work!

Thanks!
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: June 01 2007,16:29 QUOTE

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
Back to top
Profile PM WEB 
1 replies since June 01 2007,14:20 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Environment variables

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code