Showing posts with label browser. Show all posts
Showing posts with label browser. Show all posts

Thursday, November 7, 2013

Update oracle java on debian linux

i recently ran into a situation where i needed to update java on my debian linux system. this update needed to include the java plugin for my firefox browser, which is a security vector, but is required for some work tasks. my setup is NOT using the default openjdk package that debian provides. i prefer to use oracle java. i wrote a bash script to make all the required calls to update-alternatives to complete the update. below are the steps i followed.

i downloaded the necessary jdk linux tarball from http://www.oracle.com/technetwork/java/javase/downloads/index.html to /share.


>su -
>mkdir /usr/local/src/java
>cp /share/jdk-7u##-linux-i586.tar.gz /usr/local/src/java
>cd /usr/local/src/java
>tar -xvzf jdk-7u##-linux-i586.tar.gz
>bash /share/updateJava.sh
>exit



below are the contents of the script updateJava.sh :


# this script uses debian's update-alternatives to update
# to the latest version of java

javaRoot="/usr/local/src/java/jdk1.7.0_45/"

update-alternatives --install /usr/bin/java java "$javaRoot""bin/java" 1
update-alternatives --install /usr/bin/javac javac "$javaRoot""bin/javac" 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so "$javaRoot""jre/lib/i386/libnpjp2.so" 1

update-alternatives --set java "$javaRoot""bin/java"
update-alternatives --set javac "$javaRoot""bin/javac"
update-alternatives --set mozilla-javaplugin.so "$javaRoot""jre/lib/i386/libnpjp2.so"


 



below is the output of my system:

>java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Server VM (build 23.21-b01, mixed mode)
 

>bash /share/updateJava.sh
update-alternatives: using /usr/local/src/java/jdk1.7.0_45/bin/java to provide /usr/bin/java (java) in manual mode
update-alternatives: using /usr/local/src/java/jdk1.7.0_45/bin/javac to provide /usr/bin/javac (javac) in manual mode
update-alternatives: using /usr/local/src/java/jdk1.7.0_45/jre/lib/i386/libnpjp2.so to provide /usr/lib/mozilla/plugins/libjavaplugin.so (mozilla-javaplugin.so) in manual mode
 

>java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Server VM (build 24.45-b08, mixed mode)


info taken from:
http://www.redirecttonull.com/?p=250

Tuesday, November 5, 2013

Update flash plugin in firefox on debian linux

i had an issue where i couldn't watch videos on youtube. i got a message about upgrading the flashplayer in my firefox browser on my debian linux system. after some googling i found the debian wiki page that details how to upgrade the flash plugin for the browser. i executed the following command as root:

update-flashplugin-nonfree --install

if you are behind a proxy like i am the command looks like:

http_proxy=http://myproxy:port update-flashplugin-nonfree --install


info taken from :
https://wiki.debian.org/FlashPlayer

also see:
http://tuxmark.blogspot.com/2013/10/flash-not-working-in-firefox-on-linux.html

Thursday, October 24, 2013

Flash not working in Firefox on linux

i recently had an issue with successful playing youtube videos in my firefox browser on my debian linux machine. i previously installed the flashplugin-nonfree package to use as the flash plugin and everything worked fine for a while.

after googling around i came to the realization that the following packages

browser-plugin-gnash
gnash
gnash-common

were installed at some point and prevented the correct rendering of flash videos. so i removed the gnash packages with the following command.

aptitude purge browser-plugin-gnash gnash gnash-common


after removing the gnash packages, youtube and other flash videos began working again as expected.

so, how do i prevent gnash from being installed again and causing future problems. i found several interesting solutions, a few are listed at the bottom of this post. i decided to place a hold on the gnash packages (while uninstalled). below is the command i used.

aptitude hold browser-plugin-gnash gnash gnash-common


i've never used hold with apt before, so hopefully this will prevent any future installs of gnash. if anyone has a successful experience preventing specific packages from being installed, i would definitely like to hear your solution.

also check out:
http://tuxmark.blogspot.com/2013/11/update-flash-plugin-in-firefox-on.html


below are a few links i found while researching this issue.

http://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html
http://askubuntu.com/questions/75895/how-to-forbid-a-specific-package-to-be-installed
http://serverfault.com/questions/17046/preventing-specific-packages-from-getting-installed-in-debian