This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | "Open in Terminal" always opens in /home/myusername | ||
---|---|---|---|
Product: | cnd | Reporter: | terje7601 |
Component: | Terminalemulator | Assignee: | ilia |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
terje7601
2016-04-13 12:43:43 UTC
Thanks for reporting an issue! I've experienced some problems with Cygwin paths. I'll try to reproduce your configuration early next week. Do you have non-latin characters, spaces int your path? Or it fails to open for any path? It fails to open for any path. For example, I just created a new "Java Application" project, and did "Open in Terminal" on the generated Java class. The expected directory was: /cygdrive/c/Users/vanelvan/Documents/NetBeansProjects/JavaApplication7/src/javaapplication7 but Cygwin opened in the default directory. If I do a "cd" to this directory in the terminal, it correctly changes the directory, so I'd say it's not a problem with Cygwin. Thanks! And after you cd manually, does terminal changes it's title? Usually it has title like "localhost - <your current cwd>" and updates every time you change directory to another one. Yes, the tab changes its title every time. I don't know if it matters, but my title doesn't have the "localhost - " prefix. When I do "Open in Terminal", the title is just "~" When I do cd, the title is "<cwd>", possibly cut off if it's too long: "...end/of/very/long/path" For some reason Terminal's NativeProcessBuilder on Windows starts in home dir and ignores the "setWorkingDirectory("someDir"). Still investigating. This issue appears only under Cygwin. Reason: When we open run bash under our Terminal we use --login option. When --login is used bash reads /etc/profile among other init files. In Cygwin /etc/profile contains lines: # Make sure we start in home unless invoked by CHERE if [ ! -z "${CHERE_INVOKING}" ]; then unset CHERE_INVOKING else cd "${HOME}" || echo "WARNING: Failed attempt to cd into ${HOME}!" fi which resets our efforts to run bash in a correct directory. |