Juniper Network Connect Linux Mint Debian 64bit

by on September 29, 2012 at 9:02 pm

I spent the better part of 1-2 hours trying to install Juniper Network Connect SSL VPN software on my machine.  Reason being is that JNC doesn’t natively support x86_64 Java or libraries.  Much of the info online is either out-dated, requires you to run someone’s lengthy hand-written script (no thanks), or just plain wrong.

Here’s everything you need to get JNC running on Linux Mint Debian Edition.  This install assumes a cleanly installed system with packages up to date, and will likely run on similar systems (Debian, Ubuntu, etc).  I’m running Xfce as my desktop, but it should work for all major desktops.

Notes:  I don’t like installing Java or Chrome from repos because repos can get quickly out dated.  This isn’t so much a concern on a rolling distro like Linux Mint Debian Edition, but I still prefer to do it this way.  Also, I come from the RHEL world, and using sudo for every command is too cumbersome for me.  Just sudo su - or su to root to run these steps.

These instructions were written for Linux Mint Debian Edition, currently based on Wheezy/sid

These instructions will likely work on Ubuntu and Debian, but I have no need to test it. :)

apt-get install ia32-libs (I’m not sure if this is required or not)
apt-get install libgtk2-perl libwww-perl (I’m not sure if this is required or not)
apt-get install xterm  (100% required)

Download and install Google Chrome from Google. They provide a simple binary installer on their site.

Download latest JRE from java. You need both x64 and x86.
Untar the files to a temp directory. Be sure to rename the x86 version’s directory to something like jre1.7.0_07_x86

Move those directories to /usr/lib/jvm/

update-alternatives –config java
(should list options if more than one is installed, or give you error saying only one installed)

update-alternatives –install /usr/bin/java java /usr/lib/jvm/jre1.7.07_07/bin/java 2
(The previous is one line, in case it’s line-wrapped for you.  Replace 2 with the next available number if more than one JRE is installed)

This will set the JRE system wide, making it accessible to all programs, etc.

Mad props to dvo on the Ubuntu Community forums for figuring out that JNC doesn’t support x64 libs, and hacking a simple script for the rest of us.

mv /usr/lib/jvm/jre1.7.07_07/bin/java /usr/lib/jvm/jre1.7.07_07/bin/java.orig

Be sure to edit the file for your specific setup.

vi /usr/lib/jvm/jre1.7.07_07/bin/java

if [ $3x = "NCx" ]
 /usr/lib/jvm/jre1.7.0_07_x86/bin/java "$@"
 /usr/lib/jvm/jre1.7.07_07/bin/java.orig "$@"

Make sure the file is world readable and executable ( chmod +rx /usr/lib/jvm/jre1.7.07_07/bin/java )

Now, link plugin for Chrome. Default install path is /opt/google/chrome/

mkdir /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
ln -s /usr/lib/jvm/jre_<version here>/lib/amd64/

Fire up Chrome.  Browse to chrome://plugins/

Disable the IcedTea plugin, so you’ll only be using real JRE.

That should be about it.

Hope this helps anyone who happens to read it.  Please post a comment if I forgot or missed something.

in Debian, How-To, Ubuntu

You can skip to the end and leave a response. Pinging is currently not allowed.