How To: Install Javascript Plugin in Eclipse

Today, I installed Eclipse on my Fedora 7 desktop. Everything is fine, but the default Eclipse does not have a plugin for JavaScript. So , I searched a lot on Google and read a lot of reviews about some JavaScript plugins available for Eclipse. And I finally reached the JSEclipse plugin by Adobe Labs. I had a good experience with it. Its great to work with and if you are looking for a javascript plugin for eclipse, just don’t search any more and install it. JSEclipse can be downloaded from here after registering with Adobe. Following are the simple steps to install the JSEclipse.

Launch Eclipse and do as suggested in images.

Step 1 :

Follow this image :

Help Software Updates Find And Install

Step 2:

Select “Search new features to install” and click next.

Search New Features To Install

Step 3:

Click “New archived site” and select the package or zip file you just downloaded from the above link and click open.

Choose New Archived Site

Step 4: Click OK.

Select Local Zip File And Click Open Then Click OK

Step 5: Check the package if not checked and click next.

Click Finish

Step 6: Check the features you want to install and click next.

Select Features To Install And Click Next

Step 7: Accept Terms and conditions and click next.

Accept Terms And Conditions

Step 8: Click finish and when it ask to restart eclipse just click yes.

Click Finish

Step 9: Voila !! JavaScript plugin is installed now. Have fun with it.

Eclipse With Javascript Plugin

PS: A lot of howtos are pending. Will Try to finish them asap 😀

 

How To: Install Eclipse in Fedora 7

I have decided to stick with Fedora 7 due to the bad experience with Fedora 8 last night and also the difficulties in moving the servers to new os that I am running on Fedora 7. As I wanted to work with Padma in my spare time, so need a good IDE that can handle project in a nice way and can help me to import the cvs from repos online. So, is there any choice I have. There is one and only one – The Eclipse. Some people call it – programming paradise. Some may disagree to that and some other may say that Vim is best to program. I also use Vim quite often and in fact 90% of the time I do so. But using Vim looks confusing when the size of the project is beyond certain extent.

Anyway, here I am going to discuss how to install Eclipse in Fedora 7 because its not there by default. There are two approaches. One is extremely simple and other is extremely difficult.

Approach 1

Use yum do install eclipse. Just issue ‘yum install eclipse-*’ and it’ll be done automatically. But this method takes a very long time as yum will sequentially download the packages and dependencies and its very slow.

Approach 2

If I have a good bandwidth, then I’ll download all the packages and resolve the dependencies myself. But resolving dependencies will be frustrating enough that anyone will switch back to slow yum. But due to certain reasons which I suspect to be memory leaks by Firefox and other apps, my system was damn slow and yum could not do anything even after 10 minutes. It was not even able to download the package list.

So, I decided to download all the packages and install them. I download all the eclipse packages and their dependencies manually and installed it successfully. Here is the list of packages and dependencies so that you need not do rpm -ivh a 100 times 🙂 All these dependencies are available on rpmfind.net and packages can be fetched from any fedora mirror. These are tested on Fedora 7.

Packages

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
eclipse-cdt-3.1.2-8.fc7.i386.rpm
eclipse-cdt-sdk-3.1.2-8.fc7.i386.rpm
eclipse-checkstyle-4.0.1-6.fc7.i386.rpm
eclipse-ecj-3.2.2-15.fc7.i386.rpm
eclipse-jdt-3.2.2-15.fc7.i386.rpm
eclipse-jdt-sdk-3.2.2-15.fc7.i386.rpm
eclipse-pde-3.2.2-15.fc7.i386.rpm
eclipse-pde-runtime-3.2.2-15.fc7.i386.rpm
eclipse-pde-sdk-3.2.2-15.fc7.i386.rpm
eclipse-platform-3.2.2-15.fc7.i386.rpm
eclipse-platform-sdk-3.2.2-15.fc7.i386.rpm
eclipse-rcp-3.2.2-15.fc7.i386.rpm
eclipse-rcp-sdk-3.2.2-15.fc7.i386.rpm
eclipse-sdk-3.2.2-15.fc7.i386.rpm
eclipse-subclipse-1.2.4-2.fc7.i386.rpm
eclipse-subclipse-book-1.2.4-2.fc7.i386.rpm

Dependencies

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ant-1.6.5-4jpp.2.fc7.i386.rpm
ant-antlr-1.6.5-4jpp.2.fc7.i386.rpm
ant-apache-bcel-1.6.5-4jpp.2.fc7.i386.rpm
ant-apache-log4j-1.6.5-4jpp.2.fc7.i386.rpm
ant-apache-oro-1.6.5-4jpp.2.fc7.i386.rpm
ant-apache-regexp-1.6.5-4jpp.2.fc7.i386.rpm
ant-apache-resolver-1.6.5-4jpp.2.fc7.i386.rpm
ant-commons-logging-1.6.5-4jpp.2.fc7.i386.rpm
ant-javadoc-1.6.5-4jpp.2.fc7.i386.rpm
ant-javamail-1.6.5-4jpp.2.fc7.i386.rpm
ant-jdepend-1.6.5-4jpp.2.fc7.i386.rpm
ant-jsch-1.6.5-4jpp.2.fc7.i386.rpm
ant-junit-1.6.5-4jpp.2.fc7.i386.rpm
antlr-2.7.7-1jpp.2.i386.rpm
antlr-javadoc-2.7.7-1jpp.2.i386.rpm
ant-nodeps-1.6.5-4jpp.2.fc7.i386.rpm
ant-swing-1.6.5-4jpp.2.fc7.i386.rpm
ant-trax-1.6.5-4jpp.2.fc7.i386.rpm
avalon-logkit-1.2-4jpp.5.fc7.i386.rpm
checkstyle-4.1-4jpp.1.fc7.noarch.rpm
checkstyle-optional-4.1-4jpp.1.fc7.noarch.rpm
ganymed-ssh2-210-5.fc7.i386.rpm
jakarta-commons-beanutils-javadoc-1.7.0-5jpp.1.i386.rpm
jakarta-commons-cli-1.0-6jpp_10.fc6.i386.rpm
jakarta-commons-dbcp-1.2.1-10jpp.1.fc7.i386.rpm
jakarta-commons-lang-2.1-6jpp.1.fc7.i386.rpm
jakarta-commons-pool-1.3-9jpp.2.fc7.1.i386.rpm
java-1.5.0-gcj-javadoc-1.5.0.0-14.fc7.i386.rpm
jdepend-2.6-6jpp.1.i386.rpm
jdom-1.0-4jpp.1.i386.rpm
jsch-0.1.28-1jpp.6.i386.rpm
junit-3.8.2-3jpp.1.fc7.i386.rpm
jzlib-1.0.7-4jpp.1.i386.rpm
libswt3-gtk2-3.2.2-15.fc7.i386.rpm
lucene-1.4.3-1jpp.18.i386.rpm
lucene-devel-1.4.3-1jpp.18.i386.rpm
subversion-1.4.4-1.fc7.i386.rpm
subversion-javahl-1.4.4-1.fc7.i386.rpm
svnkit-1.1.4-2.fc7.i386.rpm
velocity-1.4-6jpp.1.i386.rpm
werken.xpath-0.9.4-0.beta.8jpp.noarch.rpm
xml-commons-apis-javadoc-1.3.03-0jpp.1.fc7.i386.rpm

So, be sure to fetch the dependencies first. Hope that helps.

 

Bug: Strange libstdc++.so.5 Problem in Fedora 7

After installing jdk-6u2 for Linux from Sun Microsystems’ site, when I ran javaws it gave strange error that libstdc++.so.5 not found and it aborted. I searched for libstdc++.so.5 and it was not there in /usr/lib/ as expected. That implied something is wrong. As I installed jdk-6u2 from rpms, it should have given dependency error for the particular library, bit it didn’t. After searching for sometime I found that libstdc++.so.5 is provided by compat-libstdc++-33 package, which was not installed on my system. After I installing the particular package, everything worked fine.

It worked fine for Fedora Core 6 because compat-libstdc++-33 is provided by default in Fedora Core 6.

