Posted on 09-12-2012 05:43 AM
Anyone know how to programmatically enable a browser plugin? Our VPN solution requires the Java plugin to be active and upon first launch it's disabled. Due to general Safari behavior, enabling the plugin and restarting Safari can become a less than optimal experience. If the Java plugin were enabled to begin with, it would be great.
Thanks
Solved! Go to Solution.
Posted on 09-12-2012 05:48 AM
Hi,
Refer to the below Rich link for enabling JAVA at login. (Thanks Rich)
Regards,
Karthikeyan
Posted on 09-12-2012 05:48 AM
Hi,
Refer to the below Rich link for enabling JAVA at login. (Thanks Rich)
Regards,
Karthikeyan
Posted on 09-12-2012 05:51 AM
Sa-weet.
Thanks. (Rich esp)
Posted on 09-12-2012 06:26 AM
i run this as a launch agent.
#!/usr/bin/perl -w
# config runtime environment
use strict;
use Getopt::Std;
use Sys::Syslog;
use Env qw(HOME);
my $MAC_UUID =system_profiler SPHardwareDataType | awk -F" " '/UUID/{print $3}'
;
chomp($MAC_UUID);
my $byhostdir = $HOME . "/Library/Preferences/ByHost/";
my $date = time - 978307200;
my $javapref = $byhostdir . "com.apple.java.JavaPreferences.$MAC_UUID.plist";
my $plistcmd = "/usr/libexec/PlistBuddy";
(my $progname =$0) =~ s#.*/##;
$ENV{PATH} = '/bin:/usr/bin:/usr/sbin';
umask 0022;
main:
openlog $progname, undef, 'user';
system("mkdir -p $byhostdir") unless (-d $byhostdir);
# Activates the "Enable applet plug-in and Web Start Applications" setting in Java Preferences
syslog('notice', "ensuring Java WebPlugin is enabled.");
system("$plistcmd -c "Add :GeneralByTask:Any:PrefsVersion string 2" $javapref");
system("$plistcmd -c "Add :GeneralByTask:Any:WebComponentsEnabled bool true" $javapref");
system("$plistcmd -c "Add :GeneralByTask:Any:WebComponentsLastUsed real $date" $javapref");
syslog('notice', "startup script complete");
closelog;
exit 0;