Author Topic: Problems remote building with plink  (Read 8809 times)

MyPetSlug

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Problems remote building with plink
« on: August 10, 2009, 09:22:59 PM »
Hi All,
I've used the search, but I haven't found an answer to this question.  I'm using slickedit 14.0.2.2 on Windows XP to edit linux files mounted on a network drive.  So, I read a bunch of stuff about using plink to be able to ssh into a remote machine to build.  And plink works fine when I do it from a DOS window and PuTTY itself works fine as well.  However, when I use plink through the slickedit build window (to test to make sure remote building will work in concept), the commands I enter seem to be garbled and I get a double CLI prompt as well.  Example:

]0;jason_raff@m21:~[m21]/home/jason_raff> pwd
pw(reverse-i-search)`': pwd': pw d
[m21]/home/jason_raff> pw
-bash: pw: command not found
]0;jason_raff@m21:~[m21]/home/jason_raff>

Anyone have any idea how to fix this?

Thanks,
Jason

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Problems remote building with plink
« Reply #1 on: August 10, 2009, 09:51:24 PM »
You should avoid the fancy ESCape sequences emitted by your remote shell.
Looks like the bash prompt (PS1 var) is colorized.
See also this and maybe this posting for further details.
Good luck, HS2

MyPetSlug

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: Problems remote building with plink
« Reply #2 on: August 11, 2009, 02:18:07 PM »
Hi HS2,
So, I tried playing with my bash prompt in the remote shell, setting it to just '>' makes it look somewhat better in the build window, but it doesn't fix my garbled input:

]0;jason_raff@m21:~>
]0;jason_raff@m21:~>pwd
pw?d
-bash: pw?d: command not found

I tried setting setting LANG in my remote shell to en_US.  This had no effect either.  I also tried explicitly setting the COMSPEC in vslick.ini to be cmd.exe, but that didn't have any effect either.  Again, this works fine from a normal windows command prompt.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Problems remote building with plink
« Reply #3 on: August 11, 2009, 05:27:46 PM »
Hmm .. strange. Maybe I'm wrong, but your prompt still displays more information than just a '>'.
Did you double check your environment/bash setup ? Just issue e.g. an 'env' command via plink to verify $PS1 and maybe $LANG. If this is fine the only thing I can think of are the PuTTY settings (terminal).
Sorry - no better idea :(
HS2


hp

  • Community Member
  • Posts: 31
  • Hero Points: 1
Re: Problems remote building with plink
« Reply #4 on: August 12, 2009, 12:41:10 PM »
I have actually the same problem when using my cygwin environment in the buildwindow.

Buildwindow:
]0;~
HOLDENPE@CRDW1720 ~
$


Real cygwin output:
HOLDENPE@CRDW1720 ~
$

MyPetSlug

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: Problems remote building with plink
« Reply #5 on: August 12, 2009, 01:14:27 PM »
Hi HS2,
You're right, it's a bit weird, but I just figured that the prompt was standard for plink or something.  Like it went <plink prompt><PS1>. 

So, playing around some more, I still haven't fixed the plink problem, however, I notice that if I enter a command as a plink argument, it actually goes though.  So, I did do that to see what LANG and PS1 were set to, and they were both set correctly.

The problem now is, some of my aliases don't work.  If I use the alias command through plink, I see it has all the correct aliases configured.  However, when I use my alias to cd to the correct source dir, it says bash: <alias I'm using>: command not found.  It seems like others work fine, though I haven't tried them all yet.

Any idea about this?

Thanks,
Jason

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Problems remote building with plink
« Reply #6 on: August 12, 2009, 06:09:06 PM »
@hp: Have a look at this thread related to cygwin bash. It's worth reading all posts. Hope it helps...
@MyPetSlug: For some further plink details this thread might help in addition.
Good luck, HS2