But its kind of strange that if libstdc++.so.5 and hence compat-libstdc++-33 is required for jdk-6u2 then why ‘rpm -ivh’ didn’t give dependency error.

 

How To: Configure Procmailrc to Reduce Spam

Last Monday in IIIT Linux Users Group (LUG) meeting, I gave a small presentation regarding how to configure .procmailrc to make very effective filters.

Procmail is a mail delivery agent or mail filter which is widely used on Unix systems to process incoming mails. It is automatically invoked by the mail transport agents like Sendmail whenever there is an incoming mail. Procmail has the power to process all the incoming mails based on the recipes provided by the user and deliver them to the provided destination(either a mail folder or email id or something else like a file or stdout and many more).

Procmail by default searches for a configuration file named .procmailrc in user’s home directory. All the recipes, global variables and other things are provided here by the user to let Procmail know what to do.

Here is an example .procmailrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# .procmailrc 
 
PATH = $PATH
MAILDIR = $HOME/mail
DEFAULT = $HOME/mbox
SHELL = /bin/bash
 
# Backup for testing mode.
#:0 c # Uncomment for testing mode
#Backup
 
:0: # Spam mails should go to Spam folder
* ^(From|Cc|To).*(hi5.com|auctionit|newegg|voilin|mingle)
Spam
 
:0: # Spam mails should go to Spam folder
* ^Subject:.*(Goonj|Spam|Disarmed|Pictures|Re\. Pictures|Sperm|Penis|Viagra|Filename|voilin)
Spam
 
:0: # Mail from Fedora mailing list should go to Fedora
* ^(From|Cc|To).*(fedora-devel|fedorawiki-noreply|bugzilla)
Fedora
 
:0: # Mail from yum mailing list should go to Yum
* ^(From|Cc|To).*yum-devel*
Yum
 
:0: # Mail from/to lug should go to LUG folder
* ^(From|Cc|To).*lug@students.iiit.ac.in
LUG
 
:0: # Lost found mails should go to LostFound folder
* ^Subject:.*(lost|found)
LostFound
 
:0: # Mail from/to life should go to Life folder
* ^(From|Cc|To).*life@students*
Life
 
:0: # Birc mails should go to BIRC folder
* ^(From|Cc|To).*birc@students*
${HOME}/mbox
 
:0: # Mail from/to course should go to Courses folder
* ^(From|Cc|To).*(ec5303|cs3600|cs3150|cs3350|cs3155|cs4460|cs4110)
{
	:0 c
	! kulbirsaini25@gmail.com
 
	:0:
	Courses
}
 
:0: # Mail from/to clubs should go to Clubs folder
* ^(From|Cc|To).*(agents|campusgreen|campusgreenclub|cybergames|dpscm|guitar|music|nss|photography|quizzers|signet|sigops|videography|movie)
Clubs
 
:0: # Mail from/to clubs should go to Clubs folder
* ^Subject:.*(agents|campusgreen|dance|cybergames|dpscm|guitar|music|nss|photography|quizzers|signet|sigops|videography|movie)
Clubs
 
:0: # House mails should go to House folder
* ^Subject:.*(IBCT|House|Tournament|Champion|championship|Inter\ House|chess|cultural|basket|cricket|foot|ball|Physical|PEC|carrom|dumb|TT|IHFT)
House
 
:0: # Mails from Physical Education Center
* ^(From|Cc|To).*pec@iiit.ac.in
House
 
:0: # Returned mail transcriptions to Bounced folder
* ^Subject:.*(Returned mail: see transcript for details|could not deliver mail|bounced|could not send message for past)
Trash
 
:0: # Mails from TopCoder should go to TopCoder folder
* ^(From|Cc|To).*topcoder*
Trash
 
:0: # Default
* ^(From|Cc|To).*
{
	:0 c
	! kulbirsaini25@gmail.com
 
	:0:
	${HOME}/mbox
}

The top few lines are global variables which you need to declare so that Procmail can detect your default mailbox and mail folders, path etc.

