LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
LinkBack Search this Thread
Old 10-01-2011, 10:38 PM   #1
snowweb
Member
 
Registered: May 2008
Distribution: Ubuntu12, CentOS6
Posts: 61

Rep: Reputation: 0
LD_LIBRARY_PATH added to .bashrc but only works if apps launched from terminal


The Firefox extension for integration with kwallet requires me to add the following to my path variables:

Code:
# Added by Peter on 10/01/11 to make the firefox extension for kde-wallet work.
LD_LIBRARY_PATH=/usr/lib/kde4/libkdeinit:/usr/lib/xulrunner-1.9.2.23
export LD_LIBRARY_PATH
I have therefore added the above code to my .bashrc file, which solves the problem when Firefox is launched from the command line, however, this is not ideal because if I launch a website from a link in an external application, then kwallet won't work with it.

What is the solution please?

Kind regards,

Peter

OS: Ubuntu 10.10
Desktop: KDE 4
Browser: Firefox 7
Kernel: 2.6.35-30-generic
kwallet extension ver: 0.12
 
Old 10-02-2011, 03:41 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,389

Rep: Reputation: 97
I'm not completely sure but I think you better export the variable in your ~/.profile file. Then it should be read at login time.

Last edited by j-ray; 10-02-2011 at 03:43 AM.
 
Old 10-02-2011, 11:59 AM   #3
snowweb
Member
 
Registered: May 2008
Distribution: Ubuntu12, CentOS6
Posts: 61

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by j-ray View Post
I'm not completely sure but I think you better export the variable in your ~/.profile file. Then it should be read at login time.
Thanks for that Ray, but unfortunately that doesn't seem to have worked. I logged off and back on and then launched Firefox normally, but it didn't start the kde-wallet extension (I'm sure there's a command I can use to see what my paths are, but I don't know it).

Thanks for taking a stab at this.

Pete
 
Old 10-11-2011, 03:57 AM   #4
rikxik
Member
 
Registered: Dec 2007
Posts: 88

Rep: Reputation: 19
Disclaimer: this is more of a cludge and not a neat solution.

1. Rename the firefox binary to firefox_original
2. Create a small shell script which sets the variable and then launches firefox_original
3. Save the script as "firefox" in one of the locations in your PATH.
 
Old 10-11-2011, 04:26 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,198

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Another proof way : Add the paths to the firefox start script
( firefox/firefox ) , line 52


export LD_LIBRARY_PATH=/usr/lib/kde4/libkdeinit:/usr/lib/xulrunner-1.9.2.23:/usr/lib:/lib
 
1 members found this post helpful.
Old 10-12-2011, 12:32 AM   #6
rikxik
Member
 
Registered: Dec 2007
Posts: 88

Rep: Reputation: 19
Quote:
Originally Posted by knudfl View Post
Another proof way : Add the paths to the firefox start script
( firefox/firefox ) , line 52


export LD_LIBRARY_PATH=/usr/lib/kde4/libkdeinit:/usr/lib/xulrunner-1.9.2.23:/usr/lib:/lib
This is definitely better. Just didn't remember that firefox already was being launched via a wrapper script.
 
Old 10-12-2011, 01:16 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Check which bash startup scripts you have. There are others such as .bash_login and .bash_profile. The bash info manual indicates which one comes first. ( Actually it is common for distro's to source .bashrc then running .profile )

Also, you need to log out and in again after editing .profile ( or .bash_login or .bash_profile ). It is sourced when you log in. Editing the file, and even sourcing it won't help, because you are in the environment of a subshell of your login shell. If your .profile script sources .bashrc, maybe it would have worked if you logged out.

---

You could also add the assignment to the command.

Look at the properties for the Firefox icon. In the Application entry, add: "LD_LIBRARY_PATH=/usr/lib/kde4/libkdeinit:/usr/lib/xulrunner-1.9.2.23 " before "firefox %u".
You can do the same thing in the menu editor, and entry on the panel.

I'm using KDE, and assume you can do the same in gnome.

Last edited by jschiwal; 10-12-2011 at 01:17 AM.
 
Old 10-14-2011, 11:38 PM   #8
snowweb
Member
 
Registered: May 2008
Distribution: Ubuntu12, CentOS6
Posts: 61

Original Poster
Rep: Reputation: 0
Solved!

Quote:
Originally Posted by knudfl View Post
Another proof way : Add the paths to the firefox start script
( firefox/firefox ) , line 52


export LD_LIBRARY_PATH=/usr/lib/kde4/libkdeinit:/usr/lib/xulrunner-1.9.2.23:/usr/lib:/lib
Many thanks for your help. This one solved it. :-)
 
  


Reply

Tags
environment variable, kde, permanent


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Location of a program running in terminal, launched from panel. uetian Linux - Newbie 1 12-17-2010 09:24 PM
Fedora 9 gedit fails if launched as root from terminal itstootuff Linux - Software 5 10-28-2008 12:56 PM
I added to the PATH in rc.local. Why won't it stick? Also, can I delete Apps? LinuxTexan Puppy 4 10-24-2008 07:37 AM
LXer: Qt Apps Community Sites Launched LXer Syndicated Linux News 0 04-28-2007 09:01 PM
LXer: Commercial apps added to Ubuntu updates LXer Syndicated Linux News 0 08-16-2006 03:33 PM


All times are GMT -5. The time now is 06:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration