Menu

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

v2.0.0
closed
5
2016-07-25
2014-02-06
No

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)
[...]

Related

Bugs: #20

Discussion

  • Andre Bossert

    Andre Bossert - 2014-02-10

    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.

     
  • Andre Bossert

    Andre Bossert - 2014-02-10
    • labels: linux --> linux, preset
    • status: open --> accepted
    • assigned_to: Andre Bossert
     
  • Andre Bossert

    Andre Bossert - 2014-02-10

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

     
  • Christian V. J. Bruessow

    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/<user>/bin/openShell {1}
    

    The string tokenizer is turned off.

     
  • Andre Bossert

    Andre Bossert - 2014-02-13

    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...

     
  • Andre Bossert

    Andre Bossert - 2014-07-13

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

     
  • Andre Bossert

    Andre Bossert - 2015-10-07

    Did you tried the version 1.4.2 with linux?

     
  • Andre Bossert

    Andre Bossert - 2015-10-07

    Please use the new ticket for this issue:
    https://github.com/anb0s/EasyShell/issues/4

     
  • Andre Bossert

    Andre Bossert - 2015-10-07
    • labels: linux, preset --> linux, preset, migrated, GitHub
     
    • Christian V. J. Bruessow

      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)
      at
      com.tetrade.eclipse.plugins.easyshell.command.EasyShellCommand.execute(EasyShellCommand.java:39)
      at
      org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
      at
      org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at
      org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
      at
      org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
      at
      org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
      at
      org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
      at
      org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
      at
      org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
      at
      org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
      at
      org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
      at
      org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
      at
      org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
      at
      org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
      at
      org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1327)
      at
      org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
      at
      org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
      at
      org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
      at
      org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      at
      org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
      at
      org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
      at
      org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      at
      org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
      at
      org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      at
      org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
      at
      org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at
      org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      at
      org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at
      org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      at
      org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
      Caused by: java.io.IOException: error=2, Datei oder Verzeichnis nicht
      gefunden
      at java.lang.UNIXProcess.forkAndExec(Native Method)
      at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
      at java.lang.ProcessImpl.start(ProcessImpl.java:134)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
      ... 49 more

      [...]

      Andre Bossert anb0s@users.sf.net hat am 7. Oktober 2015 um 19:15
      geschrieben:

       * labels: linux, preset --> linux, preset, migrated, GitHub
      

      [bugs:#20] http://sourceforge.net/p/pluginbox/bugs/20/ "cd" cannot
      be used/called like a stand-alone program in configurations under
      Linux

      Status: accepted
      Group: v1.4.1
      Labels: linux preset migrated GitHub
      Created: Thu Feb 06, 2014 08:31 AM UTC by Christian V. J. Bruessow
      Last Updated: Wed Oct 07, 2015 03:48 PM UTC
      Owner: Andre Bossert

      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)
      [...]


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/pluginbox/bugs/20/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      Christian V. J. Br�ssow
      Hirsauer Wiesenweg 49
      D-75365 Calw

      Email: info@cvjb.de

       

      Related

      Bugs: #20

  • Andre Bossert

    Andre Bossert - 2015-10-19

    Thanks, i'm preparing the fix at GitHub for next release, planed for 01.11.15

     
  • Andre Bossert

    Andre Bossert - 2016-05-17

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

    see: https://github.com/anb0s/EasyShell/issues/4

     
  • Andre Bossert

    Andre Bossert - 2016-07-25
    • status: accepted --> closed
    • Group: v1.4.1 --> v2.0.0
     

Log in to post a comment.