วันศุกร์, เมษายน 29, 2554

Ubuntu Natty 11.04 x64 - Change Firefox JRE plugin from IcedTea to Sun & Flash plugins Npwrapper to Adobe Flash 10

Prerequisted
Download adobe flash 10 for x64 in tar.gz distribution (can't remember from which url, try googling)
Install Sun's JDK as a default JDK.

For Java plugin/JRE
  • going to .mozilla/plugins/
  • find the libjavaplugin.so
  • using ls -la to see its symbolic link  to /etc/alternatives/mozilla-javaplugin.so
  • and /etc/alternatives/mozilla-javaplugin.so also a synbolic link to another place, which is IcedTea's JRE 
  • So we just change /etc/alternatives/mozilla-javaplugin.so point to /usr/lib/jvm/jdk1.6.0_25/jre/lib/amd64/libnpjp2.so 
 * If there's no .mozilla/plugins/ you might want to check this blog instead. To "Change Firefox java plugin from IcedTeaWeb to Sun JRE"

execute at terminal:
    sudo apt-get install icedtea-7-plugin

For Adobe Flash
  • type about:plugins in the address bar
  • find the default Flash plugins remember its path of the .so file
  • mine was point to /var/lib/flashplugin-installer/libflashplayer.so
  • going there  /var/lib/flashplugin-installer/
  • rename npwrapper.libflashplayer.so to npwrapper.libflashplayer.so.bak
  • put the downloaded libflashplayer.so into this folder
  • chmod 777 libflashplayer.so
  • restart Firefox
  • Bingo! 
  • check by enter about:plugins in the address bar
*find my post about howto make a download Sun's JDK to a default JDK

วันพฤหัสบดี, เมษายน 28, 2554

Ubuntu: install Sun's JDK as a default JDK runtime on Natty-11.04


# cd /usr/lib/jvm
# chmod u+x ~/jdk-6u25-linux-x64.bin
# sudo -s 
# ~/jdk-6u25-linux-x64.bin
press spacebar until saw the question, answer yes, extraction begin
# sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_25/bin/java" 1
# sudo update-alternatives --config java

select choice that have path /usr/lib/jvm/jdk1.6.0_25/bin/java; should be choice 1
now test in Terminal
# java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)


JDK download: http://www.oracle.com/technetwork/java/javase/downloads/index.html

reference: http://www.64bitjungle.com/ubuntu/install-java-jre-160-update-x-on-hardy-as-the-default-java-runtime/

วันอังคาร, เมษายน 26, 2554

Ubuntu: Modify AWN to show Chrome's app dock icons more precisely.

When make a shortcut to Chrome application on AWN dock. the icon didnot change to their favicon or our customized icon.

    This is how to do that :-
i.e.:
chromium-browser --user-data-dir=~/.gmail --app=http://www.gmail.com --class=Gmail $*

Explanation
chromium-browser < Chrome executable >
--user-data-dir="< data directory for an app (linuz's) usually is $HOME/.config/google-chrome >"
--app="< URL of an app e.g.: https://docs.google.com/#home" >"
--class="< Name that make this shortcut unique e.g.: Docs $* >"

e.g.:
/usr/bin/chromium-browser --user-data-dir="/home/xample/.config/google-chrome/Default" --app="https://docs.google.com/#home" --class="Docs $*"

วันศุกร์, เมษายน 22, 2554

Ubuntu: Cleaning (your home made/apt-mirror) ubuntu's mirror

    After config apt-mirror to mirroring the Ubuntu Natty 11.04 my office's Ubuntu repository got seriously  out of disk spaces.
PS: my repository use 500GB HDD.
    So, after talk with the college we decided to remove oldest released from our repository; Hardy (8.04 LTS) and Jaunty (9.04).

To cleanup the repository:
- edit the /etc/apt/mirror.list
$ sudo vim /etc/apt/mirror.list
- remove or remark all lines that have word hardy or jaunty (to tell apt-mirror not to download their files or we did not want them anymore :P )
- save changed
- use command (command I got from their configuration file.)
$ sudo /var/spool/apt-mirror/var/clean.sh 

Notice/learn from apt-mirror config file
...
############# config ##################
#
set base_path /var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
set mirror_path $base_path/mirror
set skel_path $base_path/skel
set var_path $base_path/var
set cleanscript $var_path/clean.sh

...

- after execute clean command, let's it do its work.
- you will get your free space back soon.

วันศุกร์, เมษายน 08, 2554