I forgot something in the initial message, sorry. I would like to guess when a variable was defined from a system configuration file, like /etc/profile, or if it was defined by a user configuration file, such as ~/profile. Is it clear now?
Actually, i am building a GUI application, using pygtk, to configure the environment variables. Using this GUI, the user could define its own variables and the system variables (since it has root access, of course). On Sat, Sep 12, 2009 at 4:27 AM, Markus Hitter <[email protected]> wrote: > > Am 11.09.2009 um 16:02 schrieb Yguaratã C. Cavalcanti: > > is there any way to guess if a environment variable was set by system of >> if >> it was defined by the configuration files? >> > > Well, where exactly do you draw the line between "system" and > "configuration file"? Ubuntu, as installed from scratch, comes with quite a > few configuration files and /etc/profile is usually considered as one of > them. > > I imagined that i could to this by parsing some files such as /etc/profile >> or ~/profile, for example. However it would require a complete bash script >> parser, i guess. >> > > As you can start another shell in a shell, use bash it's self to interpret > it's environment: > > $ bash env > > Bash does distinguish a few modes it can run in: "login shell", "ksh > emulation", etc. See the man page for more. > > > Markus > > - - - - - - - - - - - - - - - - - - - > Dipl. Ing. Markus Hitter > http://www.jump-ing.de/ > > > > > -- Yguaratã C. Cavalcanti M.Sc. in Computer Science - http://www.cin.ufpe.br RiSE Researcher - http://www.rise.com.br/research ------------------------------------------ Home page: http://www.yguarata.com
-- Ubuntu-devel-discuss mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
