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.  

How to install sun-java or sun JDK/JRE in ubuntu

Problem:
Tried to install java using following command:

sudo apt-get install sun-java6-jdk
sudo apt-get install sun-java6-jre
 but got an error message as follows
reading package lists.... done
building dependency tree
reading state information .... done
package sun-java6-jdk is  not available
it has no installation candidate

The solution is :
For Ubuntu 10.04 LTS, the sun-java6 packages have been dropped from the Multiverse section of the Ubuntu archive. It is recommended that you use openjdk-6 instead.
If you can not switch from the proprietary Sun JDK/JRE to OpenJDK, you can install sun-java6 packages from the Canonical Partner Repository. You can configure your system to use this repository via command-line:
     sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
     sudo apt-get update   
     sudo apt-get install sun-java6-jre sun-java6-plugin
     sudo apt-get install sun-java6-jdk 
      sudo update-alternatives --config java
For Ubuntu 10.10, the sun-java6 packages have been dropped from the Multiverse section of the Ubuntu archive. It is recommended that you use openjdk-6 instead.
If you can not switch from the proprietary Sun JDK/JRE to OpenJDK, you can install sun-java6 packages from the Canonical Partner Repository. You can configure your system to use this repository via command-line:
     sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
     sudo apt-get update   
     sudo apt-get install sun-java6-jre sun-java6-plugin
        
      sudo apt-get install sun-java6-jdk
      sudo update-alternatives --config java

Source:  https://wiki.ubuntu.com/LucidLynx/ReleaseNotes#Sun%20Java%20moved%20to%20the%20Partner%20repository



If above does not work (for other version of ubuntu) then you can create local repository as follows:




cd ~/
wget https://github.com/flexiondotorg/oab-java6/raw/0.2.1/oab-java6.sh -O oab-java6.sh
chmod +x oab-java6.sh
sudo ./oab-java6.sh

and then run:
sudo apt-get install sun-java6-jdk
sudo apt-get install sun-java6-jre

Source :   https://github.com/flexiondotorg/oab-java6/blob/a04949f242777eb040150e53f4dbcd4a3ccb7568/README.rst

Monday, May 14, 2012

How to enable java in Firefox

How to enable java in Firefox:

Go to www.java.com -> Downloads
download self extracting tar.gz file  follow the instruction below:


working steps:
Source:     https://discussions.nessus.org/thread/4284 

1. Download the latest java runtime either from www.java.com -> Downloads    or    http://www.oracle.com/technetwork/java/javase/downloads/index.html  (for myself it was jre-7u3-linux-i586.tar.gz)



2. plac it in a folder /usr/local/java and extracted it using
 #tar zxvf jre-7u3-linux-i586.tar.gz



3.  #update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.7.0_04/bin/java" 1



4.  #update-alternatives --set java /usr/local/java/jre1.7.0_04/bin/java



Enable and Configure  (Source:   http://java.com/en/download/help/linux_install.xml#selfextracting)

Firefox or Mozilla
To configure the Java Plugin follow these steps:
1. Exit Firefox browser if it is already running.
2. Uninstall any previous installations of Java Plugin.
Only one Java Plugin can be used at a time. When you want to use a different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one.
3. Create a symbolic link to the libnpjp2.so file in the browser plugins directory
Go to the plugins sub-directory under the Firefox installation directory
cd <Firefox installation directory>/plugins
Create the symbolic link

ln -s <Java installation directory>/lib/i386/libnpjp2.so      libjavaplugin_oji.so

Note: If you are upgrading your Java version then before creating new symbolic link you should remove old symbolic link to enable latest downloaded Java.

To remove old symbolic link:
type cd <Firefox installation directory>/plugins
rm libjavaplugin_oji.so

Example
If Firefox is installed at this directory:
/usr/lib/<Firefox installation directory>
And if the Java is installed at this directory:
/usr/java/<Java installation directory>
Then type in the terminal window to go to the browser plug-in directory:
/usr/lib/<Firefox installation directory>/plugin
Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
ln -s /usr/java/<Java installation directory>/lib/i386/libnpjp2.so   libjavaplugin_oji.so


4. Start the Firefox browser, or restart it if it is already up.

In Firefox, type about:plugins in the Location bar to confirm that the Java Plugin is loaded. You can also click the Tools menu to confirm that Java Console is there.

Test Installatio
check if java applet is enabled in the browser by using the following link

In that webpage, in the LIVE box, it should display
“This web browser can indeed run Java applets”
wait for some time for the display to come.