Wednesday, October 15, 2008

How to install JAVA in FC3.

I did an installation on a second pc. I had such a headache installing JAVA after I ran all the updates. Many threads point to this download site. Which I think is incorrect. The real download is here. You need to go to the LINUX RPM (self-stracting file) and click on the YELOW download button to begin your donwload.

Once you download is done open the terminal and become root and type:
 
Code:
 sh j2re-1_4_2_06-linux-i586-rpm.bin
Press ENTER untill you get to the license agreement and you will be prompted to type yes or no, type "yes". Here is the example:
 
Quote:
For inquiries please contact: Sun Microsystems, Inc., 4150
Network Circle, Santa Clara, California 95054, U.S.A.
(LFI#141496/Form ID#011801)

Do you agree to the above license terms? [yes or no]
You will get this result:
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.40 of 28 November 1998, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: j2re-1_4_2_06-linux-i586.rpm
Done.

And from here all you do is install the rpm:
 
Code:
rpm -ivh j2re-1_4_2_06-linux-i586.rpm
AND you are done. You can check here to see if you JAVA works. You can also follow this how to from fedoranews.org That is where I found the incorrect links. And to be honest I did not do any extra tweaks to make it work.

UPDATED: I did not have to create the link for java but just in case this is how you do it:
 
Code:
 su -
ln -s /usr/java/j2re1.4.2_06/plugin/i386/ns610-gcc32/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so
Intended for newbies. Enjoy.

How to multimedia xmms, rythmbox, ogle and others in FC3.

Lack of multimedia in fedora is one of my major complaints. This is intended for our newbies that have problems setup multimedia for mp3 music and dvd playback.

1. Not being able to work my way aroud xmms in fedora core 1 I discover Zinf player and you can read the post for more info.

2. My favorite player is without a doubt XMMS and its what I used in fedora core 2 and now in FC 3. A very small application with many capabilities. To have mp3 playback you need the xmms-mp3 plugin. This plugin being listed is for FC3. You can find same plugin in that site for FC1 and 2. Also availabe for FC 64 versions. Now import your mp3's or music.

3. In FC3 I decided to try Rythmbox which is a very good music player too. You need gstreamer-mp3 plugin. The one listed here is also for FC3. You can search the site according to your vesion. You may need some extra dependecies such as libmp3lame.so.0 , libid3tag and libmad.
Download them to a folder and do a group installation:
a. cd name_of_folder
b. become root and type: rpm -ivh *
c. this command will install everthing.
d. when done run this command: gst-register-0.8
e. now you can import your mp3's and to rythmbox and enjoy your music.
THIS IS THE YUM COMMAND, it will install everything for you:
 
Code:
yum install gstreamer-plugins-mp3
Code:
yum install xmms-mp3
FunkyRes showed me how to do online music using Rythmbox.
 
Quote:
You need to have mp3 support in gstreamer (can play mp3 files in Rhythmbox)

Download a shoutcast playlist file from http://www.shoutcast.com/

I right click on the "tune in" button and choose "save link as"

It will end in a .pls

Then from Rhythmbox -

Choose the radio option (opposed to Library)
Go to the Music menu and choose

Playlist -> Load from file ...

Select the .pls file, and it should show up in your internet radio stations. Choose it and press Play.
Same concept applies to XMMS. For DVD playback I use Ogle and if you have your yum repo's setup you can always use yum to install.

I will not get in a lot details about Ogle but this is the yum command:
 
Code:
yum install ogle
Kaffeine is another great player for dvd and mp3 music you can also use yum to install it:
 
Code:
yum install kaffeine
it only needs one dependency and yum will install it for you.

I dont use mPlayer or Totem (only in mandrake) so I am not posting much info about them. See attachment.
BTW dont forget to check www.fedorafaq.org for more support.

Rythmbox website. XMMS website Ogle website

Read this thread for more info about RealPlayer for Linux

How To ADD Windows 2K or XP to the Grub.

If you are doing a dual boot with Fedora Core and Windows 2000 or XP anaconda should add it to the grub automatically. If you need to restore the grub after re-installing windows follow this tutorial.

If you are installing Fedora Core in primary hard drive and have Windows 2000 or XP on slave drive you will need to add the lines to /etc/fstab.

Open terminal become root and type:
Code:
gedit /etc/grub.conf
and add this lines for your windows entry:
Code:
[B]title Windows XP
               map (hd0) (hd1)
               map (hd1) (hd0)
               rootnoverify (hd1,0)
               chainloader +1[/B]
Dont forget to click on SAVE.

Now if you have Windows 95, 98 or ME and want to mount a FAT32 partition this is how is done just add this line to your fstab:
 
Code:
 /dev/hda2 /mnt/windows vfat users,rw,owner,umask=000 0 0
Please note I am using /dev/hda2 as an example.
Many new comers are asking this question very frequently so here is the answer.

How to create yum repos in FC3.

How to create you repo's using gedit. This is intended for our newbies. Dont forget to import the keys.
Update: I am using: enable=1 and gpgcheck=1 FOR ALL OF THEM

1. open terminal and become root (su + password)

2. type: gedit /etc/yum.repos.d/freshrpms.repo

copy and paste it and CLICK ON SAVE!!:

[freshrpms]
name=FreshRPMS-Fresh
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms
enabled=0
gpgcheck=1

3. gedit /etc/yum.repos.d/dag.repo

copy and paste it

[dag]
name=Dag
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag/
enabled=0
gpgcheck=1

4. gedit /etc/yum.repos.d/livna.repo

copy and paste it:

[livna-stable]
name=Livna.org Fedora Compatible Packages (stable)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.stable
gpgcheck=1

[livna-unstable]
name=Livna.org Fedora Compatible Packages (unstable)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.unstable
gpgcheck=1

[livna-testing]
name=Livna.org Fedora Compatible Packages (testing)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.testing
gpgcheck=1


5. gedit /etc/yum.repos.d/atrpms.repo

copy and paste it:

[atrpms-stable]
name=ATrpms for Fedora Core $releasever stable
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-stable
enabled=0
gpgcheck=1

This is my /etc/yum.conf for fedora updates


[base]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=0
gpgcheck=1
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
enabled=0
gpgcheck=1

This is the FC3 GPG-Key: rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY*

Here are GPG-keys at fedora FAQ

This is how you use yum to install and uninstall: here

tchung's at www.fedoranews.org has 2 tutorials:

1st tutorial
2nd tutorial

PLEASE NOTE:
you can enabled=1 or dislable: enabled=0 and same apply to this line: gpgcheck=1 to gpgcheck=0. Update: I am using: enable=1 and gpgcheck=1 FOR ALL OF THEM

 

How to install NVIDIA drivers in FC3.

1. This has been the easiest thing I have done in fedora core 3.
2. In fc3 I have all my repos setup. Livna, freshrpm, atrmp, dag and here is how I did my repos.
3. I installed my nvidia drivers via yum by issuing this yum command (as root) and this command will also install the kernel-sourcecode:
 
Code:
yum install nvidia-glx kernel-module-nvidia-`(uname -r)`
It took care of everything for me and here is the proof:
Quote:
[imdeemvp@myfc3 ~]$ glxinfo | grep direct
direct rendering: Yes
[imdeemvp@myfc3 ~]$ glxgears
16146 frames in 5.0 seconds = 3229.200 FPS <<-before i minimized the window
35250 frames in 5.0 seconds = 7050.000 FPS
35444 frames in 5.0 seconds = 7088.800 FPS
35290 frames in 5.0 seconds = 7058.000 FPS
35372 frames in 5.0 seconds = 7074.400 FPS
35315 frames in 5.0 seconds = 7063.000 FPS
34565 frames in 5.0 seconds = 6913.000 FPS
35340 frames in 5.0 seconds = 7068.000 FPS
35359 frames in 5.0 seconds = 7071.800 FPS
35324 frames in 5.0 seconds = 7064.800 FPS
X connection to :0.0 broken (explicit kill or server shutdown).
This was the easiest way for me to install nvidia drivers in long time. I check my xorg.conf and did not have to edit anything. Dont ask me why.

NOTE if you udpate your kernel you need to reinstall the drivers again:
 
Code:
yum install kernel-module-nvidia-`(rpm -q --queryformat="%{version}-%{release}\n" kernel | tail -n 1)`
You can also do it the the nvidia way. and for extra help check the nvidia linux forums.
 

How to install LimeWire in FC3

Disclaimer: Do it at your own risk. Everything started with a thread I read at another forum. I have used amule without any problems and installation was via yum.
Code:
yum install amule
Very nice peer 2 peer but a little slow.

I also tried GTK-Gnutella which I also installed via yum.
Code:
yum install gtk-gnutella
.

I ran into trouble when trying to install LimeWire for linux. But with the help from tchung from www.fedoranews.org. I was able to install LimeWire. This was the error I got at terminal.
Quote:
[root@myfc3 imdeemvp]# chmod +x LimeWireLinux.bin
[root@myfc3 imdeemvp]# sh LimeWireLinux.bin
Preparing to install...
tail: `-1' option is obsolete; use `-n 1'
Try `tail --help' for more information.
LimeWireLinux.bin: line 326: [: `)' expected, found -z
WARNING! The amount of /tmp disk space required and/or available
could not be determined. The installation will be attempted anyway.
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
No Java virtual machine could be found from your PATH
environment variable. You must install a VM prior to
running this program
.
TChung suggested doing this:
 
Quote:
I have another suggestion.
You can create a file in /etc/profile.d/java.sh with following content:
(Assuming you have j2re 1.4.2_06 rpm package from sun website)

#!/bin/bash
# Init Script for j2re 1.4.2_06
# Drop this script in /etc/profile.d

JAVA_HOME=/usr/java/j2re1.4.2_06
PATH=$JAVA_HOME/bin:$PATH

export JAVA_HOME PATH

Now log out and log back in. Then type "echo $PATH" from a terminal to see the order of executables. This way, you can give a priority to j2re instead of libgcj.

Thomas
if you follow this suggestion step by step you will be able to install LimeWire. Open terminal and type:
Code:
 sh LimeWireLinux.bin
and you will get and intallation prompt:
Quote:
[imdeemvp@myfc3 FC3]$ sh LimeWireLinux.bin
Preparing to install...
tail: `-1' option is obsolete; use `-n 1'
Try `tail --help' for more information.
LimeWireLinux.bin: line 326: [: `)' expected, found -z
WARNING! The amount of /tmp disk space required and/or available
could not be determined. The installation will be attempted anyway.
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct
1. Click OK on first option.
2. Click NEXT on the limewire installer.
3. And continue to click NEXT until you get to installation and click on INSTALL if you are ok with the path of your folders. If not change the path yourselt. I suggest let limewire do it for you.
4. Click on DONE and enjoy.
5. Get your limewire icon from www.kde-look.org and create your launcher and for command use runLimeWire
The purpose of this was to do a benchmark with all three p2p's and in 1st place was LimeWire, 2nd GTK-Gnutella and 3rd was for amule.
See screenshots of installation:
screenshot 1 screenshot 2 screenshot 3 screenshot 4 screenshot 5

