diff --git a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/WindowsSupport.java b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/WindowsSupport.java --- a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/WindowsSupport.java +++ b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/WindowsSupport.java @@ -185,7 +185,7 @@ // The problem is that is is not in registry... // I.e. we will use it if on msys found on the system... if (candidate == null) { - candidate = new Shell(ShellType.CYGWIN, sh.getAbsolutePath(), parent); + candidate = new Shell(ShellType.CYGWIN, new File(sh.getParentFile(), "bash.exe").getAbsolutePath(), parent); } // Still there is a chance that this installation is // OK (even if it is not in the registry). @@ -343,7 +343,7 @@ return null; } - File sh = new File(root + "/bin/sh.exe"); // NOI18N + File sh = (type == ShellType.CYGWIN) ? new File(root + "/bin/bash.exe") : new File(root + "/bin/sh.exe"); // NOI18N if (!sh.exists() || !sh.canRead()) { return null; diff --git a/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalAction.java b/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalAction.java --- a/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalAction.java +++ b/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalAction.java @@ -133,6 +133,9 @@ String shell = hostInfo.getLoginShell(); // npb.setWorkingDirectory("${HOME}"); npb.setExecutable(shell); + if (shell.endsWith("bash") || shell.endsWith("bash.exe")) { + npb.setArguments("--login"); + } NativeExecutionDescriptor descr; descr = new NativeExecutionDescriptor().controllable(true).frontWindow(true).inputVisible(false).inputOutput(io); NativeExecutionService es = NativeExecutionService.newService(npb, descr, "Terminal Emulator"); // NOI18N