Author Topic: compiling in Putty telnet window  (Read 7992 times)

thornev

  • Community Member
  • Posts: 12
  • Hero Points: 1
compiling in Putty telnet window
« on: May 21, 2008, 12:09:03 pm »
Is it possible with SlickEdit v12 to setup a compile task so that SlickEdit executes the command in an SSH session established using Putty?  The SSH session is to a remote z/OS system Unix System Services session.  I know about the z/OS SlickEdit addon, but I don't want to get involved with it.  Thanks.  thorne

livingintown

  • Community Member
  • Posts: 51
  • Hero Points: 2
Re: compiling in Putty telnet window
« Reply #1 on: May 21, 2008, 01:14:59 pm »
If your server support ssh remote command, I think it does. you can use ssh.exe from cygwin to remote run build command to build your product. I used this method in my working environment.

Dan

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: compiling in Putty telnet window
« Reply #2 on: May 21, 2008, 01:29:46 pm »
I've been successfully using PuTTY tools (plink, pageant) for remote development (Windows host) using ssh.
Have a look here for some further details.
Good luck, HS2

thornev

  • Community Member
  • Posts: 12
  • Hero Points: 1
Re: compiling in Putty telnet window
« Reply #3 on: May 22, 2008, 09:17:31 pm »
Thanks Guys.  I tried PLINK and I have a problem.  I can't figure out how to execute files such as "gmake".  I get "file not found" presumably because my PATH never got established as it would if I had logged in manually in which case my .profile is automatically executed.  When I PLINK a session, the environment is pretty much bare. 

Also, I cannot execute any files even when I've done a "cd" into the directory containing the executable.  For example I could not execute .profile.  I again get "file not found".

How do I overcome these problems?  Thanks for the help.  thorne

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: compiling in Putty telnet window
« Reply #4 on: May 22, 2008, 09:52:19 pm »
You've to setup your account carefully. E.g. bash behaves differently depending on the way it's started (interactive login/non-login shell, etc.). See e.g. http://ftp.gnu.org/old-gnu/Manuals/bash-2.05a/html_node/bashref_63.html#SEC63 for further details.
Have a look at this sample scripts to setup your environment consistently.
Besides the PROFILE_READ flag to avoid mult. sourcing /etc/profile the <home>\.bash_profile script just redirects to <home>\.bashrc containing the real bash setup stuff.

Good luck, HS2



livingintown

  • Community Member
  • Posts: 51
  • Hero Points: 2
Re: compiling in Putty telnet window
« Reply #5 on: May 23, 2008, 03:25:01 am »
What you need to do is to call a script remotely, this script will setup all necessary environment which you build env needed.

You should figure out what env variable the building is depending on.

Dan

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: compiling in Putty telnet window
« Reply #6 on: May 23, 2008, 07:55:25 am »
Right, it's just more convenient if the shell setup (e.g. PATH that gmake is found) is the same regardless how the shell is launched (local/remote). And you've to maintain only one script (e.g. .bashrc).
HS2