From d84d138cb0f6daa300c73ea868c5a852d5211a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Sat, 20 Apr 2013 03:40:53 +0000 Subject: [PATCH] Added patch so Mac version uses OpenNX Client instead NX Client. This patch has been submited by Virginio from University of Murcia, and fixes the use of Linux Machines one newer MAC versions (Lion & Mountain Lion), that do not includes rosseta anymore, and can't execute NX client. --- nxtransport/jar/nxtransport.jar | Bin 27097 -> 27243 bytes .../src/es/virtualcable/nx/MacApplet.java | 27 ++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/nxtransport/jar/nxtransport.jar b/nxtransport/jar/nxtransport.jar index 8d3496acb7cd0a55a22e312d402877883c522077..f8261e35e074908c226d5a61a719f4f469f63571 100644 GIT binary patch delta 4576 zcmZ8lbySqw*B(kjTDm1A1*Jzw)rtTP*?kJm?*mhZ6h3K~rnWCZ)0x1mLIgv8x@Z=biEwUN1CE zC}_mkNuLh|$M~O8hJ5?ABr~aPKq%3=L35C>;fKK2yyCH)aCsg+-HyX8YgW}~=e)$< z%JZQNk8XTTGqSbQvu%^lL1Z2?>laJ$APkk!pJ9y)Ewr18D@65}RZ80z>(?XsKh;0}p5#$x%5r8u2@%LgW4_?VsU<^Txbji0S@pn^NkMhGd}@26k2-^Sd51z1A2$g+ z(x#Pb1ok|A=>ic4wdZK6O6VAS)nv-MNC1EqDgba-4Uhj-4iHgfMz8`TMS=*hbg3~2 zUg8ePiZ=3*&l4xSuIx1k-Xe5Z;~K$Yq4CBYr4aFECgg)GP$1O zS~4edyZu%E{!%~6#K3;p$NraG&ju2GlV315kR*v>d~$Ci+jc#wZe9uE;cry~j&7$d z1#*XX_I$uW-B4|vm;W?H`gndhC?Kd*RZ{7TUMo|8?QHqv=%b+Vx+CR$gUd;zPR}JwYtE#s&I3fAW|`&VFpuIkwtKo`2ZVe$r{F0Ay*jv zzRl~ItI=l+PMT6LSO-TQ+hzk&^VU=Bb4T59AM>&!+KcN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DIMN9K8`+N20DprrfQ&*h^ z2v4OW<;6!e$6G-E=Y@^-+{WOb&bzv3s%rF`$}!{KCxLBME9=q-@6~l*Dluu9&Iido z@n&S2V8{0n11qgcZR8|KPK_G?X{~rXaoFq{sFqG9f&`sT0`!CS7 zX>^$DWeqqCm!3^y(Ns1ad|KfzbS`zyTO+&w0tSVDY(+m<}A$rUF0NGhLD` zcyg{Svt4TZ4lIA_>p9RvhxsnFBseJ;??B9Y0la_jE8D+baSFfm4>>UW@$a1bdnL{_ zYA{~%DhNjrUv4@mhoXl{-MP$lMp3g~^gS%fIXy)Hfjl|y`{uujvT2_ua)3Q3;>$!K n%j;ddWDtnqc^1#V5;YOvPXr&x;>Zi_LxP%)^!R+X7YY9X!{zSW diff --git a/nxtransport/src/es/virtualcable/nx/MacApplet.java b/nxtransport/src/es/virtualcable/nx/MacApplet.java index 36ce70929..882b453a7 100644 --- a/nxtransport/src/es/virtualcable/nx/MacApplet.java +++ b/nxtransport/src/es/virtualcable/nx/MacApplet.java @@ -6,10 +6,12 @@ import java.util.ArrayList; import java.util.Hashtable; import java.util.UUID; +// Adapted to Mac OS X Lion by Virginio + public class MacApplet implements OsApplet { - private final String[] paths = { "/Applications/NX Client for OSX.app/Contents/MacOS/" }; - private final String nxclient = "nxclient"; + private final String[] paths = { "/Applications/OpenNX/OpenNX.app/Contents/MacOS/" }; + private final String app = "OpenNXapp"; private Hashtable params; private String tmpDir = ""; @@ -17,6 +19,7 @@ public class MacApplet implements OsApplet { private String nxFileName = ""; private String scrWidth; private String scrHeight; + private String msg; public void start() { tmpDir = System.getProperty("java.io.tmpdir") + File.separator; @@ -51,6 +54,7 @@ public class MacApplet implements OsApplet { } catch (IOException e) { javax.swing.JOptionPane.showMessageDialog(null, "Can't save nx temporal file: " + e.getMessage()); e.printStackTrace(); + msg = "DISK_WRITE_ERROR"; return; } @@ -58,25 +62,27 @@ public class MacApplet implements OsApplet { for(int i = 0; i < paths.length; i++ ) { - File f = new File(paths[i] + nxclient); + File f = new File(paths[i] + app); if( f.exists() ) { - execPath = paths[i] + nxclient; + execPath = paths[i] + app; break; } } if( execPath.length() == 0 ) { - javax.swing.JOptionPane.showMessageDialog(null, "Can't find nxclient client.\nShould be at /Applications/NX Client for OSX.app/Contents/MacOS/\nPlease, install it"); - System.err.println("Can't find nxclient."); + javax.swing.JOptionPane.showMessageDialog(null, "Can't find OpenNX. Install it from http://opennx.net/"); + System.err.println("Can't find OpenNX executable"); + msg = "PROGRAM_NOT_FOUND"; return; } ArrayList exec = new ArrayList(); exec.add(execPath); - exec.add("--session"); - exec.add(nxFileName); + exec.add("--session=" + nxFileName); + exec.add("--autologin"); + exec.add("--killerrors"); try { ProcessBuilder pb = new ProcessBuilder(exec); @@ -84,6 +90,7 @@ public class MacApplet implements OsApplet { } catch(Exception e) { javax.swing.JOptionPane.showMessageDialog(null,"Exception at applet:\n" + e.getMessage()); e.printStackTrace(); + msg = "APPLET_ERROR"; return; } } @@ -104,4 +111,8 @@ public class MacApplet implements OsApplet { scrHeight = Integer.toString(screenHeight); } + public String getMessage() { + return msg; + } + }