GKrellm alternative to gDesklets in FC3

I've experience a lot of ram comsuption using gDesklets so I decided to use gkrellm for fc2 and here are the themes for gkrellm

1. create a folder in your home directory and name it gkrellm (if you want)
2. download both packages to the gkrellm folder
3. when done open terminal and type su and pass to become root:

cd gkrellm (or what_ever_name)
rpm -ivh * <-this will install gkrellm and themes at same time

now go to redhat panel >System Tools >GKrellm and enjoy people

This is how i replaced gDesklets and GKrellm is easy to configure.
This can also be done via yum:
Code:
yum install gkrellm
See screenshot:
screenshot 1

How to INSTALL NVIDIA drivers in Mandrake 10.1

HOW TO INSTALL NVIDIA DRIVER IN MANDRAKE 10.1

1. Download latest driver at http://www.nvidia.com/object/linux.html

2. Install the kernel-source
A. urpmi kernel-source OR
B. Go to mandrake control center > software management >install >search and type kernel and download
This is the correct kernel source: kernel-source-2.6-2.6.8.1-12mdk
[imdeemvp@localhost imdeemvp]$ uname -r
2.6.8.1-12mdk
[imdeemvp@localhost imdeemvp]$ rpm -qa | grep kernel-*
kernel-2.6.8.1.12mdk-1-1mdk
kernel-2.4.27.0.pre2.1mdk-1-1mdk
kernel-source-2.6-2.6.8.1-12mdk
[imdeemvp@localhost imdeemvp]$

