Bo Wu's IT Lab

博闻精思 物我一体

Browsing Posts in Fedora

WinRAR 256 32 Rar and Unrar in Fedora 12

By default, Rar is not available in Fedora 10. If all you need to do is extract files from a Rar archive, unrar from RPM Fusion’s YUM repositories will work. If you need to create Rar archives, then you will have to download and install the complete Rar package from DAG. The instructions below show you how.

Only Need to Extract Files?

First, install RPM Fusion’s free and nonfree YUM repositories. For detailed information about installing RPM Fusion, see: http://rpmfusion.org/Configuration

su -c “rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm”

su -c “rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm”

Next, install the unrar packages from RPMFusion’s nonfree repository.

su -c “yum install unrar”

Done! You now have unrar in /usr/bin/unrar. This binary can only extract files from Rar archives. Use this command to see all available options:

/usr/bin/unrar -?

Need to Create Rar Archives?

First, download the source RPM from DAG: http://dag.wieers.com/rpm/packages/rar

wget -c http://dag.wieers.com/rpm/packages/rar/rar-3.5.1-1.rf.src.rpm

Now, install the source RPM. This will create a $HOME/rpmbuild tree. Please note that you do not need to be root.

rpm -iv rar-3.5.1-1.rf.src.rpm

Next, build a binary package in $HOME/rpmbuild. Again, no need to be root.

rpmbuild -bb ~/rpmbuild/SPECS/rar.spec

Finally, install the built RPM as root:

su -c “rpm -Uvh $HOME/rpmbuild/RPMS/$(arch)/rar-3.5.1-1.rf.x86_64.rpm”

Done! You now have rar in /usr/bin/rar. This binary can build and extract Rar files. Use this command to see all available options:

/usr/bin/rar -?

FreeMind computer knowledge Installing FreeMind in Fedora 12

FreeMind is a free mind mapping application written in Java which runs on Microsoft Windows, Mac OS and Linux operating systems. I successfully installed in my Fedora 12 desktop. The following is the detailed steps.

1. Install Java Runtime Environment (JRE):
FreeMind requires pure Sun’s Java Runtime Environment. Please refer this link to install Sun’s JRE.

2. Add New Yum Repository:
First become root, create a temporary directory and CD to it.

There is a broken dependency at the moment in the SVG plugin so do this:

rpm –import http://www.jpackage.org/jpackage.asc
rpm –oldpackage -ivh http://ftp.heanet.ie/pub/jpackage/1.7/generic/RPMS.free/batik-1.6-3jpp.noarch.rpm

Now download all the rpms you want for freemind and put them in your temporary root directory.

There is no fedora support 10 and we are missing packages we need so.we will enable the generic repositories.

curl http://jpackage.org/jpackage17.repo | awk ‘/-generic/,/^$/ { sub(“enabled=0″,”enabled=1″); print }’ >/etc/yum.repos.d/jpackage17.repo

3. Install the Freemind:
yum –nogpgcheck -y localinstall freemind-*.rpm

Remove the temporary directory you made and start freemind :)

For more information about FreeMind and its installation, please visit: http://freemind.sourceforge.net/wiki/index.php/FreeMind_on_Linux.

java logo 2 Installing Sun Java on Fedora 12

Fedora came with OpenJDK Java Runtime Environment, which is a part of Fedora Project. However, many applications still require Sun’s Java. When I tried to install FreeMind, a mind mapping software in Java, it required Sun’s JRE. I installed the Sun’s JRE as following steps successfully.

My environment is Intel Dual Core 32-bit CPU, 4GB Memory, Fedora 12.

1. Download:
Download the latest JDK or JRE at http://java.sun.com/javase/downloads/index.jsp. What I downloaded was jre-6u18-linux-i586.rpm.

2. Install:
Once download you will install the package with:
On x86:
su -c ’sh jre-6u18-linux-i586.rpm’
or
On x86_64:
su -c ’sh jre-6u18-linux-x64-rpm.bin’

You’ll have to agree to the license by pressing q, then typing yes.

3. Replace:
First lets make sure that Fedora will use Sun Java instead of OpenJDK which is done with the alternatives
command:
su -c ‘/usr/sbin/alternatives –install /usr/bin/java java \
/usr/java/default/bin/java 20000′

4. Setup Plugin:
Now you want to setup the Sun Java Plugin for your firefox browser:
For x86:
su -c ‘/usr/sbin/alternatives –install \
/usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so \
/usr/java/default/plugin/i386/ns7/libjavaplugin_oji.so 20000′

For x86_64:
su -c ‘/usr/sbin/alternatives –install \
/usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 \
/usr/java/default/lib/amd64/libnpjp2.so 20000′

You can do the same for your Opera browser if you wish:
For x86
su -c ‘/usr/sbin/alternatives –install \
/usr/lib/opera/plugins/libjavaplugin.so libjavaplugin.so \
/usr/java/default/plugin/i386/ns7/libjavaplugin_oji.so 20000′

For x86_64:
su -c ‘/usr/sbin/alternatives –install \
/usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 \
/usr/java/default/lib/amd64/libnpjp2.so 20000′

Note: The \’s indicated in the above commands are to break the line. If you are typing it yourself, you can type it without the \ as a single line installation, or just copy and paste the above into your terminal.

After you setup the browser plug-ins you’ll have to close your browser.

5. Verify:
To verify your plug-in are being used by your browser type: about:plugins in the address bar to get a screen displaying all plugins.

In command line, you can verify by issuing command like:
java -version
java version “1.6.0_18″
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)

logo flashplayer Flash Player for 64 bit Fedora 12

After your installation of a 64-bit Fedora 12, you will find that you cannot web pages which have flash movies embedded.  Even you go to Adobe’s website to try to download and install the Adobe Flash Player plugin for Firefox, it still does not work.

The reason is that the plugin on Adobe official website is for 32-bit OS.  Adobe has a Beta version of 64-bit plugin which can be downloaded at http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_1_p2_linux_121709.tar.gz

After downloading and extracting the .tar.gz file, you will find a file call: libflashplayer.so.  Then, you can copy this file to your Firefox plugin directory like: ~your_user_name/.mozilla/plugins/.  Restart your Firefox and go to youtube.com to test if you can view Flash now.

fedora12 codecs err1 300x148 Add Windows Media Codecs for Fedora 12

fedora12 codecs err2 300x95 Add Windows Media Codecs for Fedora 12

My Fedora 12 could not play any .wav and .wmv files and shown above error messages.  When I clicked the “Search” for searching the missing codecs, it could found nothing to install.  The reason is some codecs to play Microsoft media files are proprietary and cannot be included in the Fedora’s yum repository.

The solution is to download and install following w32codec:

URL: http://rpm.pbone.net/index.php3/stat/4/idpl/2294486/com/w32codec-0.60-1.i386.rpm.html

After I installed it successfully, I closed the media player and clicked the .wav file again, but it still popped up the above first error message. However, when I clicked the “search” again this time, it could search, download and install codecs automatically.

Finally, I got my .wav and .wmv files played properly.

For more information about MPlayer and its codecs, you can go to ftp://ftp1.mplayerhq.hu/MPlayer/releases/codecs/ and http://www.mplayerhq.hu.