[haiku-bugs] Re: [Haiku] #18130: XDG_* variables: getenv() gets different results if app is run from a console or from GUI

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 11 Dec 2022 16:24:14 -0000

#18130: XDG_* variables: getenv() gets different results if app is run from a
console or from GUI
------------------------+-------------------------
  Reporter:  bipolar    |      Owner:  nobody
      Type:  bug        |     Status:  new
  Priority:  normal     |  Milestone:  Unscheduled
 Component:  - General  |    Version:  R1/beta4
Resolution:             |   Keywords:
Blocked By:             |   Blocking:
  Platform:  All        |
------------------------+-------------------------
Comment (by bipolar):

 FWIW, I've tested moving the contents of
 `/system/settings/etc/profile.d/xdg_basedirs.sh` into
 `~/config/settings/boot/UserSetupEnvironment`, and removing the original
 `xdg_basedirs.sh` file.

 After a reboot, the test application shows the same (correct) behavior no
 matter if executed via double click from Tracker, or from a bash session
 (XDG_* variables available in both cases).

 Seems like moving those "externs" to `/system/boot/SetupEnvironment` is
 the way to go.

 Proposed change: https://review.haiku-os.org/c/haiku/+/5897
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/18130#comment:4>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: