Author Topic: [SOLVED] Setting environment variables on Linux/Unix/OSX?  (Read 6764 times)


  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
[SOLVED] Setting environment variables on Linux/Unix/OSX?
« on: November 16, 2011, 02:57:08 pm »

With the GetEnvironmentVariable function one can retrieve the content of environment variables.

I can set an environment variable on Windows with the SetEnvironmentVariable procedure in the windows unit.

Is there an equivalent that does that on unix like systems such as Linux/OSX/FreeBSD?


Edit: answer from mailing list, Michael Van Canneyt:
> No. Unix works differently.
> Environment variables are specified on startup, and are then immutable.
> If you want to specify the environment for a process, you must do it at the
> start.
« Last Edit: November 17, 2011, 05:22:10 pm by BigChimp »
Want quicker answers to your questions? Read

Open source including papertiger OCR/PDF scanning:

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified


TinyPortal © 2005-2018