To give you some background, Ubuntu 17.10 uses Wayland by default, which doesn't have environment variables per se since it doesn't run a shell (more info here: GNOME, Wayland, and environment variables). If you're open to switching to Xorg, refer to this question: How do I set environment variables? Otherwise, read on.
If the environment variables are needed for a command-line program, and you use Bash, you can edit your ~/.bashrc
file. Add lines like this for example:
export FOLDER=~/include
If the environment variables are needed for a graphical program, I think you can use this method from the Ubuntu wiki:
Launching desktop application with an environment variable
You can add an environment variable to an application by editing its .desktop file. For example, to run "digiKam" with the environment variable APPMENU_DISPLAY_BOTH=1, find the corresponding digikam.desktop file and add the setting of the variable, via the env command, to the entry "Exec":
Exec=env APPMENU_DISPLAY_BOTH=1 digikam -caption "%c" %i
.bashrc
files... – NerdOfCode Mar 17 '18 at 04:01.bashrc
file, I would have something likefolder="folder_here"
... And then after adding your variables to this file, runsource ~/.basrhc
... – NerdOfCode Mar 17 '18 at 04:08export
variables to put them in the environment. E.g.export folder="folder_here"
– wjandrea Mar 17 '18 at 04:28PATH
environment variable? Your mentioning of an executable makes me think you are, and if so most of the discussion here so far does not address your question very well. – Gunnar Hjalmarsson Mar 17 '18 at 10:52