Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Monday, May 6, 2013

Adjust LCD brightness in ubuntu in command line

1. Find the brightness range for your laptop

cat /sys/class/backlight/intel_backlight/brightness 

2. Set the brightness value

echo 1000 |sudo tee /sys/class/backlight/intel_backlight/brightness 

Thursday, May 2, 2013

Install oracle JDK in Ubuntu


Oracle retired the Operating System Distributor's License for Java, meaning that Canonical could no longer include the JDK or JRE in their APT repositories. This means no more "sudo apt-get install sun-java-whatever"

New Ubuntu installation comes with an open source implementation of Java SE installed, called OpenJDK (Open Java Development Kit), which is not compatible with applications written in Oracle Java.

Following are the steps to install Oracle JDK into Ubuntu

1. Download JDK package in http://www.oracle.com/technetwork/java/javase/downloads/index.html


for Linux x86 (32-bit) : jdk-7u21-linux-i586.tar.gz
for Linux (64-bit) : jdk-7u21-linux-x64.tar.gz

2. Extract the package

tar -xf jdk-7u21-linux-i586.tar.gz

This will extract and create a jdk folder at your current path.

3. Create a location to keep your new JDK . I prefer and usually use /usr/lib/jvm/
You may need root permission to create the /usr/lib/jvm (hence use sudo).

sudo mkdir /usr/lib/jvm

4. Move the extracted jdk folder to /usr/lib/jvm/

sudo mv jdk1.7.0_21 /usr/lib/jvm/

5. Now we have to setup our system to use refer to our new jdk

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_21/bin/java" 1 

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_21/bin/javac" 1 


sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_21/bin/javaws" 1


6. JAVA_HOME environment variable

vi /etc/bash.bashrc

 then add following line in endof the file

JAVA_HOME=/usr/lib/jvm/jdk1.7.0_21
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH


7 . All done.
When you reboot, try running the following:

$ echo $JAVA_HOME
/usr/lib/jvm/jdk1.7.0_21
 echo $PATH
usr/lib/jvm/jdk1.7.0_21 /bin



Thursday, April 25, 2013

Install Ubuntu in VirtualBox

1.Download and install oracle virtual box 
https://www.virtualbox.org/wiki/Downloads

2. Download ubuntu iso from ubuntu website 
http://www.ubuntu.com/download/desktop

3. Open Oracle virtual box and click "New"

4. Select the memory size 

5. Select the " Create a virtual hard drive now" option


6. Select Hard drive file type


7. Select "Dynamically allocated" option for storage 

8. Select the virtual disk size


9. Double click the newly created "ubuntu" label in left side


10. Select the folder icon as show below


11. Select the downloaded Ubuntu iso file


 12. Click start button as below 


 13. Install the Ubuntu