วันอาทิตย์, มกราคม 29, 2555

Ubuntu: 11.10 x64 - Change Firefox JRE plugin from IcedTea to Sun JRE


To Change Firefox java plugin from IcedTeaWeb to Sun JRE on Ubuntu 11.10


execute at terminal to install java plugin for Firefox

$sudo apt-get install icedtea-7-plugin

If you want to change JRE from icedtea java to Sun JRE do this 

Put following command
$cd /etc/alternatives/

$sudo mv mozilla-javaplugin.so mozilla-javaplugin.ori.so
$sudo ln -s /usr/lib/jvm/jdk1.6.0_26/jre/lib/amd64/libnpjp2.so mozilla-javaplugin.so
To check, what we had changed applied.

$ls -l moz*

lrwxrwxrwx 1 root root 58 2012-01-21 01:38 mozilla-flashplugin -> /var/lib/flashplugin-installer/npwrapper.libflashplayer.so

lrwxrwxrwx 1 root root 58 2012-01-21 01:38 mozilla-javaplugin.ori.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/IcedTeaPlugin.so

lrwxrwxrwx 1 root root 50 2012-01-29 01:38 mozilla-javaplugin.so -> /usr/lib/jvm/jdk1.6.0_26/jre/lib/amd64/libnpjp2.so



วันอังคาร, มกราคม 24, 2555

Ubuntu: reconfig keyboard layout in Ubuntu server

Reconfig keyboard layout in Ubuntu server

sudo dpkg-reconfigure console-setup

Ubuntu: Add permanent static routes

To keep the Static Route persistent or you want to add the route entries to the network script files (not using the route command) then all you need to do is to edit the file


/etc/network/interfaces
and the static routes in the following format:

    up route add [-net|-host] <host/net>/<mask> gw <host/IP> dev <Interface>




sudo cat /etc/network/interfaces

The output should show something like this



# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).


# The loopback network interface
auto lo
iface lo inet loopback


# The primary network interface
auto eth0
iface eth0 inet static
address 172.20.10.1
netmask 255.255.255.0
broadcast 172.20.10.255
gateway 172.20.10.254

# static route
up route add -net 172.20.11.0/16 gw 172.20.10.254 dev eth0


** updated 20120702
from: http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/
Sample: 
You need to insert the dns as follows:

    dns-nameservers 192.168.3.45 192.168.8.10
    dns-search foo.org bar.com


For the change to /etc/network/interface to take effect. please restart the “networking” service as follows:

sudo /etc/init.d/networking restart

ref: http://www.ubuntugeek.com/howto-add-permanent-static-routes-in-ubuntu.html

วันอาทิตย์, มกราคม 22, 2555

Ubuntu: Android development setup resources

To setup Ubuntu desktop ready for Android development


Eclipse SDK  

    Eclipse Classic 3.7.1 http://www.eclipse.org/downloads/

Android SDK

    Download http://developer.android.com/sdk/index.html

    Installing http://developer.android.com/sdk/installing.html

Android ADT
    http://developer.android.com/sdk/eclipse-adt.html

Optional

Subclipse (Subversion plugin for eclipse)http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA

    Eclipse update site URL: http://subclipse.tigris.org/update_1.6.x

Ubuntu: Got an error libncurses.so.5 wrong ELF class when execute adb

 Got an error libncurses.so.5 wrong ELF class when execute adb


when execute adb, got an error like this

#: adb
adb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64

Solution

    Install ia32-libs to the system

sudo apt-get install ia32-libs


Refer to Google documentation here
http://developer.android.com/sdk/installing.html#troubleshooting

Ubuntu: Install javaHL for Subclipse, Eclipse plugin

When starting eclipse after install subclipse plugin. Got an error like this
 
Failed to load JavaHL Library. These are the errors that were encountered: no libsvnjavahl-1 in java.library.path no svnjavahl-1 in java.library.path no svnjavahl in java.library.path

means that we did not install some library files for subversion plugin yet.
Execute this command:

sudo  apt-get install subversion libsvn1 libsvn-java

(re)Start the eclipse there's (should) no such an error occurred.