How to get JRE (Java) working under Chrome Fedora

I recently couldn’t get Java to work under Chrome. Hopefully this can help someone else with the same problem.

Make sure you have java installed. You can do this by running

yum list jre

in the terminal. If it is installed it will be listed under “Installed packages.”

If you do not have Java installed, you can download it here. The download is a .bin file. Navigate to the folder you downloaded it to and issue the command:

chmod +x jre-6u##-linux-i586-rpm.bin

Substitute ## for the update number you downloaded, currently it would be

chmod +x jre-6u27-linux-i586-rpm.bin

(This allows the file to be executed as a program.)

Extract and install JRE by running

sudo bash jre-6u##-linux-i586-rpm.bin

Again substituting ## for the update you downloaded.
So currently it would be

sudo bash jre-6u27-linux-i586-rpm.bin

You will be asked if you want to replace the JRE RPM. I selected yes. You also have the option of no, all, none and rename.

Once you have JRE installed, or if it was already installed, create a link between JRE’s plugin file and Firefox’s plugins folder by issuing this in a terminal.

sudo ln -s /usr/java/jre1.6.0_##/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so

Again, make sure to substitute ## for the current update number so it would be (currently)

ln -s /usr/java/jre1.6.0_27/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so

Restart Chrome. You can check if Java is working here.

Master Sheet Learn VI

The VI editor is a screen-based editor used by many Unix users. The VI editor has powerful features to aid programmers. If you master the use of Vim text editor, it can be a very powerful tool in your hands, and allow you to do amazing text editing feats with just a few taps on your keyboard.

Many beginning users avoid using VI because the different features overwhelm them. To overcome it and practice it more you can use VI in bash. I have also collected some of the short cut keys which will be useful for you to learn VI

To set vi for your terminal run,

set -o vi

Keyboard Shortcut Summary for VI

