miawendell / puttycyg

Automatically exported from code.google.com/p/puttycyg
0 stars 2 forks source link

Can't run a command from the commandline #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to launch cygwin from putty and run a command.  This previous worked 
in an older version.

putty.exe -cygter bash.exe --login -i -c "cd /cygdrive/c"

What steps will reproduce the problem?
1. Run the above command from the commandline

What is the expected result?  

Cygwin Terminal with interactive bash prompt in /cygdrive/c directory

What happens instead?

You will get a "Failed to Execute Command"

PutTTYcyg version: 20101029
Cygwin version: latest
Windows version: xp

If you are experiencing performance issues, do you have a multi-core system
or multiple CPUs?

No

Do you have any firewall software installed?

No

Please attach your PuTTY configuration.  Use this Windows command to create
putty.reg:
REG EXPORT HKEY_CURRENT_USER\Software\SimonTatham\PuTTY putty.reg

Please provide any additional information below.

Original issue reported on code.google.com by johnmoo...@gmail.com on 15 Feb 2011 at 9:31

GoogleCodeExporter commented 8 years ago
Sorry i forgot the 'm' on cygterm;

putty.exe -cygterm bash.exe --login -i -c "cd /cygdrive/c"

Original comment by johnmoo...@gmail.com on 15 Feb 2011 at 9:33

GoogleCodeExporter commented 8 years ago
Ok, i figured it out:

putty.exe -cygterm /bin/bash --login -i -c "cd /cygdrive/c"

Original comment by johnmoo...@gmail.com on 16 Feb 2011 at 3:35

GoogleCodeExporter commented 8 years ago
I don't think that -i and -c really work together that way.  What you probably 
want is:

putty.exe -cygterm sh -c "cd /cygdrive/c; exec bash --login -i"

Original comment by medgar123 on 27 Feb 2011 at 1:48