Fedora 64-bit Browsing and Media
Work-in-Progress: 2006 December - 2006 January
For those running any Linux/x86-64 distribution, you've undoubtably run into the "Long Mode" memory model, or more specifically, the fact that libraries, plug-ins and programs with 48-bit addressing can't use those of 32-bit and vice-versa. I previously covered the hows and whys of this model, and how most other OSes attempt to address it (or avoid it altogether). Fortunately for most users of Fedora Core or Suse Linux x86-64, this is fairly well mitigated, especially after the first few versions. Unfortunately, it hasn't been addressed well when it comes to Internet browsing and multimedia. There are no x86-64 versions of Acrobat, Flash and the x86-64 version of Java lacks a plug-in.
Although I've run every x86-64 release of Fedora Core since version 3, I have basically "hacked" i386 RPMs in as needed. This has been a general PITA when it came to updates, and always required manual intervention. After purchasing a new HP Pavilion dv9000z notebook, I decide to install Fedora Core 6 x86-64 and strictly install only the absolute minimum i386 RPMs required for browser and multimedia compatibility in the hope that no special commands are required outside of YUM to update.
I'm happy to report I was able to accomplish this, and have updated over a dozen times over the last month via YUM without issue. I have broken this article into four (4) parts.
For those running any Linux/x86-64 distribution, you've undoubtably run into the "Long Mode" memory model, or more specifically, the fact that libraries, plug-ins and programs with 48-bit addressing can't use those of 32-bit and vice-versa. I previously covered the hows and whys of this model, and how most other OSes attempt to address it (or avoid it altogether). Fortunately for most users of Fedora Core or Suse Linux x86-64, this is fairly well mitigated, especially after the first few versions. Unfortunately, it hasn't been addressed well when it comes to Internet browsing and multimedia. There are no x86-64 versions of Acrobat, Flash and the x86-64 version of Java lacks a plug-in.
Although I've run every x86-64 release of Fedora Core since version 3, I have basically "hacked" i386 RPMs in as needed. This has been a general PITA when it came to updates, and always required manual intervention. After purchasing a new HP Pavilion dv9000z notebook, I decide to install Fedora Core 6 x86-64 and strictly install only the absolute minimum i386 RPMs required for browser and multimedia compatibility in the hope that no special commands are required outside of YUM to update.
I'm happy to report I was able to accomplish this, and have updated over a dozen times over the last month via YUM without issue. I have broken this article into four (4) parts.
Overview:
- Livna x86_64 Multimedia
- Extras/Livna/3rd-Party i386 Multimedia/Plugins
- 3rd-Party i386 Firefox 2.0
- Future, Automated YUM Updates
Ideally, we want to only install i386 when absolutely necessary. For the most part, this is only when we need browser plug-in functionality. For nominal desktop usage, including DVD and common multimedia playing, the x86-64 components are just fine. For obvious legal and "clean redistribution" reasons, Fedora leaves out several components. Although Livna provides them, I do not recommend you blindly tap the Livna repository without considering possible indemnification issues, especially if you are installing them at a commercial entity.
Procedure:
- Remove Totem
- Setup Livna key and repo
- Install various DVD support, Xine and Totem-Xine
- Install additional multimedia
For DVD and other multimedia playback, including CSS encrypted DVDs, we want install Xine and, for GNOME (possibly KDE users as well), replace the /totem package with totem-xine. For MP3 playback, I like included XMMS and will merely add the MP3 support along with the Grip digital ripping and Lame MP3 encoding package. I can honestly say I only grip my own CDs and DVDs, period, and strongly believe in respecting the IP of others regardless of what I think of them (as I expect them to do the same of my works).
Remove Totem
# yum remove totem
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
totem i386 2.16.1-1.fc6 installed 4.9 M
totem x86_64 2.16.1-1.fc6 installed 4.9 M
Removing for dependencies:
rhythmbox x86_64 0.9.5-4.fc6 installed 6.4 M
totem-mozplugin x86_64 2.16.1-1.fc6 installed 300 k
Install Livna public key and repo
# rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
# rpm -ivh http://rpm.livna.org/livna-release-6.rpm
Install various DVD support, Xine and Xine-Totem
NOTE: xine-lib-extras-nonfree, from Livna.ORG, now seems to be required for CSS encrypted DVD playback as xine-lib is in Fedora Extras. Also note the Xine versions between packages may not match up in the example below.
# yum install libdvdcss libdvdnav libdvdplay libdvdread rhythmbox totem-mozplugin totem-xine xine-lib xine-lib-extras-nonfree
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libdvdcss x86_64 1.2.9-4.lvn6 livna 31 k
libdvdnav x86_64 0.1.10-2.lvn6 livna 88 k
libdvdplay x86_64 1.0.1-4.lvn6 livna 34 k
libdvdread x86_64 0.9.7-1.lvn6 livna 66 k
rhythmbox x86_64 0.9.5-4.fc6 core 3.1 M
totem-mozplugin x86_64 2.16.1-1.fc6 core 129 k
totem-xine x86_64 2.16.2-2.lvn6 livna 1.9 M
xine-lib-extras-nonfree x86_64 1.1.4-1.lvn6 livna 522 k
Installing for dependencies:
aalib x86_64 1.4.0-0.11.rc5.fc6 extras 75 k
libmodplug x86_64 1:0.8-3.fc6 extras 114 k
lirc x86_64 0.8.1-0.2.pre2.fc6 extras 248 k
xine-lib x86_64 1.1.2-17.fc6 extras 2.1
Install additional multimedia
This is definitely left to individual taste.
# yum install grip lame lame-libs xmms-mp3
2. Extras/Livna/3rd Party i386 Firefox/Multimedia
Now the fun begins. First off, Fedora Core 6 x86-64 comes with both i386 (32-bit) and x86-64 (48-bit) versions of Firefox, but favors the latter by default. You want to leave the latter installed for desktop support, but we want to favor the former when you run Firefox. So we'll need to change the startup script (I should make a RPM that does this, and re-applies anytime a new version is installed). Then we'll mix in some 3rd party RPMs, namely Acrobat Reader, Flash v9 and the JDK (I prefer having the full JDK over just the JRE). Lastly, we'll do what everyone says you shouldn't, but it works just fine. We'll drop in two (2) YUM Repo files that are disabled by default, then run one (1) command enabling them temporarily to give you just what you need -- namely DVD, MP3 and codec support along with MEncoder/MPlayer and plug-ins for i386.
Now the fun begins. First off, Fedora Core 6 x86-64 comes with both i386 (32-bit) and x86-64 (48-bit) versions of Firefox, but favors the latter by default. You want to leave the latter installed for desktop support, but we want to favor the former when you run Firefox. So we'll need to change the startup script (I should make a RPM that does this, and re-applies anytime a new version is installed). Then we'll mix in some 3rd party RPMs, namely Acrobat Reader, Flash v9 and the JDK (I prefer having the full JDK over just the JRE). Lastly, we'll do what everyone says you shouldn't, but it works just fine. We'll drop in two (2) YUM Repo files that are disabled by default, then run one (1) command enabling them temporarily to give you just what you need -- namely DVD, MP3 and codec support along with MEncoder/MPlayer and plug-ins for i386.
Procedure:
- Verify both Firefox i386 and x86-64 are installed
- Edit Firefox launch script to favor i386
- Setup jpackage key and repo
- Download 3rd party i386 RPMs
- Install and enable 3rd-party i386 software
- Setup 3rd-party i386 plug-ins
- Setup Extras-i386/Livna-i386 repos (disabled)
- Install Extras/Livna i386 RPMs
It's important to note that with Fedora 6, each entire tree for Firefox is installed in /usr/lib[64] for i386 and x86-64 respectively. You should ensure both are installed, i386 for what you're going to use, but also x86-64 for desktop and other, native x86-64 support. You should at least have x86-64 and have to only install i386 in the worst case. Don't be tempted to uninstall x86-64, as various dependencies (especially GNOME) will come up. Yes, the Firefox launch script will launch i386 by default if it cannot find x86-64, but not having the x86-64 version installed can cause some dependency headaches.
# yum list firefox
...
Installed Packages
firefox.x86_64 1.5.0.8-1.fc6 installed
firefox.i386 1.5.0.8-1.fc6 installed
Edit Firefox launch script to favor i386
Now we will edit /usr/bin/firefox to favor the i386 version. I highly recommend you use RCS to maintain changes of any files, especially stock files. That way, you can easily do differences or [re-]patch changes whenever scripts are updated. I will include the few, paltry commands to revision files below.
# cd /usr/bin
# mkdir RCS
# ci -l firefox
type in something like "Firefox launch script"
# gvim firefox
or whatever your favorite editor is
Comment out the following lines ...
#if [ -x "/usr/lib64/firefox-1.5.0.8/firefox-bin" ]
#then
###MOZ_LIB_DIR="/usr/lib64"
#fi
And let's save our changes so we can identify them later ...
# ci -l firefox
type in something like "Removing detection of lib64 version"
Now the 32-bit version will launch when you execute Firefox.
Setup jpackage key and repo
The JPackage Project maintains a most excellent Sun Java compatibility RPM that properly configures the Alternatives system for Sun's Java, allowing it to co-exist with GCJ as well as offer additional capabilities.
# rpm --import http://www.jpackage.org/jpackage.asc
# cd /etc/yum.repos.d
# curl http://www.jpackage.org/jpackage.repo
# gvim jpackage.repo
or whatever your favorite editor is -- enable (enable=1) the non-free repository
Download 3rd-party RPMs
Install and enable 3rd party RPMs
Setup 3rd-party i386 plug-ins
Setup Extras-i386/Livna-i386 repos (disabled)
Install Extras/Livna i386 RPMs
# yum --enablerepo=extras-i386 --enablerepo=livna-i386 install a52dec.i386 libdvdcss.i386 libdvdnav.i386 libdvdplay.i386 libdvdread.i386 mencoder.i386 mplayer.i386 mplayer-fonts.noarch mplayer-gui.i386 mplayerplug-in.i386
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
a52dec i386 0.7.4-10.lvn6 livna-i386 49 k
libdvdcss i386 1.2.9-4.lvn6 livna-i386 31 k
libdvdnav i386 0.1.10-2.lvn6 livna-i386 89 k
libdvdplay i386 1.0.1-4.lvn6 livna-i386 34 k
libdvdread i386 0.9.7-1.lvn6 livna-i386 66 k
mencoder i386 1.0-0.66.rc1.lvn6 livna-i386 1.3 M
mplayer i386 1.0-0.66.rc1.lvn6 livna-i386 2.6 M
mplayer-fonts noarch 1.1-4.lvn6 livna 1.0 M
mplayer-gui i386 1.0-0.66.rc1.lvn6 livna-i386 237 k
mplayerplug-in i386 3.31-2.lvn6 livna-i386 482 k
Installing for dependencies:
aalib i386 1.4.0-0.11.rc5.fc6 extras-i386 74 k
enca i386 1.9-3.fc6 extras-i386 118 k
faac i386 1.24-6.lvn6 livna-i386 79 k
faad2 i386 2.0-19.20050131.lvn6 livna-i386 209 k
ffmpeg i386 0.4.9-0.25.20061030.lvn6 livna-i386 1.7 M
fribidi i386 0.10.7-5.1 core 53 k
gsm i386 1.0.10-12.lvn6 livna-i386 41 k
imlib2 i386 1.3.0-3.fc6 extras-i386 576 k
lame-libs i386 3.97-3.lvn6 livna-i386 331 k
libdv i386 0.104-4.fc6.1 core 80 k
libid3tag i386 0.15.1b-3.fc6 extras-i386 44 k
libmad i386 0.15.1b-4.lvn6 livna-i386 82 k
libmp4v2 i386 1.5.0.1-2.lvn6 livna-i386 264 k
libmpcdec i386 1.2.2-4.fc6 extras-i386 30 k
lirc i386 0.8.1-0.2.pre2.fc6 extras-i386 238 k
lzo i386 2.02-2.fc6 extras-i386 63 k
speex i386 1.2-0.1.beta1.fc6 updates 475 k
x264 i386 0-0.8.20061028.lvn6 livna-i386 241 k
xvidcore i386 1.1.0-4.lvn6 livna-i386 242 k
3. 3rd-Party i386 Firefox 2.0
Procedure:
- A
4. Future, Automated YUM Updates
Procedure:
- B