Okay, this is probably gonna sound dumb, but I need to know if it's possible to take a variable held using C++ and make it an environment variable in a Linux terminal. If it makes a difference, I'm using Ubuntu Linux with the Gnome shell.

I'm trying to create a simple GUI for a program that runs in the terminal and requires a lot of typing. What I do type in (being saved as a variable in C++) I need to enter into the program which, stated above, is running in the terminal. :(

I'm trying to create a simple GUI for a program that runs in the terminal and requires a lot of typing. What I do type in (being saved as a variable in C++) I need to enter into the program which, stated above, is running in the terminal. :(

I haven't got you. Could you explain what Kind of app are you using and GUI toolkit you use?

Basically, the program requires a lot of typing. I'm just making a simple CUI (Sorry, not a GUI) that will keep me from having to type a whole lot. Problem is, there is still a little I have to enter into the program. But because I'm entering the info into the program I'm making in C++ I can't use it in the program the CUI is actually for. (If that makes any sense). I can set it as a variable in C++, but not as a environment variable in the terminal, which is what I need to do. I just want to know if there's a way to do that. Transfer a variable held by C++ to an environment variable.

This article has been dead for over six months. Start a new discussion instead.