3. Installation, open terminal and become root:
su
-->enter password<--
init 3
________

sh NVIDIA-Linux-x86-1.0-6629-pkg1 (or whatever version)
./NVIDIA-Linux-x86-1.0-6629-pkg1


QUOTE
Please read the following LICENSE and then select either "Accept" to accept the license and continue with
the installation, or select "Do Not Accept" to abort the installation.

Accept Do Not Accept

When done init 5

4. Edit
This worked for me. These two things I had to do after installing:

- add "nvidia" in /etc/modprobe.preload (I used gedit OR vi if your in terminal and text mode)
- change driver "nv" to "nvidia" in /etc/X11/XF86Config

NOW TEST FOR 3D acceleration
[imdeemvp@localhost imdeemvp]$ glxgears
11687 frames in 5.0 seconds = 2337.400 FPS
35236 frames in 5.0 seconds = 7047.200 FPS
35238 frames in 5.0 seconds = 7047.600 FPS
35181 frames in 5.0 seconds = 7036.200 FPS
35222 frames in 5.0 seconds = 7044.400 FPS
35211 frames in 5.0 seconds = 7042.200 FPS
35180 frames in 5.0 seconds = 7036.000 FPS
35286 frames in 5.0 seconds = 7057.200 FPS
35235 frames in 5.0 seconds = 7047.000 FPS
34910 frames in 5.0 seconds = 6982.000 FPS
35240 frames in 5.0 seconds = 7048.000 FPS
X connection to :0.0 broken (explicit kill or server shutdown).
[imdeemvp@localhost imdeemvp]$

[imdeemvp@localhost imdeemvp]$ glxinfo | grep direct
direct rendering: Yes
[imdeemvp@localhost imdeemvp]$

Login sounds for gnome using mplayer.

Ok, one of the things I like about mandrake is their KDE has a nice startup sound when desktop is loading. I always wanted to do it in fedora but using GNOME enviroment. So I posted the thread here. But I could not wait for the answer and started experimenting will all the players I installed (realplayer, mplayer, xmms, rhymthbox).

But all of them started in GUI but not mplayer! so this what you can do:

1. Download what ever sound you like from www.gnome-look.org and go to system sounds. This is the sound I am using.

2. Leave your sound in the home directory (unless some else can help with this).

3. In order for sound to play in the background you need to install mplayer.

4. Go to preferences >more preferences >sessions >startup programs and add this command:
Code:
mplayer Startup1_4.ogg
and the sound will play in the backgroud without starting mplayer gui at your desktop STARTUP!

Update: TESTED in mandrake 10.1 using Gnome 2.6 and it works. For mandrake you need to install mplayer via urpmi:
Code:
urmpi mplayer