public String getRawSettings() throws IOException { String ret = MSystem.execute("/bin/sh","-c","echo $COLUMNS $LINES $TERM")[0]; return ret; }
public String[] getRawSettings() throws IOException { return MSystem.execute("cmd.exe", "/c", "mode con"); }
public static String getRawTTYSettings() { try { String ret; ret = MSystem.execute("/bin/sh","-c","stty -a < /dev/tty")[0]; return ret; } catch (IOException e) { return e.toString(); } }
private void findVersion() { valid = false; version = null; if (binary == null || binary.indexOf("soffice") < 0) return; try { String[] res = MSystem.execute(binary,"--version"); version = res[0]; valid = MString.isSet(version) && version.startsWith("LibreOffice "); } catch (IOException e) { if (MSystem.isUnix()) { // retry with unix default location File f = new File("/usr/bin/soffice"); if (f.exists() && f.canExecute()) { binary = f.getPath(); try { String[] res = MSystem.execute(binary,"--version"); version = res[0]; valid = MString.isSet(version) && version.startsWith("LibreOffice "); } catch (IOException e2) { } } } } }