I'm a relatively new user to Linux, so bear with me. I'm currently taking on the Linux From Scratch project, and I have reached a point where it calls for opening a new terminal with certain environment variables. The entire book is intended to be performed in command-line mode, which I am able to access with Ctrl+Alt+f1 (or f2 or f3 or...), but primarily for comfort I prefer to use a terminal window.
The book, in chapter II, section 4.4, calls for the reader to create a
~/.bash_profile with only one command:
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash, which "ensures that no unwanted and potentially hazardous environment variables from the host system leak into the build environment". I've added to the command a dummy variable
Q to ensure that it is functioning properly.
When running Ubuntu in a virtual command line, the script is read as expected, and I have the new terminal with the variables initialized. However, I don't get this behavior if I open a terminal window through the GUI.
Is there any way to open a GNOME Terminal with specific environment variables like what is done by the above
exec for the Linux console?