Recent

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

BigChimp

  • 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 »
Hi,

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?

Thanks.

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 http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

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