Tag Archives: firefox

[HOWTO] Install Sun/Oracle Java JDK 7 in Fedora 15

Sun/Oracle Java JDK 7 may be required to run some applications that are not compatible with OpenJDK which can be installed using package manager in Fedora 15. Here is how to do it. Open the terminal and use the following commands:

For 64-bit

wget "http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.rpm"
su -c 'rpm -i jdk-7-linux-x64.rpm'

For 32-bit

wget "http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.rpm"
su -c 'rpm -i jdk-7-linux-i586.rpm'

If you already have OpenJDK/OpenJRE installed, you will need to configure your system so that the applications use the Sun/Oracle Java version instead of OpenJDK/OpenJRE. Here is how to do it:

su -c 'alternatives --install /usr/bin/java java /usr/java/jdk1.7.0/jre/bin/java 20000'
su -c 'alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0/jre/bin/javaws 20000'
su -c 'alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0/bin/javac 20000'
su -c 'alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0/bin/jar 20000'

For 64-bit:

su -c 'alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jdk1.7.0/jre/lib/amd64/libnpjp2.so 20000'

For 32-bit:

su -c 'alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jdk1.7.0/jre/lib/i386/libnpjp2.so 20000'

Hope this helps.

20 Things to do after installing Fedora 15

Here are few things you can do after installing Fedora 15 to make the experience better. You may have to enable sudo to follow some of the tips or you can run the commands in terminal by logging in as root (su). The following are in no particular order. Feel free to skip the ones you do not need.

1. Enable sudo

2. Install yum-fastestmirror plugin
yum-fastestmirror selects the fastest mirror for updating and installing packages. It can be installed by running the following in the terminal:

sudo yum install yum-fastestmirror

3. Add shutdown menu item permanently

4. Install flash player

5. Add minimize, maximize title bar buttons

6. Enable delete key in Nautilus

7. Enable right click on desktop and add Desktop folder on the Desktop

8. Show date on top panel

9. Install nautilus open terminal
If you use terminal a lot, you may want to have “Open in terminal” in folders in Nautilus file manager. To do so, install the package nautilus-open-terminal

sudo yum install nautilus-open-terminal

10. Install a torrent client
If you download via torrents, you will need a torrent client. While Fedora ships with Transmission Torrent Cliene, I prefer Vuze (Azureus) (written in Java). It can be installed by running the following in the terminal:

sudo yum install azureus

You may also like deluge (written in Python, Gtk) which is also an excellent alternative. It can be installed by running the following in the terminal:

sudo yum install deluge

11. Install Google Chrome
Although Firefox 4 is shipped by default, you may want to have a secondary browser or may prefer Google Chrome. You can simply download rpm from Google Chrome download page and install it. The package will automatically insert repository information so that you get updates from update manager.

12. Install Libreoffice
Libreoffice is available in the repository. I recommend “Add/Remove Software” to select and install office tools you need. libreoffice-writer (Word processor) and libreoffice-calc (Spreadsheet) is all I need. You may also want libreoffice-impress (Presentation) and libreoffice-draw (Drawing).

13. Install Thunderbird
I prefer Thunderbird to Evolution. You can install it from repository by running the following in the terminal:

sudo yum install thunderbird

14. Install a clipboard manager
If you do a lot of writing or programming, you will love a clipboard manager. I like parcellite and it is available in the repos as well. It can be installed by running the following in the terminal:

sudo yum install parcellite

UPDATE: You may also like another clipboard manager called GPaste which integrates well with Gnome Shell.

15. Install Google Voice and Video chat
If you use Google Voice, you can download and install rpm package from Google Voice and Video Download page.

16. Add support for media formats

17. Install support for rar and 7z archive formats
Rar is a proprietary format but it is used widely and you may encounter rar files so it is handy to have it installed.

sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
sudo yum install unrar

7z is also a popular format and it is also available in the repository.

sudo yum install p7zip p7zip-plugins

18. Install Gimp
Fedora does not ship with an image editor. I prefer Gimp and it can be installed by running the following in the terminal:

sudo yum install gimp

19. Install gnome-tweak-tool to customize fonts, themes etc
gnome-tweak-tool can be installed by running the following in the terminal:

sudo yum install gnome-tweak-tool

Run it (press Alt+F2 and type in gnome-tweak-tool) and change the settings. It does not have OK or Apply and simply selecting the options performs the changes. Some changes may require logging out and logging back in.

20. Install skype
Skype is a popular text, voice and video chat tool. You can download and install rpm from this link. If you have 32-bit, installation will be straightforward. However, if you have 64-bit, please read this post.

Please share what you did after installing Fedora 15 in the comments.

[HOWTO] Install Firefox 4 in Ubuntu 10.04 Lucid Lynx and 10.10 Maverick Meerkat

Firefox 4 has been released recently and it is not available via update manager in Ubuntu 10.04 Lucid Lynx and 10.10 Maverick Meerkat. The Ubuntu Mozilla Daily Build PPA provides it but it always the latest daily build and not the stable version.

For stable version, you can use Firefox Stable PPA. To install the PPA in Lucid or Maverick, just launch Synaptic (System>Administration>Synaptic Package Manager) and then go to Settings>Repositories>Other Software. Now click Add and paste in the following:

ppa:mozillateam/firefox-stable

Close the Repositories window and then click reload. When it is done, search for firefox-4.0-gnome-support and mark it for installation. It should mark other required packages. Apply and wait for installation to finish.

[SOLVED] Selenium server not working in Netbeans 6.9.1

I am using Fedora Core 14 and have installed Selenium Module for PHP. I was not able to run PHPUnit tests on Yii Framework. I tried running Selenium server 1.0.1 and upgrade to 1.0.3 solved the problem.

I downloaded the Selenium Remote Control from here and extract the file selenium-server.jar, renamed it to selenium-server-1.0.1.jar and placed it in /home/myusername/.netbeans/6.9/modules/ext/selenium overwriting the old jar. Then I restarted Netbeans. Now, testing works.

Hope this helps.

[HOWTO] Install Firefox 4 in Fedora 14

Firefox 4 is currently in beta and not available in the Fedora repository. However, it can be installed by adding Spot repository from FedoraPeople. To install, open up the terminal and run the following from terminal as root (to be root, run su and enter root password):

wget http://repos.fedorapeople.org/repos/spot/firefox4/fedora-firefox4.repo -O /etc/yum.repos.d/firefox4.repo
yum install firefox4

When done, Firefox 4 is ready to use.

[HOWTO] Install Firebug in Firefox 4

The latest stable version of Firebug is 1.6 which is compatible with Firefox 3.x. If you have Firefox 4 as your default browser, you may be miss this extension. Firebug 1.7 is under development and the latest version available at the time of this writing is 1.7X.0a7. You can install it from Firebug 1.7 releases page. Note that it is still in alpha stage of development and may have several bugs.

Best Download manager for Linux

I am using Ubuntu 10.10 Maverick Meerkat and had been using the following programs for downloading stuff from the Internet:

Firefox Default Download Manager for HTTP/FTP Downloads and Deluge for Torrents.

It was not much convenient because Firefox resume does not always work in case of crashes or in case of power cuts. Also it does not support multi-threaded downloads. So, I decided to try out Fatrat along with Flashgot firefox add-on. Fatrat and Flashgot both can be installed from Ubuntu Software Center. If you are using beta or development version of Firefox, then you need to get it from Firefox Addons Website or Flashgot website.

Fatrat, like Free Download Manager (which is currently only available for Windows), can be used as a torrent client, HTTP/FTP Download Manager, Rapidshare download (it waits for appropriate time automatically and downloads), Youtube Download (at the time of writing this, Youtube download seems not to be working) and much more.

It supports remote control via jabber and web interface.

Since Flashgot does not support Fatrat by default, you will need to add support for Fatrat. When it asks for path, enter /usr/bin/fatrat. After that, you can select and right click a link and Flashgot it. You can also select Flashgot>Fatrat when the download box comes up.


When you click OK, Fatrat should show the add link dialog.

Have fun downloading.

[HOWTO] Make Firefox faster and more responsive using RAMDISK

I am using Firefox 3.6.6 on my Ubuntu Maverick Meerkat Alpha and wanted to experiment with it.

Firefox uses the profile directory to read and write settings, bookmarks, saved passwords, extension preferences etc. When Firefox is launched, it reads those from profile directory and constantly accesses and writes information to the directory. I thought keeping this in RAM could make Firefox faster. To do so, I wrote a small script that copies the profile to RAMDISK and launches Firefox with that profile directory.

First of all, you will need to increase the RAMDISK size so that it can hold the profile directory. The profile directory can grow with cached files so you may want to limit caching appropriately by setting lower the values of browser.cache.disk.capacity and browser.cache.offline.capacity in about:config. You can set the RAMDISK size by editing /etc/default/grub and appending ramdisk_size=SIZE_IN_BYTES to GRUB_CMDLINE_LINUX_DEFAULT. To edit, you will need to open it as root (gksu gedit /etc/default/grub). The line should look like the following after the edit if you want the RAMDISK size to be approximately 256Mb:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ramdisk_size=256000"

