Skip to content

Setting PATH with environment.d does not work on debian #6414

Closed
@rumpelsepp

Description

@rumpelsepp

Submission type

  • Bug report
  • Request for enhancement (RFE)

systemd version the issue has been seen with

233; debian version: 233-10

Used distribution

Debian Testing

In case of bug report: Expected behaviour you didn't see

I have this content in my ~/.config/environment.d/99-defaults.conf:

GOPATH=$HOME/Go
PATH1=$GOPATH/bin:$HOME/.cargo/bin:$HOME/.local/bin:$PATH
PATH=$GOPATH/bin:$HOME/.cargo/bin:$HOME/.local/bin:$PATH

After a login in gnome3 I expect to see $PATH and $PATH1 to be equal;; with expanded $GOPATH prepended.

In case of bug report: Unexpected behaviour you saw

On a shell I get this instead:

$ printenv PATH PATH1 GOPATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
/home/stefan/Go/bin:/home/stefan/.cargo/bin:/home/stefan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/home/stefan/Go
$ systemctl --user show-environment
...
GOPATH=/home/stefan/Go
PATH1=/home/stefan/Go/bin:/home/stefan/.cargo/bin:/home/stefan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/u
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
...

In case of bug report: Steps to reproduce the problem

Create that file from above, relogin to gnome, open a terminal and type printenv.

$PATH seems to be hardcoded somewhere which overwrites my setting; important fact: I use gnome on wayland. So I have no shellscripts that are being exectued during login.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Programming errors, that need preferential fixingnot-our-bugpid1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions