Monday, June 3, 2013

Install Java plugin to firefox in Ubuntu

Ubuntu:
1. Download the JRE (Java Runtime Environment) / JDK (Java Development Kit) 7 from here:
The file type for Ubuntu is the .tar.gz
Note: The JDK is for developers. Do not download unless you plan on programming in Java.
2. Unpack (or untar, or extract) the .tar.gz file in the desired directory. Type:

tar -zxvf filename

3. Install Java 1.7 to alternatives. Type:

sudo update-alternatives --install /usr/bin/java java /your/java/directory/jre/bin/java 3

Note: Replace /your/java/directory/, with the directory where you extracted the .tar.gz
4. Choose your Java version using alternatives. Type:

sudo update-alternatives –config java

Then choose the option that points to your Java 7 directory.
Note: If you have chosen the JDK, your javac will not be updated. Typing the javac -version command will return the previous Java’s version javac. I do not know how to fix this.
5. Configure the Java browser plugin.
You will have to use a symbolic link to configure the plugin.
Type:

ln -s /your/java/directory/jre/lib/your system architecture/libnpjp.so /your/brower/plugins/directory

Note: /your/java/directory/ is wherever you extracted the .tar.gz
Also, /your system architecture/ is the architecture type of the Java .tar.gz file you downloaded. This will either be i386, or amd64. If you are unsure which, open a file manager, go to your Java directory, and go to the jre/lib/ directory. If a folder entitled amd64 is there, you have the x64-bit version. If not, you have the x32-bit.
Another thing to note, the /your/browser/plugins/directory/ is your browser’s plugins directory. Example: if you are using Mozilla’s Firefox, your plugins directory is /usr/lib/mozilla/plugins/
6. Test the plugin. Restart your browser, and go to
Java Tester
Click the Java Version button. If the pink box says Java 1.7.0 from Oracle, you have configured the plugin correctly.
Installing Java 1.7 goodness for Ubuntu. Enjoy :)

Tuesday, August 7, 2012

Windows CMD

Find process runing on a port
netstat -ano | findstr  1433

a  ->  Displays all connections and listening ports.
n  ->  Displays addresses and port numbers in numerical form.
o  ->  Displays the owning process ID associated with each connection.

Full Screen the command prompt
type wmic in command line



Tuesday, July 3, 2012

Cygwin

After a long time with unix based environment I had to move into windows. So bad .. Windows command prompt is so poor. But fortunately cygwin rescued me.


Vim editor on cygwin.

First time it didn't work correctly. but after copying /usr/share/vim/vim62/vimrc_example.vim to ~/.vimrc it worked fine.


Integrate with windows folders
Create .reg file with following content.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\bash]
@="Open Bash Shell Here"

[HKEY_CLASSES_ROOT\Directory\shell\bash\command]
@="c:\\cygwin\\bin\\bash.exe --login -i -c 'cd \"`cygpath \"$*\"`\";bash' bash %L"

[HKEY_CLASSES_ROOT\Drive\shell\bash]
@="Open Bash Shell Here"

[HKEY_CLASSES_ROOT\Drive\shell\bash\command]
@="c:\\cygwin\\bin\\bash.exe --login -i -c 'cd \"`cygpath \"$*\"`\";bash' bash %L"

If you prefer for mintty change according as below.

C:\cygwin\bin\mintty.exe --exec /bin/bash --login -c "cd '%1%'; exec /bin/bash -rcfile ~/.bashrc"


Thursday, April 26, 2012

Create a git server

http://technology.mattrude.com/2009/07/creating-a-secure-git-repository-server/

Monday, April 2, 2012

Wireless on fodora 16

after some desperate attempts I was able to install correct wifi driver in my dell vostro machine with yum install kmod-wl But some times you might need to install fushion free updates before running above commond.

Sunday, February 19, 2012

Using Curl

I prefer curl than wget.

http://superuser.com/questions/149329/how-do-i-make-a-post-request-with-the-curl-command-line-tool

Sunday, January 29, 2012

Adding Security Domain in JBOSS

if you need to use a specific authentication system, then you need to specify it in jboss as below



java:/jaas/jmx-console



here I have configured it to /jaas/jmx-console. that is the application policy defined for jmx console. It has been defined in server/default/conf/login-config.xml as below




props/jmx-console-users.properties
props/jmx-console-roles.properties

Writing Client

In jboss 5.1 I was able to login with following
// SecurityClient client = SecurityClientFactory.getSecurityClient();
// client.setSimple("admin", "admin");
// client.setSimple("chan", "abc");
// client.login();

But in jboss 6 that didn't work. But adding user name and password to jndi.properties as below, I was able to login to the system.

java.naming.security.principal=chan
java.naming.security.credentials=abc