Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"cd" cannot be used/called like a stand-alone program in configurations under #4

Closed
anb0s opened this issue Oct 7, 2015 · 11 comments
Closed

Comments

@anb0s
Copy link
Owner

anb0s commented Oct 7, 2015

copied from: https://sourceforge.net/p/pluginbox/bugs/20/

Version 1.4.1 of the plugin was installed via the Eclipse Marketplace.
The OS is Linux (openSUSE 12.3 and 13.1, but will apply to all standard Linux distros).
Eclipse is 4.3 (Kepler) with latest updates installed.
"cd" cannot be used like shown in the configuration for CDE. cd is a shell built-in not a standalone command. That is not a CDE speciality, but also valid for all configurations using a standard xterm/rxvt/uxterm.
The error is reported as:
eclipse.buildId=4.3.0.M20130911-1000
java.fullversion=JRE 1.7.0 IBM J9 2.6 Linux amd64-64 20120809_118929 (JIT enabled, AOT enabled)
J9VM - R26_Java726_SR2_20120809_0948_B118929
JIT - r11.b01_20120808_24925
GC - R26_Java726_SR2_20120809_0948_B118929
J9CL - 20120809_118929
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Framework arguments: -product org.eclipse.epp.package.rcp.product -showlocation
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.rcp.product -showlocation
Error
Thu Feb 06 09:23:59 CET 2014
java.io.IOException: Cannot run program "cd": error=2, Datei oder Verzeichnis nicht gefunden
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1040)
at java.lang.Runtime.exec(Runtime.java:626)
at java.lang.Runtime.exec(Runtime.java:494)
at com.tetrade.eclipse.plugins.easyshell.actions.EasyShellAction.run(EasyShellAction.java:173)
at com.tetrade.eclipse.plugins.easyshell.command.EasyShellCommand.execute(EasyShellCommand.java:39)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
[...]

@anb0s
Copy link
Owner Author

anb0s commented Oct 7, 2015

Thank you for reporting this!
I've found description about xterm and dtfile command line parameters:
http://www.x.org/archive/X11R6.8.0/doc/xterm.1.html
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN1/0019____.HTM
I propose to change the commands to:
Shell Open Command:
xterm -hold -e "cd {1}"
Shell Run Command:
xterm -hold -e "cd {1} && ./{3}"
Explore command:
dtfile -folder "{1}"
OR if file selection works too, try to use file name:
dtfile -dir "{3}"
Please try this commands and give me a short feedback about this solution so i can add it to next version.

@anb0s
Copy link
Owner Author

anb0s commented Oct 7, 2015

labels: linux --> linux, preset
status: open --> accepted
assigned_to: Andre Bossert

@anb0s anb0s added this to the v1.5 milestone Oct 7, 2015
@anb0s anb0s self-assigned this Oct 7, 2015
@anb0s
Copy link
Owner Author

anb0s commented Oct 7, 2015

May be the Shell Run Command without hold the window in open state after execution of command:
xterm -e "cd {1} && ./{3}"

@anb0s
Copy link
Owner Author

anb0s commented Oct 7, 2015

Christian V. J. Bruessow (https://sourceforge.net/u/cvjb/profile/)

2014-02-13

xterm -hold -e "cd {1}" will not work as expected as it will open an xterm, change into the directory stored in {1} and wait till the user closes the xterm.
The only solution that works for me with xterm is a script, that I have called "openShell", and use that in the Easy Shell settings.
The script contains a single line:
cd "$*" && /bin/bash
The script is marked executable for the user running the Eclipse IDE.
The Easy Shell calls look like:
xterm -e /home//bin/openShell {1}
The string tokenizer is turned off.

@anb0s
Copy link
Owner Author

anb0s commented Oct 7, 2015

Sorry, but this preset is for xterm configuration. So user wants to open the folder in xterm!? If one want to open it in bash we can create new preset for bash directly without xterm.
For V2.0 i have new concept with user defined preset, it should be easy then...

@anb0s
Copy link
Owner Author

anb0s commented Oct 7, 2015

I will check the bash command for linux systems and provide the right presets for version 1.4.2

@anb0s
Copy link
Owner Author

anb0s commented Oct 7, 2015

Did you tried the version 1.4.2 with linux?

@anb0s
Copy link
Owner Author

anb0s commented May 17, 2016

Christian V. J. Bruessow (https://sourceforge.net/u/cvjb/profile/)

2015-10-19

II'am sorry, but the error still exists with Eclipse "Mars". Here the
stack-trace from the workspace/.metadata/.log:
![...]
!ENTRY com.tetrade.eclipse.plugins.easyshell 4 4 2015-10-19 08:41:11.455
!MESSAGE java.io.IOException: Cannot run program "cd": error=2, Datei
oder Verzeichnis nicht gefunden
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at
com.tetrade.eclipse.plugins.easyshell.actions.EasyShellAction.run(EasyShellAction.java:173)

@anb0s
Copy link
Owner Author

anb0s commented May 17, 2016

Thanks, i'm preparing the fix for next release v1.5.x, planed now for 30.05.16

@anb0s
Copy link
Owner Author

anb0s commented May 17, 2016

related to fix for issue #6

@anb0s anb0s modified the milestones: v1.5, v2.0 May 20, 2016
@anb0s anb0s modified the milestones: v1.5, v2.0 Jun 23, 2016
@anb0s anb0s closed this as completed Jun 23, 2016
@anb0s anb0s modified the milestones: v1.5, v2.0 Jul 4, 2016
anb0s added a commit that referenced this issue Jul 5, 2016
- complete rewrite of plugin with EPL license
  #35 - [v2.0] new license: EPL
- added table view to support adding, removing and change order of
commands
- new name space "de.anbos.eclipse.easyshell"

Addressed enhancement requests:
#9 - Editable / custom commands
#11 - Change argument names
#12 - Change order menue entries
#14 - ability to select which of the 4 options to be visible
#17 - add linux 'nemo' file browser
#21 - add Xfce4 Terminal to linux presets
#23 - add linux 'thunar' file browser
#31 - add support of eclipse variables

Bug fixes:
#4 - "cd" cannot be used/called like a stand-alone program in
configurations under
#6 - gnome-terminal: change to working directory does not work in LMDE
201403
#29 - EasyShell v1.4.2 cannot be installed in Eclipse Neon(4.6.0M5)
#30 - Compatibility Issue with Neon-M7
#45 - EasyShell not compatible with new Eclipse Neon

Signed-off-by: Andre Bossert <anb0s@anbos.de>
@anb0s
Copy link
Owner Author

anb0s commented Jul 5, 2016

done at branch v2_0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant