LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2007, 11:42 PM   #1
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Rep: Reputation: 30
how to know mozilla version


hi all
i would like to do some thing...
let me explain
i know these way to know mozilla version
Quote:
mozilla -V
and
Quote:
rpm -q mozilla]
i would like to use ibgtkembedmoz.so to open a browser.
i have to export this .so file dynamically to $HOME/.fedora folder.
using
export LD_LIBRARY_PATH=$HOME/.fedora

how can i do?

can you please help me

thank you inadvance
 
Old 07-26-2007, 08:04 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
/usr/lib/firefox/libgtkembedmoz.so is the file you want. You need whatever it is to be accessed from the directory ~/.Fedora/

So why not just make a link?

cd ~/.Fedora
ln -s /usr/lib/firefox/libgtkembedmoz.so

But if you just want the file in the library path, why not just add it's location to the path?
 
Old 07-26-2007, 11:33 PM   #3
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Simon Bridge
/usr/lib/firefox/libgtkembedmoz.so is the file you want. You need whatever it is to be accessed from the directory ~/.Fedora/

So why not just make a link?

cd ~/.Fedora
ln -s /usr/lib/firefox/libgtkembedmoz.so

But if you just want the file in the library path, why not just add it's location to the path?
.
yes at present we are doing this..
but , when the user update his mozilla version...
it will some difficult.. mine is a voip phone. it may have some problem while registering(sign in), with this so...

so, i changed my plan..
why dont we add at the make file..
so that if we run the perticular exe.
itself checks the mozilla version and the path of the ".so".
and it will add to library path in the make file..

i think this thougt may solve my problem..
but am unable to write script in the make file.
i thried this
Code:
k=`echo rpm -ql mozilla | grep /usr/lib/mozilla- | tail -1 | cut -d/ -f4` 
path = /usr/lib
path1 = $k
pathname = $(path)/$(path1)
and way of adding library in the make file is
Code:
-L${pathname} -lgtkembedmoz
the output while making my source is
Quote:
gcc -g -O2 -o phone main.o support.o interface.o callbacks.o -L/root/.fedora -L/usr/lib/`echo rpm -ql mozilla | grep /usr/lib/mozilla- | tail -1 | cut -d/ -f4` -L/usr/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lbapi -lavcodec -lportaudio -lfedoraurl -lgtkembedmoz -lxpcom -lxml2
please observe the bold text..
there the out should be like this, but it is not showing.
Quote:
-L/usr/lib/mozilla-1.7.13
but it is not working..

please make me correct..

thank you in advance
 
Old 07-27-2007, 04:50 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
when the user update his mozilla version...
it will some difficult..
Why? What happens?
The file is not tagged by mozilla version.

Quote:
k=`echo rpm -ql mozilla | grep /usr/lib/mozilla- | tail -1 | cut -d/ -f4`
... you don't need echo. That line should be:

k=`rpm -ql mozilla | grep /usr/lib/mozilla- | tail -1 | cut -d/ -f4`

Example:
Code:
simon@indigo-prime:~$ kver=`echo uname -r`
simon@indigo-prime:~$ echo $kver
uname -r

simon@indigo-prime:~$ kver=`uname -r`
simon@indigo-prime:~$ echo $kver
2.6.20-16-generic
... see the the difference?
 
Old 07-27-2007, 11:36 PM   #5
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Simon Bridge
Why? What happens?
The file is not tagged by mozilla version.

... you don't need echo. That line should be:

k=`rpm -ql mozilla | grep /usr/lib/mozilla- | tail -1 | cut -d/ -f4`

Example:
Code:
simon@indigo-prime:~$ kver=`echo uname -r`
simon@indigo-prime:~$ echo $kver
uname -r

simon@indigo-prime:~$ kver=`uname -r`
simon@indigo-prime:~$ echo $kver
2.6.20-16-generic
... see the the difference?
yes. you are correct.
i did the same thing,but it is not showing properly..

this the code which included in make file
this is the input
Code:
k=" "
k=`rpm -ql mozilla | grep /usr/lib/mozilla- | tail -1 | cut -d/ -f4` 
path =`whereis mozilla-1.7.13 |cut -d" " -f2`
pathname = $(path)
and also abserve the bold text.. this is the wrong way,
coz, in palce of bold text i have to put the output of the "$k".am unable to do that..
please help for this.

the path have to incude in the library path of make file so that.
Code:
phone_LDADD = -L$(HOME)/.g7libs -L${pathname} -L/usr/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lbapi -lavcodec -lportaudio -lfedoraurl -lgtkembedmoz -lxpcom -lxml2 $(INTLLIBS)
all: all-am
then...
make

the output in the terminal is
Code:
gcc -g -O2 -o phone main.o support.o interface.o callbacks.o -L/root/.fedora -L`whereis mozilla-1.7.13 |cut -d" " -f2` -L/usr/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lbapi -lavcodec -lportaudio -lfedoraurl -lgtkembedmoz -lxpcom -lxml2
again observe the bold text... in the make file..

i want output like this in terminal while make.. (ing) in terminal
Quote:
gcc -g -O2 -o phone main.o support.o interface.o callbacks.o -L/root/.fedora -L/usr/lib/mozilla-1.7.13 -L/usr/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lbapi -lavcodec -lportaudio -lfedoraurl -lgtkembedmoz -lxpcom -lxml2
please help me

thank you in advance
 
Old 07-28-2007, 04:40 AM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Sorry, you're not making any sense: please try to state clearly waht it is you are trying to achieve. The end result. Instead of trying to tell me how you think you would like to do it.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
which version of java for mozilla 1.4 joe6pack Mandriva 2 04-05-2004 09:37 PM
trying to get new version of mozilla to execute when I give "mozilla" command lynchmob09 Linux - Software 2 12-08-2003 11:13 AM
why it is old version mozilla, when i install new one? u2911 Linux - Newbie 4 11-15-2003 06:24 AM
What's the best version of Mozilla for RH9? MrMoke Linux - Software 5 09-03-2003 07:05 PM
OpenBSD Mozilla version llama_meme *BSD 2 10-02-2002 11:25 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration