Author Topic: Remote Development with plink  (Read 8942 times)

bcernohous

  • Community Member
  • Posts: 12
  • Hero Points: 0
Remote Development with plink
« on: February 05, 2007, 03:46:14 am »
I'm evaluating Win XP SlickEdit for remote linux development.  It works pretty "slick" with samba and plink.

I'm doing something similar to what is quoted from another topic here:
>Now it works well now: I added a custom Tool "Remote Compile" with the following call
>Code:
>plink 192.168.0.100 "cd code/cpp/src/testproject && make clean && make all
>The authentication is done with a private key so no passwort entering necessary.
>Also the error parsing seems to work in a short test Smiley

This works great for batch commands like that.  However, sometimes you just want to go interactive.  And I can't make plink work right interactively.  My keystrokes in the slickedit build window are not interpreted by linux.  I end up having to ctl-c out since I can't exit (note that I can do this from a windows command prompt):

L:\>"c:\Program Files\PuTTY\plink.exe" ...

~> cd code/bgp
cd od/bgp

-bash: cd: od/bgp: No such file or directory

~> ls
ls
bglhome  bin  code Desktop  export.out  team tmp

~> cd code
cd ?cde?y
y
-bash: cd: ?cde?y: No such file or directory

~> exit
exi?
-bash: exi?: command not found

~> ^C

L:\>

It understood "ls".  The output has some color control weirdness, would be my guess, but it worked. (It looks the same from a windows command prompt).   But "cd code/bgp" doesn't work.  "cd code" doesn't work. "exit" doesn't work.

bcernohous

  • Community Member
  • Posts: 12
  • Hero Points: 0
Re: Remote Development with plink
« Reply #1 on: February 05, 2007, 03:59:36 am »
Something odd that I noticed about this.  The 4th character is lost. 

Note "ls" works.   So I added leading spaces.
1 space " ls" works.
2 spaces "  ls" becomes "l" according to bash.
3 spaces "   ls" becomes "s".

hs2

  • Senior Community Member
  • Posts: 2735
  • Hero Points: 287
Re: Remote Development with plink
« Reply #2 on: February 05, 2007, 09:28:31 am »
Right, the '[00m...' stuff are esacepe sequnces to colorize ls output (BTW: can be configured/disabled).
Maybe the missing chars are related to the terminal emulation or a mismatching 'LANG' setup of your Linux box.
Try to verify / adjust your putty session standalone first. Is this working correctly ? This can be tricky ...
I guess that SE is not responsible for that.

HS2

bcernohous

  • Community Member
  • Posts: 12
  • Hero Points: 0
Re: Remote Development with plink
« Reply #3 on: February 05, 2007, 02:45:15 pm »
PuTTY works fine.  plink works fine from a command prompt window.  It's just something about plink within SE's windows that is miscommunicating.

I'm working around this by using a "dos plink ..." on SE's command line.  (Actually now I've setup a plink SE macro). This opens a new window where I can do whatever interactive commands I like and then I exit the new dos window and go back to SE.  I'd rather keep my output in SE's window, but this is better than nothing.

~> ls --color=never
bglhome  bin  code  Desktop  export.out  team  tmp
~> cd code
~/code> ls --color=never
code  bgp  get-all.sh
~/code> cd
~> cd code/bgp
~/code/bgp> exit

Hmm.  The linux LANG is "en_US.UTF-8".  Maybe I'll play with that.

hs2

  • Senior Community Member
  • Posts: 2735
  • Hero Points: 287
Re: Remote Development with plink
« Reply #4 on: February 14, 2007, 12:02:54 am »
Now I remember my .bashrc setting (thanks to the reminder here http://community.slickedit.com/index.php?topic=581.msg4763#msg4763).
I changed the default LANG=UTF-8 (which is set my most nowadays Linux distros) to LANG=ISO8859-1 (or better LANG=en_US.ISO8859-1)

HS2

kruegerit

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Remote Development with plink
« Reply #5 on: February 14, 2007, 04:10:56 pm »
Did you try 'export TERM=dumb' somewhere in .profile or... ?

bcernohous

  • Community Member
  • Posts: 12
  • Hero Points: 0
Re: Remote Development with plink
« Reply #6 on: February 14, 2007, 08:54:57 pm »
Neither suggestion (LANG or TERM) helped my environment.  It still appears to lose characters that I type in. 

hs2

  • Senior Community Member
  • Posts: 2735
  • Hero Points: 287
Re: Remote Development with plink
« Reply #7 on: February 14, 2007, 09:39:55 pm »
Hmm - you are not using the 'serial connection' w/o flow control provided by the latest PuTTY beta, right ;)

Ok - maybe the SlickTeam could give a hint, which encoding is used for the typed chars in the .process buffer with an active ssh session or what else could cause this strange effect.

Did you try 'PuTTY -> Session -> Logging' ?

Sorry - no more ideas,

HS2