These are configured in accordance with the Students mail server at IIIT-H. These global variable declarations are followed by the recipes which guide Procmail to process the incoming mails.

The usual syntax of a recipe is

1
2
3
:0 [flags] [: [lock-file]]
zero or more conditions
one action line or nested actions

Lets start with the conditions line with second recipe from above image. ‘*’ specifies the start of the action line. This ‘*’ is followed by a regular expression which Procmail egreps in the header by default. ‘^’ in regular expression species the start of the line. Then all the mail which are from/to/cced to mail ids which contain auctionit or newegg or violin . e.g. newegg@newegg.com. The condition can span only one line. You can’t write comment in the action line otherwise Procmail will treat it as a part of regular expression. Anywhere else all the characters that follows a ‘#’ in a line are treated as comments or are ignored by the Procmail while processing mails.

Then comes the action line. There can only be action line per recipe unless and until its not nested. Action line may be just a mail folder name or path (relative or absolute). Spam means that all the mails satisfying the regular expression in condition line will be delivered to the Spam mail folder.

The action lines can be nested as in the last recipe in the above image. Procmail can support any level of nesting but the nesting should be proper.

The action line may also be used to forward mails to some other email id. ‘!’ is used in starting of the line followed by the email id to forward the mail.

Now some tips about the first line in the recipe. ‘:0’ is must. But optional flags may be specified. The second ‘:’ asks Procmail to use a lock-file. The need of lock-file is because if your mail account is being swamped with a lot of mails. The Sendmail invokes one copy of Procmail per incoming mail. In that case if two or more Procmail processes try to write the same mail folder, there will be conflicts. So, using the second ‘:’ protect the same mail folder from being written by the two different Procmail processes.

Procmail processes .procmailrc in top-down fashion and stops whenever it finds a matching regular expression in any of the recipes. But you may make it work further buy using the flag ‘c’ as in last recipe. If flag ‘c’ is specified, it will create a carbon copy and give it to the both recipes.

I think thats enough. If you want to explore Procmail more, read man page ‘procmailrc’ and for example procmailrcs read ‘procmailex’ man page.

You can use my procmailrc if you are interested. Find it here.

 

Review: Fedora 7 – Moonshine

As expected, I upgraded to Fedora 7 – Moonshine yesterday. The coolest feature I noticed is that it automatically detected my Ralink WNC-0301 wireless lan card. Well, support for other wireless lan cards like ipw2100, ipw2200 and ipw3945 is also there which is I think the best feature. Because I see a lot of people around fighting with there wireless lan cards to work under Fedora Cores.

The gui is kind of improved but one more cool thing that you will notice is the theme “flying high”. The wallpapers, splash screen, login screen are improved a lot. Overall, the artwork part is worked out hardly. Default font is also nice.

A lot of media players are provided. amarok and kaffeine are included first time but amarok with no mp3 support. You have to install gstreamer and gstreamer08 plugins to make it work. The system preferences menu is totally different with similar tasks being grouped.

In addition to all that now Fedora also has some basic directories in the home directory like Documents, Music, Pictures, Videos, Downloads.

Everything else is the same with upgraded versions.

Here is a Video of my current Fedora 7 desktop.

PS0 : There seems to be some problem after installing the nvidia driver for F7. Follow the procedure here replacing everything related to fc6 by f7 and at the end after configuring your xorg.conf file make these changes

The section “Files” should be like this

1
2
3
Section "Files"
	ModulePath "/usr/lib/xorg/modules,/usr/X11R6/lib/modules/"
EndSection

now restart the xserver and the nvidia will work 😀 .

For more info refer my xorg.conf for F7.

PS1 : If you are a IIITian, I suggest you not upgrade to F7 because iyum is not yet configured to cache F7 rpms and you have to install updates for your OS from the internet and that really sux. So, wait for iyum repo for F7 to be up and then upgrade.

PS2 : Pidgin has some memory leaks … its consuming 2GB virtual memory … here’s the proof … I am back to kopete again 😉

Pidgin Memory Leak

Pidgin Memory Leak

Edit : If you are looking for wireless configuration in Fedora 7, here is a reference.