Running 32-bit Firefox with sun-jre in 64-bit Ubuntu
Solution 1
This issue affects people who use Juniper Network Connect where a username, password AND a secure token is required. The mad scientists scripts do not cater for that token despite claiming it does.
I have recently fixed this problem using Swiftfox 32bit version.
First before trying Swiftfox try: "sudo apt-get install ia32-libs". That might be your missing package.
If not then download Swiftfox from http://getswiftfox.com/download.htm. Click deb files and download the intel prescott file. Install it with: "sudo dpkg -i swiftfox_3.6.13-1_prescott.deb". I created a new java folder to place 32bit java in: "sudo mkdir /usr/java" and unzipped the latest Java 7 32bit file to there: "sudo tar -zxvf jre-7u3-linux-i586.tar.gz -C /usr/java".
Now link the plugin to Swiftfox with: "sudo ln -s /usr/java/jre1.7.0_03/lib/i386/libnpjp2.so /usr/lib/swiftfox/plugins/libnpjp2.so"
After all that Juniper Network Connect works flawlessly although I cannot run Swiftfox 32bit and Firefox 64bit at the same time.
Update: Also check out this answer: 130473
Very simple way to use 32bit Firefox and Java together without doing too much other custom configs
Solution 2
Note: The description below is valid if you encounter Juniper <7.3 VPN logins. Juniper/Junos 7.3 and upwards should work out of the box with an up to date Ubuntu install.
I am running Ubuntu 12.04/64bits and also stumbled into this problem. For logging into the Juniper VPN via the web-interface at my Clients site I have to supply user/pass/sms-code. So the mad scientists scripts don't work for me either.
I have crafted a slightly different solution for running a 32bit-browser + 32bit Java compared to what psypher246 writes. I have installed a second Firefox browser, a 32 bit version, besides the main 64 bits version installed by package management. Other solutions describe completely removing the 64 bit browser and replacing it with the 32 bit one, but I don't want to do that. Too much time spent getting that browser the way I want it.
This is what I did.
- Download a recent java-32 bit tarball from Oracle and unpack it where you want it to be (
/opt/java
or/usr/lib/jvm
whatever). You don't need to do theupdate-alternatives
stuff. Just a JRE should be sufficient. - Download a recent pre-compiled 32 bit version of Firefox. Unpack the tarball where you want it. (unpacked mine just in my home folder).
- In the resulting
firefox
folder, there is abrowser
folder. Create aplugins
folder in there and create a link tolibnpjp2.so
in theplugins
folder. (likeln -s <your-32bit-jre>/lib/i386/libnpjp2.so <your-firefox32bit-location>/firefox/browser/plugins/
) - Now start the 32 bit Firefox version from the shell with -p forcing a profile choice. (
cd <your-firefox32bit-location>/firefox
and./firefox -p
). Create a new profile to be used with this 32 Firefox. Make sure Firefox will ask for the profile to be used at every startup. - Now with
about:plugins
in the Firefox address bar you should only see the 32-bit java plugin. With this browser instance, go to the Juniper login page and you should be able to start the VPN session. - You can still start the 64 bit version of Firefox but then select the original (default) profile and the full session with 64 bit plugin's is still there and can be used side by side with the 32 bit Firefox.
The downside of this is that you have to select the correct profile each time you start Firefox, but this can be solved setting default parameters on the command line.
Solution 3
Advantage: Everything is from repositories and keeps up-to-date by the usual updates:
The latest OpenJDK 7 works fine with Juniper VPN. The Sun-jre is not needed any more.
On 12.04 it is possible to install i386 packages on amd64 by appending ":i386" to the package name when running apt-get. So, for example, while running an amd64 Ubuntu 12.04 Live CD, I ran:
sudo apt-get remove firefox openjdk-6-jdk icedtea-6-plugin
sudo apt-get install firefox:i386 openjdk-7-jdk:i386 icedtea-7-plugin:i386
And could then successfully log into the Juniper VPN.
The disadvantage is, Java won't work in other 64bit software like Chrome.
Update: There is no need for 32 bit Firefox in 64bit Ubuntu
From 7.3 onwards, Juniper SA devices support 64-bit Ubuntu for Network Connect.
First, install the 64bit jre/jdk and icedtea
sudo apt-get install openjdk-7-jre icedtea-7-plugin
Second, install the 32bit jre
sudo apt-get install openjdk-7-jre:i386
Note, do not install the 32bit icedtea. Make sure the 64bit is the default java. As long as the 32bit jre exists, Juniper will find the files it needs and run.
Tested on Ubuntu 13.04 64bit.
See Juniper Network Knowledge-base for details.
Also see Juniper setup on 12.04
Related videos on Youtube
rojanu
Updated on September 18, 2022Comments
-
rojanu over 1 year
I am trying to run juniper networks connect program to vpn into work and it only works on 32bit sun jre. All the things I have found with google failed so far. I can't use any scripts, like madscientists, as part of the authentication I need to provide some random characters from a grid.
So to isolate this 32bit app install to a corner, I downloaded firefox and jre and unpack them to /opt. I run firefox with sudo as Juniper asks for root password.
Here is Firefox plugins folder
/ot/firefox32/plugins# ls -la total 8 drwxr-xr-x 2 root root 4096 Mar 11 00:57 . drwxr-xr-x 11 root root 4096 Mar 10 23:48 .. lrwxrwxrwx 1 root root 49 Mar 11 00:57 libnpjp2.so -> /opt/java/32/jdk1.6.0_31/jre/lib/i386/libnpjp2.so
Firefox lists sun jre but when check it with "http://java.com/en/download/installed.jsp" it either can't detect java or Firefox freezes
Any Ideas?
Thanks
-
sudo over 11 yearsThis is an excellent, simple solution, which worked first time for me.
-
Fholst over 10 yearsI have stopped using this solution now. The network I do login to has upgraded their software. Now they are using Junos Pulse with Network connect client version 7.4 (7.4.5-Build27191) and that works perfectly using Chrome/64 bit browser and a 1.7 / 64 bit java. That's on Ubuntu 12.10.
-
Fholst almost 10 yearsAs of version 35 of Chrome, java will not work anymore due to removal of NPAPI interface. So your option is using Firefox (were you have to enable java explicitly again because Firefox quietly disables it). I use the latest Icetea 7 now and that seems ok. Another option is downgrading to Chrome 34 or see if chromium works.
-
aap about 9 yearsThis worked for me... thanks! Instead of messing with ProfileManager I chose to use a different HOME directory for the 32-bit firefox. I have a small wrapper script which says: "HOME=/home/aaron/32 /home/aaron/32/firefox/firefox -new-instance http: //my-webex-uri.webex.com" . Works even if my regular 64-bit firefox is already running.
-
aap about 9 yearsNote, I am using it for webex... for Juniper I hacked an indicator into someone's command line script that doesn't need Java. github.com/aperomsik/jvpn/tree/indicator-wip
-
jerome over 8 yearsNicely done! I can confirm that this approach works for Ubuntu 15.04 as well. Many thanks.
-
juanmf about 8 yearsI also had some dependencies missing:
sudo apt-get install libxcomposite1:i386
libdbus-glib-1.so
sudo apt-get install libdbus-glib-1-2:i386
;libgtk-x11-2.0.so.0:
sudo apt-get install libgtk2.0-0:i386
;sudo apt-get install libcanberra-gtk-module:i386
; and then webex failed anywayJVMLauncher.afterStart(): starting JVM process watcher java.lang.InterruptedException at java.lang.Object.wait(Native Method)
-
guy mograbi almost 8 yearsi think swiftfox is not available anymore. all the download pages return "could not find"
-
Carlo Wood over 6 yearsThese instructions give me: E: Package 'openjdk-7-jre' has no installation candidate E: Unable to locate package icedtea-7-plugin
-
user68186 over 6 years@CarloWood This answer is 5 years old.
openjdk-7-jre
has been superseded byopenjdk-8-jre
, and icedtea-7-plugin byicedtea-8-plugin
. However the newer browsers disable these plugins, so you may want to installicedtea-netx
. The NetX will prompt you to open the java code outside the browser. Let me know if it works.