LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-19-2008, 04:27 AM   #1
alanhr
LQ Newbie
 
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Rep: Reputation: 15
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?
 
Old 08-19-2008, 06:46 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
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
 
Old 08-20-2008, 03:08 AM   #3
alanhr
LQ Newbie
 
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Original Poster
Rep: Reputation: 15
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....)
 
Old 08-20-2008, 04:27 AM   #4
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
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
 
Old 08-20-2008, 10:07 AM   #5
alanhr
LQ Newbie
 
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Agrouf View Post
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!
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
error in the creation of `etc/pango/pango.modules` okeyla Linux - Newbie 3 07-02-2011 08:06 PM
pango-1.16.4 compile error (pango-querymodules) nigel_1820 Linux - Software 1 07-23-2007 01:10 AM
How does the 64 bit version handle interacting with 32 bit programs? purelithium Mandriva 1 11-13-2005 05:16 PM
Pango installed, but programs don't see it? hbbtstar Linux - Software 2 05-21-2005 05:30 PM
Pango error configuring gtk+2 donbellioni Linux - Software 10 11-16-2004 06:51 PM


All times are GMT -5. The time now is 07:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration