LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Configuring pango for 32- and 64-bit programs (https://www.linuxquestions.org/questions/linux-newbie-8/configuring-pango-for-32-and-64-bit-programs-663784/)

alanhr 08-19-2008 04:27 AM

Configuring pango for 32- and 64-bit programs
 
I have a x86_64 system running RHEL 4.7. Awhile back I installed 64-bit firefox and ran into some problems with pango that I solved by creating a .pangorc file with the following contents:

Code:

[Pango]
ModuleFiles=etc/pango/x86_64-redhat-linux-gnu/pango.modules
[PangoX]
AliasFiles=/etc/pango/pangox.aliases

Now I have installed acroread, which is 32-bit-only, and it complains that it cannot find the pango libraries. I realize that this is because a 32-bit program cannot use 64-bit libraries, so I changed my .pangorc file to:

Code:

[Pango]
ModuleFiles=/etc/pango/i386-redhat-linux-gnu/pango.modules
[PangoX]
AliasFiles=/etc/pango/pangox.aliases

and acroread worked like a charm. However, this broke firefox. I've done a bit of googling to come up with a solution for this and so far have found none (other than installing 32-bit firefox), and the pangorc file itself seems to be thoroughly undocumented. On a lark I changed my .pangorc to:

Code:

[Pango]
ModuleFiles=/etc/pango/i386-redhat-linux-gnu/pango.modules:/etc/pango/x86_64-redhat-linux-gnu/pango.modules
[PangoX]
AliasFiles=/etc/pango/pangox.aliases

but this turns out to be a sort of Belgian compromise. Both firefox and acroread work, but both of them also spew a series of error messages as if they cannot find the pango libraries.

Is there a way to get both programs working without them complaining about finding the wrong set of libraries?

Agrouf 08-19-2008 06:46 AM

1/ Create a .pangorc for 32 bit and a pangorc for 64 bit (called ~/.pangorc32 and ~/.pangorc64)
2/ add that in your ~/.bash_profile :
Quote:

alias firefox='ln -fs ~/.pangorc64 ~/.pangorc && firefox'
alias acroread='ls -fs ~/.pangorc32 ~/.pangorc && acroread'
3/ relog yourself or reexucute your .bash_profile file

alanhr 08-20-2008 03:08 AM

Thanks! That works great, though I should point out one small typo for the sake of posterity:

Code:

alias acroread='ls -fs ~/.pangorc32 ~/.pangorc && acroread'
should be:

Code:

alias acroread='ln -fs ~/.pangorc32 ~/.pangorc && acroread'
Also, what is the difference between .bash_profile and .bashrc? My .bash_profile does not seem to be executed on login (though I DO have one), while my .bashrc is. Naturally, that meant I had to put the alias commands in .bashrc to make them work as intended.

(I'm transitioning from occasional *NIX user -- mostly Solaris -- to about half-time Linux user and I'm more familiar with csh. Why I've decided to run bash now I have no idea....)

Agrouf 08-20-2008 04:27 AM

Sorry about the typo.
Actually, the .bash_profile is executed for login shells (when bash is called with -login), while .bashrc is executed on interactive shells.
The login shell is (should be) the one that launches X, or that is on ctrl+alt+n and the interactive one is when you launch a terminal from X or type bash from the command line.
To make things simpler, some people/distros just call bashrc from bash_profile

alanhr 08-20-2008 10:07 AM

Quote:

Originally Posted by Agrouf (Post 3253550)
Actually, the .bash_profile is executed for login shells (when bash is called with -login), while .bashrc is executed on interactive shells.

Got ya. It makes perfect sense, as I have been using an interactive shell via ssh. Which reminds me of another problem I've been having, but I'll post that one later under its own subject heading.

Thanks for the help!


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