After saving the file, you need to run the following command from the terminal to update grub

sudo update-grub

Now, restart your computer for changes to take effect.

When this is done, save the following file as /usr/local/bin/firefox-ram. Uncomment (remove hash from) the line containing PROFILE_PATH and change the path to your Firefox profile directory.

#!/bin/bash

# firefox_ram v0.1 by _khAttAm_
# www.khattam.info
# July 09, 2010
# Needs RAM_DEVICE larger than the size of profile directory
# Needs zenity installed
# Copyright (C) 2010  _khAttAm_

# will not run as intended and may cause data loss if profile directory
# is full or ramdisk is smaller than profile directory size

#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.

#    See .

# Change the following

PROFILE_PATH=/home/pravin/.mozilla/firefox/e2k9jth5.default/

if [ ! -n "$PROFILE_PATH" ];
then
	zenity --info --text="Profile path not set. Please edit the script \

	to set firefox profile path."
	exit
fi

USER_NAME=$USERNAME
TMP_PROFILE_DIR=/home/$USERNAME/.mozilla/firefox/ramdisk/

RAM_DEVICE=/dev/ram0

if [ -f /tmp/firefox-ram-lock ]

then
	zenity --info --text="Only one instance is allowed. If no instances\
	 are open, it may be performing post save operations. Please wait a\
	 few moments and try again. If this persists and you are sure \
	 nothing is going on, just remove /tmp/firefox-ram-lock and run \

	 again."
	exit
fi

touch /tmp/firefox-ram-lock

echo "

umount $RAM_DEVICE
mkdir -p $TMP_PROFILE_DIR
umount $TMP_PROFILE_DIR
mount -t ext2 $RAM_DEVICE $TMP_PROFILE_DIR
">/tmp/firefox-ram-pre-pre.sh

chmod +x /tmp/firefox-ram-pre-pre.sh
gksu sh /tmp/firefox-ram-pre-pre.sh

# the following needs to be run as root

# this could be done by using gksu followed by command for each,
# but gksu has problem with commandline option -R
# hence the commands that need to be run as root are written to
# a temporary file and then executed using gksu
echo "
umount $RAM_DEVICE
mke2fs $RAM_DEVICE

mkdir -p $TMP_PROFILE_DIR
umount $TMP_PROFILE_DIR
mount $RAM_DEVICE $TMP_PROFILE_DIR
">/tmp/firefox-ram-pre1.sh
chmod +x /tmp/firefox-ram-pre1.sh
gksu sh /tmp/firefox-ram-pre1.sh

PROFILE_DIR_SIZE=`du -s $PROFILE_PATH | cut -f1`

#echo $PROFILE_DIR_SIZE

RAM_DISK_SIZE=`df -k| grep $RAM_DEVICE|cut -d' ' -f16`

#echo $RAM_DISK_SIZE

if [ "$RAM_DISK_SIZE" \< "$PROFILE_DIR_SIZE" ];
then
	zenity --info --text="The size of RAMDISK ($RAM_DISK_SIZE bytes) is\

	 not large enough to hold the profile directory \
	 ($PROFILE_DIR_SIZE bytes). This program can't continue. Either \
	 increase the size of RAMDISK or clear history and cache to reduce \
	 the size of profile directory."
	rm /tmp/firefox-ram-lock
	exit

fi

echo "
cp -u -R $PROFILE_PATH* $TMP_PROFILE_DIR
chown -R $USER_NAME $TMP_PROFILE_DIR
chmod -R 744 $TMP_PROFILE_DIR*

">/tmp/firefox-ram-pre2.sh
chmod +x /tmp/firefox-ram-pre2.sh
gksu sh /tmp/firefox-ram-pre2.sh

echo `date +%s` > $TMP_PROFILE_DIR/firefox_ram.chk

#run firefox with profile directory as the one in ramdisk

firefox -profile $TMP_PROFILE_DIR

#copy profile back to HDD
cp -u -R $TMP_PROFILE_DIR* $PROFILE_PATH

rm /tmp/firefox-ram-lock

Now, Alt+F2 and firefox-ram to run Firefox with profile from RAM. You should enter your password when asked as this is required to create and work with RAMDISK. The first launch can be a little slow, but subsequent launches should be quicker. You can also create a launcher in your dock or your Desktop for easy access.

Please note that when using this script, you should not switch between the other Firefox as that may cause data loss (loss of bookmarks, settings changes etc.). Also, you are advised to backup your profile directory regularly while using this script as it may cause data loss.

Please suggest improvements and changes in the script.