.--------------.------------------------------------------------------------.
|              |                                                            |
| Shortcut     | Description                                                |
|              |                                                            |
'--------------'------------------------------------------------------------'
| Switching to COMMAND Mode:                                                |
'--------------.------------------------------------------------------------'
| ESC          | Switch to command mode.                                    |
'--------------'------------------------------------------------------------'
| Commands for Entering INPUT Mode:                                         |
'--------------.------------------------------------------------------------'
| i            | Insert before cursor.                                      |
'--------------+------------------------------------------------------------'
| a            | Insert after cursor.                                       |
'--------------+------------------------------------------------------------'
| I            | Insert at the beginning of line.                           |
'--------------+------------------------------------------------------------'
| A            | Insert at the end of line.                                 |
'--------------+------------------------------------------------------------'
| c<mov. comm> | Change text of a movement command <mov. comm> (see below). |
'--------------+------------------------------------------------------------'
| C            | Change text to the end of line (equivalent to c$).         |
'--------------+------------------------------------------------------------'
| cc or S      | Change current line (equivalent to 0c$).                   |
'--------------+------------------------------------------------------------'
| s            | Delete a single character under the cursor and enter input |
|              | mode (equivalent to c[SPACE]).                             |
'--------------+------------------------------------------------------------'
| r            | Replaces a single character under the cursor (without      |
|              | leaving command mode).                                     |
'--------------+------------------------------------------------------------'
| R            | Replaces characters under cursor.                          |
'--------------+------------------------------------------------------------'
| v            | Edit (and execute) the current command in the text editor. |
|              | (an editor defined in $VISUAL or $EDITOR variables, or vi  |
'--------------'------------------------------------------------------------'
| Basic Movement Commands (in command mode):                                |
'--------------.------------------------------------------------------------'
| h            | Move one character right.                                  |
'--------------+------------------------------------------------------------'
| l            | Move one character left.                                   |
'--------------+------------------------------------------------------------'
| w            | Move one word or token right.                              |
'--------------+------------------------------------------------------------'
| b            | Move one word or token left.                               |
'--------------+------------------------------------------------------------'
| W            | Move one non-blank word right.                             |
'--------------+------------------------------------------------------------'
| B            | Move one non-blank word left.                              |
'--------------+------------------------------------------------------------'
| e            | Move to the end of the current word.                       |
'--------------+------------------------------------------------------------'
| E            | Move to the end of the current non-blank word.             |
'--------------+------------------------------------------------------------'
| 0            | Move to the beginning of line                              |
'--------------+------------------------------------------------------------'
| ^            | Move to the first non-blank character of line.             |
'--------------+------------------------------------------------------------'
| $            | Move to the end of line.                                   |
'--------------+------------------------------------------------------------'
| %            | Move to the corresponding opening/closing bracket.         |
'--------------'------------------------------------------------------------'
| Character Finding Commands (these are also Movement Commands):            |
'--------------.------------------------------------------------------------'
| fc           | Move right to the next occurance of char c.                |
'--------------+------------------------------------------------------------'
| Fc           | Move left to the previous occurance of c.                  |
'--------------+------------------------------------------------------------'
| tc           | Move right to the next occurance of c, then one char       |
|              | backward.                                                  |
'--------------+------------------------------------------------------------'
| Tc           | Move left to the previous occurance of c, then one char    |
|              | forward.                                                   |
'--------------+------------------------------------------------------------'
| ;            | Redo the last character finding command.                   |
'--------------+------------------------------------------------------------'
| ,            | Redo the last character finding command in opposite        |
|              | direction.                                                 |
'--------------+------------------------------------------------------------'
| |            | Move to the n-th column (you may specify the argument n by |
|              | typing it on number keys, for example, 20|)                |
'--------------'------------------------------------------------------------'
| Deletion Commands:                                                        |
'--------------.------------------------------------------------------------'
| x            | Delete a single character under the cursor.                |
'--------------+------------------------------------------------------------'
| X            | Delete a character before the cursor.                      |
'--------------+------------------------------------------------------------'
| d<mov. comm> | Delete text of a movement command <mov. comm> (see above). |
'--------------+------------------------------------------------------------'
| D            | Delete to the end of the line (equivalent to d$).          |
'--------------+------------------------------------------------------------'
| dd           | Delete current line (equivalent to 0d$).                   |
'--------------+------------------------------------------------------------'
| CTRL-w       | Delete the previous word.                                  |
'--------------+------------------------------------------------------------'
| CTRL-u       | Delete from the cursor to the beginning of line.           |
'--------------'------------------------------------------------------------'
| Undo, Redo and Copy/Paste Commands:                                       |
'--------------.------------------------------------------------------------'
| u            | Undo previous text modification.                           |
'--------------+------------------------------------------------------------'
| U            | Undo all previous text modifications.                      |
'--------------+------------------------------------------------------------'
| .            | Redo the last text modification.                           |
'--------------+------------------------------------------------------------'
| y<mov. comm> | Yank a movement into buffer (copy).                        |
'--------------+------------------------------------------------------------'
| yy           | Yank the whole line.                                       |
'--------------+------------------------------------------------------------'
| p            | Insert the yanked text at the cursor.                      |
'--------------+------------------------------------------------------------'
| P            | Insert the yanked text before the cursor.                  |
'--------------'------------------------------------------------------------'
| Commands for Command History:                                             |
'--------------.------------------------------------------------------------'
| k            | Insert the yanked text before the cursor.                  |
'--------------+------------------------------------------------------------'
| j            | Insert the yanked text before the cursor.                  |
'--------------+------------------------------------------------------------'
| G            | Insert the yanked text before the cursor.                  |
'--------------+------------------------------------------------------------'
| /string or   | Search history backward for a command matching string.     |
| CTRL-r       |                                                            |
'--------------+------------------------------------------------------------'
| ?string or   | Search history forward for a command matching string.      |
| CTRL-s       | (Note that on most machines Ctrl-s STOPS the terminal      |
|              | output, change it with `stty' (Ctrl-q to resume)).         |
'--------------+------------------------------------------------------------'
| n            | Repeat search in the same direction as previous.           |
'--------------+------------------------------------------------------------'
| N            | Repeat search in the opposite direction as previous.       |
'--------------'------------------------------------------------------------'
| Completion commands:                                                      |
'--------------.------------------------------------------------------------'
| TAB or = or  | List all possible completions.                             |
| CTRL-i       |                                                            |
'--------------+------------------------------------------------------------'
| *            | Insert all possible completions.                           |
'--------------'------------------------------------------------------------'
| Miscellaneous commands:                                                   |
'--------------.------------------------------------------------------------'
| ~            | Invert case of the character under cursor and move a       |
|              | character right.                                           |
'--------------+------------------------------------------------------------'
| #            | Prepend '#' (comment character) to the line and send it to |
|              | the history.                                               |
'--------------+------------------------------------------------------------'
| _            | Inserts the n-th word of the previous command in the       |
|              | current line.                                              |
'--------------+------------------------------------------------------------'
| 0, 1, 2, ... | Sets the numeric argument.                                 |
'--------------+------------------------------------------------------------'
| CTRL-v       | Insert a character literally (quoted insert).              |
'--------------+------------------------------------------------------------'
| CTRL-r       | Transpose (exchange) two characters.                       |
'--------------'------------------------------------------------------------'

Also if you dont have linux / unix machine and still want to practice VI then check Henrik Huttunen has created an online site called Open Vim. The site teaches a Vi beginner how to use this seemingly arcane albeit very powerful text editor.

Open Vim supports most of the basic Vi commands, and then a few more. It is not exactly a complete Vi editor yet however, the author of “OpenVim.com” claims it is still a functional clone of Vim that can aid Vi beginners to master the rudimentary skills in using Vi.

Upgrading Fedora to the latest version

Fedora team have released next version of Fedora i.e Jules Verne Fedora 16. If you already have Fedora 15 installed on your machine, there is an easy way of upgrading your Linux distribution to the latest version Fedora 16.

Steps are as follows:

Update your Fedora 15 system

Run the following command to install any updates to your Fedora 15 distribution.

su -c 'yum update'

Install the ‘preupgrade’ tool
Preupgrade is a GUI tool that walks you through the upgrade process.

su -c 'yum install preupgrade'

Start the preupgrade tool
You can run the preupgrade tool by entering the command in the terminal or via the menu.

$ preupgrade

It will ask you for your root password before presenting you the GUI.

The preupgrade tool will prepare your Fedora 15 system for upgrade.

First you have to choose the version of Fedora you want to upgrade to from the available Fedora releases.

The preupgrade tool will then start downloading the release info; the installer images; determine which packages to download; and download the packages.

Be patient, it will take some time depending upon your internet connection speed.

Lastly it will prepare and test the upgrade.

Start the upgrade process
Once the preupgrade tool has finished doing its job, it will prompt you to reboot.

When you reboot back into Fedora, it will start the Anaconda installer and the upgrade process will start.

No user intervention is required at this stage as everything is done automatically by the Anaconda installer.

The installer will do the dependency check of packages and start upgrading your system.

Post upgrade configuration include installing the boot loader which is automatically installed in the Master Boot Record (MBR) of your machine.

Once the upgrade process is finished, you can log into your brand new Fedora 16 Linux system.

Totem plugins for mp3 & avi on Fedora

To play mp3 and DivX format movies on Fedora you need to install addtional plugins. To install this plugin you need to add rpmfusion-free-release repo, to do so run

rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

Now install plugins by yum,

yum install -y ffmpeg gstreamer-ffmpeg gstreamer-plugins-bad gstreamer-plugins-ugly

Now you can play avi movies without any hassle.

Setting PATH in Linux

PATH is a list of directories where commands are looked for.

The syntax for setting your path is slightly dependent on the shell you are using. You can type the below command on terminal of you can add the same in your .bashrc (Bash shell) or in .cshrc (csh tcsh shell)

For bash shell:

export PATH=$PATH:/usr/sbin/:/usr/local/bin

For tcsh or csh:

set PATH = ($PATH /usr/sbin /usr/local/bin)

If you want to see the existing PATH then run,

echo $PATH
Page 1 of 13123456»10...Last »
rss twitter facbook

Categories

Archives