Thursday, June 28, 2012

How to set JAVA_HOME environment variable in Ubuntu


One way that you can set your JAVA_HOME variable and add to your PATH, is be doing the folowing.

As 'sudo' open up /etc/bash.bashrc and add the following to the end of the file. 

NOTE: Set the java path to whatever the actual path is on your environment if it does not match /usr/lib/jvm/java

 

    JAVA_HOME=/usr/lib/jvm/java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

 

When you reboot, try running the following:

 

    $ echo $JAVA_HOME
/usr/lib/jvm/java
echo $PATH
[probably lots of paths]:/usr/lib/jvm/java/bin


Thursday, June 7, 2012

Installation of Open Java in ubuntu

Introduction

Java is a technology from Oracle (formerly: Sun Microsystems). There are several implementations, of which five will be discussed here:

  • OpenJDK: The primary goal of the OpenJDK project is to produce an open-source implementation of the Java SE Platform (6 and 7). This is the default version of Java that Ubuntu uses and is the easiest to install.

  • Oracle (Sun) Java 6: Oracle (Sun) Java 6 is the reference implementation for Java 6.

  • Oracle Java 7: Oracle Java 7 is the reference implementation for Java 7.

  • IBM Java: IBM Java is the preferred Java solution on PowerPC machines. It is a reimplementation with a Just-In-Time Compiler. It is only available from IBM's website.

  • GNU Compiler: A Java compiler made by GNU. Only developers should have to install this.

OpenJDK

Installation of Java Runtime Environment

  • Install the openjdk-6-jre package using any installation method.

  • Install the openjdk-7-jre package using any installation method.

Browser plugin

This plugin works with the main browsers: Firefox, Chromium, Google Chrome, and Epiphany.

On Konqueror, go to Settings → Configure Konqueror... and from menu select Java & JavaScript, then tick Enable Java globally option.

SDK (Software Development Kit)

  • Install the openjdk-6-jdk package using any installation method.

  • Install the openjdk-7-jdk package using any installation method.

Source: https://help.ubuntu.com/community/Java

Friday, May 18, 2012

sudo: must be setuid root

This error means: permissions of the sudoers file has been changed.

Solution:

Boot into Recovery Mode and enter a shell prompt. Then run these two commands.
    chown root:root /usr/bin/sudo  chmod 4755 /usr/bin/sudo


To boot in recovery mode :
Hold the shift key down as soon as you poweron the computer. Silly grub2 hides menu by default unless it detects multiple OS.

Check permissions on this:

Code:
ls -la /etc/sudoers  -r--r----- 1 root root 828 2010-08-03 11:19 /etc/sudoers
To modify if permissions are wrong:
Code:
chown root:root /etc/sudoers
Code:
chmod 440 /etc/sudoers
Source: http://ubuntuforums.org/showthread.php?t=1548164

Tuesday, May 15, 2012

How to enable SCIM in Open Office

Open /etc/X11/xinit/xinput.d/scim

The file contents should be  as follows,

XIM=SCIM
XIM_PROGRAM=/usr/bin/scim
XIM_ARGS="-d"
XIM_PROGRAM_SETS_ITSELF_AS_
DAEMON=yes
GTK_IM_MODULE="scim"
QT_IM_MODULE="scim"



How to install SCIM on LINUX

1. Go to System -> Administration-> Synaptic package manager

 search  "scim" and check the checkbox
search "m17n-db" and check the check box a

2. now click on apply option
3. after installation you will get a key board symbol at upper right corner of desktop
   Right click on this symbol, go into
 Global setup
  check the 'Share the same input method among all application'
 press Apply
4. log out and log in
5. now open any text page
press Control+space
if you get a new icon on right down corner of desktop to select language then ok
otherwise right click on text page
Go in Input Method
select Scim input method

Now press Cntl + space , you will get icon.

Enjoy Typing Indian languages

socket:bind failed

Problem:  
 start festival -i --heap 2100000 --serverthen system gives error: socket:bind failed


Solution: 
run   killall -9 festival       several times(normally 4-5) till it says no process to kill

now run the mentioned command it will work

 
    

ORCA : TIMEOUT: something has hung. Aborting

Problem:
boss@cmj-lcg-dellap:~$ orca

** (orca:6754): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (orca:6754): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (orca:6754): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
TIMEOUT: something has hung.  Aborting.


Solution:

Open
/var/lib/python-support/python2.5/orca/settings.py  or  /usr/lib/pymodules/python2.6/orca/settings.py  if none of the above exists then use$ locate settings.py and find the similar path  now inside settings.py  search for timeout you will gettimeoutTime=10  means default value is 10 change it to 30 save the file and now start orca.