55//
66// Created: Chip Audette, Oct 2013 - May 2014
77// Modified: Conor Russomanno & Joel Murphy, August 2014 - Dec 2014
8- // Modified (v2.0): Conor Russomanno & Joel Murphy, June 2016
8+ // Modified (v2.0): Conor Russomanno & Joel Murphy (AJ Keller helped too) , June 2016
99//
1010// Requires gwoptics graphing library for processing. Built on V0.5.0
1111// http://www.gwoptics.org/processing/gwoptics_p5lib/
@@ -399,6 +399,9 @@ void hubStart() {
399399 if (isWindows()) {
400400 println (" OpenBCI_GUI: hubStart: OS Detected: Windows" );
401401 nodeHubby = launch(dataPath(" Ganglion Hub.exe" ));
402+ } else if (isLinux()) {
403+ println (" OpenBCI_GUI: hubStart: OS Detected: Linux" );
404+ nodeHubby = exec(dataPath(" Ganglion Hub" ));
402405 } else {
403406 println (" OpenBCI_GUI: hubStart: OS Detected: Mac" );
404407 nodeHubby = launch(dataPath(" Ganglion Hub.app" ));
@@ -421,6 +424,14 @@ boolean hubStop() {
421424 }
422425}
423426
427+ /**
428+ * @description Helper function to determine if the system is linux or not.
429+ * @return {boolean} true if os is linux, false otherwise.
430+ */
431+ private boolean isLinux () {
432+ return System . getProperty(" os.name" ). toLowerCase(). indexOf(" linux" ) > - 1 ;
433+ }
434+
424435/**
425436 * @description Helper function to determine if the system is windows or not.
426437 * @return {boolean} true if os is windows, false otherwise.
@@ -1015,4 +1026,4 @@ PVector getWindowLocation(String renderer) {
10151026 }
10161027 return l;
10171028}
1018- // END OF CODE FOR FIXING WEIRD EXIT CRASH ISSUE -- 7/27/16 ===========================
1029+ // END OF CODE FOR FIXING WEIRD EXIT CRASH ISSUE -- 7/27/16 ===========================
0 commit comments