Sunday, November 25, 2007

Internet Messenger setup in Fedora Core 6

The built-in multi-protocol Internet Messenger GAIM is good enough for use with MSN, GTalk and Yahoo. Here are the settings you need to do for each of the serives. Firstly, go to Applications > Internet > Internet Messenger.

Yahoo accounts
  1. In the Account dialog, click on Add
  2. In the Add account dialog, select Protocol as Yahoo
  3. Screen Name: yourYahooUsername
  4. Enter the password, select 'Remember password.
  5. Save. Your account is created. It will log in automatically
GTalk accounts
  1. In the Account dialog, click on Add
  2. In the Add account dialog, select protocol as Jabber
  3. Screen name is your GMail ID, WITHOUT "@gmail.com"
  4. Server: gmail.com
  5. Under the Advanced tab, make Connect Server as talk.google.com
  6. Leave other options unchanged. Save.
  7. Your GTalk account will be activated
MSN / Windows Live accounts
  1. In the Add account dialog, select protocol as MSN
  2. In screen name, enter your COMPLETE Hotmail ID
  3. Enter the password, remember password
  4. Your MSN / Hotmail / Windows Live account will be created
This completes the setup of the most popular IM clients around

Network setup in Fedora Core 6

In today's times, being connected to the Internet has become probably as much as a necessity as food and water and air. Network setup in FC6 is easy, but different than what you've been used to in Windows. This guide is specific to the following environment:
  1. Location:Mumbai, INDIA
  2. ISP: MTNL
  3. Service: Tri-Band ADSL
  4. Router: UT-Starcom model UT-300R2U
  5. Router pre-configured with DHCP, bearing local IP 192.168.1.1
Given this setup, you may proceed in the following way:
  1. Switch on the router before you switch on the PC
  2. Go to System > Administration > Network
  3. Select Device eth0 and click on Edit
  4. Under the Ethernet Device dialog, select Statically set IP addresses and enter the following Manual IP address settings
  5. Address: 192.168.1.2
  6. Subnet Mask: 255.255.255.0
  7. Default gateway address: 192.168.1.1
  8. Click OK
  9. Now, back to Network Configuration dialog, select the DNS tab
  10. Enter Primary DNS as 203.94.227.43
  11. Enter Secondary DNS as 203.94.243.70
  12. Click File > Save
  13. You can start your browser and ride the waves of the internet !

Printer setup in Fedora Core 6

Printing with FC6 is really easy. Here's how I setup my HP PSC 500 Officejet:

  1. Switch on your printer before starting your PC
  2. Log in as root
  3. Go to System > Administration > Printing
  4. Click on New Printer
  5. Printer Name: HP_PSC_500
  6. Description: HP PSC 500
  7. Location: Next to monitor
  8. In Select Connection dialog, select HP PSC 500 LPT parport0 HPLIP
  9. In Select Printer From Database option, select HP
  10. Under Models select PSC 500
  11. Once the printer is installed, the Printer Configuration dialog will be shown
  12. Select Local Printers > HP_PSC_500
  13. Click on Make default printer
  14. Under Printer Options, select Page size as A4
  15. Select Print test page under the Settings tab
  16. If the page is printed correctly, no reason to worry!
  17. Click on Apply and close the Printer Configuration dialog
The printer is setup. Although this guide is highly specific, I hope you have understood the basic steps in setting up a printer on Linux. You can follow the same steps (not literally) to setup your printers as well. A thing to note is that you should never be stuck with an old OS and a latest printer model, as that will mean the absence of the printer definition in the OS database. Ofcourse, there would be a workaround, but I haven't tried it out.

Java EE SDK Installation Instructions

For as long as this link works, its a good generic reference for anyone wanting to update their JRE in Fedora/Linux. The steps below are specific to installing Sun's Java EE SDK (inclusive of JDK and JRE 1.6.0_06) on Fedora Core 6 32-bit i386. Should you be able to succesfully complete the following steps, you shall have the most enviable Java setups around. Here's how you go about it:

Before we begin, there are a few things you need to know. Whenever I mention something like:

$cd /opt

..it means that the command cd /opt must be typed at the prompt (so called as the dollar prompt) in the Terminal (that is Applications > Accessories > Terminal). Don't worry, you won't see a dollar sign in the terminal, but its just a convention of writing. Note that you must not type the dollar sign while entering the command.

Secondly, there is no such thing as a registry, in Linux. So you don't have to 'install' applications using an installer. You will generally get a .tar.gz or a .zip file from the download sites. These files must be simply extracted, and the resulting folder must be copied to any location of your choice. However, by convention, such folders are copied into /usr/lib/ directory under your file system. (The file system can be accessed from Applications > System Tools > File Browser). However, since there is no installation, some manual configuring effort is required. This effort is largely context dependent, and will vary as per:
  1. Distribution of Linux (Fedora, RedHat, Ubuntu, Debian, Mandriva, Gentoo.....)
  2. Version of distribution (Fedora 8, RedHat 10.....)
  3. The hardware platform for the distribution (i386 in my case, for Intel 32-bit processors)
  4. Application version you've downloaded
  5. Where you've saved (or subsequently copied) the extracted folder
