Subject: Re: Setting environment variables

Re: Setting environment variables

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 15 Jul 2011 00:24:08 -0700

On Fri, Jul 15, 2011 at 12:22:07PM +0530, kali c wrote:
> I tried adding my environmental variables in /etc/bashrc,/etc/profile,/root
> /.bash_profile. But none of them makes the added environmental variables to
> libbssh2 session.

The bash manual contains a section entitled "Bash Startup Files" that
documents exactly how it reads files at startup. Note that it acts differently
depending on whether it's invoked as bash or sh.

> Now, I "source" the environmental variables from a file through libssh2 and
> using it in that particular session. But some variables may not be available to
> us which will be referred from the target system.
>
> Where I can add those environmental variables so that those variables will be
> to the libssh2 sessions? 

libssh2_channel_setenv()

>>> Dan
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-07-15