-1

I need to add a folder named "include" and a wine executable "fasm.exe" to Environment Variables.

The Include folder contains .inc files that are important for code execution. Although I am on Assembly, the purpose of this include folder is quite the same as that of the C include folder.

This was quite simple in Windows but I can't figure out a way to do that permanently in Ubuntu 17.10 .

1 Answers1

2

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
wjandrea
  • 14,504