Thirdly, when performing setup operations, you must always login as root.

Now, with a basic understanding of these things, lets get to the real thing:

Stage 1: Downloading the correct file, to the correct place
  1. Go to http://java.sun.com
  2. Select Downloads > Java EE
  3. Click on Download with JDK
  4. Accept the License Agreement
  5. Click on the link to Java EE SDK 5 Update 3 under Linux platform
  6. If you are using Firefox with default settings, the java_ee_sdk-5_03-linux.bin file will get downloaded to your Desktop
  7. Once done, copy the bin file to /opt (under your File System)
Stage 2: Installing the EE Server
  1. Open Applications > Accessories > Terminal
  2. $cd /opt
  3. $chmod +x java_ee_sdk-5_03-linux.bin
  4. $./java_ee_sdk-5_03-linux.bin
  5. Now, Java's GUI installation will begin.
  6. Proceed through the installation normally
  7. At the end, click on Start Server. If the installation proceeded succesfully, you should see a "Your server is up and running" page when you type http://localhost:8080/ in your browser
  8. Also, a SDK directory will be created under /opt
This completes half the story, that is, you built the environment. But still, other applications don't know of its presence, and, in my opinion, you should make it loud and clear! So here's what you do:

Stage 3: Setting up environment variables
  1. Open Applications > Accessories > Text Editor
  2. Copy paste the following things in a new (blank) file:
export JAVA_HOME=/opt/SDK/jdk
export JRE_HOME=/opt/SDK/jdk/jre
export PATH=$JAVA_HOME/bin:$PATH
export J2RE_HOME=/opt/SDK/jdk/jre
export PATH=$J2RE_HOME/bin:$PATH

Stage 4: Configuring the environment for use throughout Fedora
  1. Now save the file as java.sh in /etc/profile.d under your File System
  2. Back, to the terminal, do the following things:
  3. $source /etc/profile.d/java.sh
  4. $which java
  5. If you have proceeded correctly upto this stage, you should see /opt/SDK/jdk/jre/bin/java as the result.
  6. Proceed ahead ONLY IF you get this result. Else, you've gone wrong and must retrace. There's no point in moving forward if you don't get this result.
  7. Now, continue typing in terminal with the following commands:
  8. $usr/sbin/alternatives --install /usr/bin/java java /opt/SDK/jdk/jre/bin/java 2
  9. $usr/sbin/alternatives --config java
  10. Type 2 and hit enter
  11. $java -version
  12. If installation is complete, it should give the following result:
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)

Stage 5: Installing the JRE plugin for Firefox

Now, the final stage remains that of hooking up the JRE with your browser. Assuming you have correctly installed Mozilla Firefox 2.0.0.9 in /usr/lib/firefox do the following:

$ln -s /opt/SDK/jdk/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/libjavaplugin_oji.so

Note that the entire statement above is on a single line, without hitting anywhere in between.

This will complete the entire installation procedure. I know its long and tedious, but trust me, its well worth the effort.

Four pillars of internet completed

The migration to Fedora has gained strength, what with the completion of construction of the four pillars of the internet:
  1. Browser (Mozilla Firefox 2.0.0.9)
  2. Messenger (GAIM; multi-protocol for GTalk and Yahoo)
  3. File-sharing (Limewire 4.14)
  4. Server (Java EE SDK, bundled with JDK+JRE 1.6.0_03)
Now, the full internet experience of Windows is available on Fedora! Detailed setup guides and installation instructions will be published tomorrow. (Its 1:55 midnight as I type) There are lots of them....and they are VERY important. Cya.

Shhh...The next episode is about to begin

As if my achievements under Windows were not enough, now the domain of my knowledge acquisition has shifted to Linux (Fedora Core 6, in particular), and how! Today was a landmark day in the migration to Fedora. The dilapidated structure of Fedora 6 (its a very old release; the latest one being Fedora 8) was today strengthened by the addition of 3 great applications:
  1. Mozilla Firefox 2.0.0.9
  2. Java EE SDK (JDK+JRE included)
  3. Apache Tomcat 6.x
The applications, in effect have given me the latest browser, the latest enterprise (and JSP )server, and the latest JRE, required by many other applications as well. Tomcat, I suppose, will become redundant, what with EE-SDK taking over all Java development duties. In any case, I've been successfully able to run 2 simultaneous servers on Fedora.

Through the process, I've learnt a lot of new things like tarballs, echo, export, UNIX file system and so on. I am sure this knowledge will come in handy some day. The how-to's will follow: