1

I can't change the PATH at gnome-shell level so I can execute programs in my ~/bin or ~/.local/bin folder from my .desktop files. I am able to easily define other variables through ~/.config/environment.d/envvars.conf e.g. TEXMFHOME. The problem is reported elsewhere and most recently on these pages:

I have changed these files:

~/.bashrc : export PATH="$HOME/.local/bin:$PATH" ~/.config/environment.d/envvars.conf: PATH=$HOME/.local/bin:$PATH TEXMFHOME=$HOME/.texmf # this variable is available at gnome-shell level ~/.pam_environment PATH OVERRIDE=${HOME}/bin:${HOME}/.local/bin:${PATH} /etc/environment PATH=/home/farid/.local/bin:$PATH 

And at my bash prompt in gnome-terminal, I get:

~$ /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator GTK_MODULES=gail:atk-bridge:gail:atk-bridge QT_ACCESSIBILITY=1 PATH=/home/farid/.local/bin:/home/farid/.local/bin:/home/farid/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games PYTHONSTARTUP=/home/farid/.python_startup GCC_COLORS="error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01" VISUAL="vi EDITOR=vi SYSTEMD_EDITOR=vi" TEXMFHOME=/home/farid/.texmf TEXMFCNF=/home/farid/.texmf/web2c:/home/farid/.texmf/web2c: ~$ systemctl --user show-environment HOME=/home/farid LANG=en_US.UTF-8 LANGUAGE=en_US:en LOGNAME=farid PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games SHELL=/bin/bash USER=farid XDG_RUNTIME_DIR=/run/user/1000 GTK_MODULES=gail:atk-bridge QT_ACCESSIBILITY=1 PYTHONSTARTUP=/home/farid/.python_startup GCC_COLORS=$'error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' VISUAL=vi TEXMFHOME=/home/farid/.texmf TEXMFCNF=/home/farid/.texmf/web2c: COLORTERM=truecolor DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DESKTOP_SESSION=gnome DISPLAY=:0 EDITOR=vi GDMSESSION=gnome GDM_LANG=en_US.UTF-8 GNOME_DESKTOP_SESSION_ID=this-is-deprecated GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/64064a9f_0993_4156_8610_1df4e8733ddb GNOME_TERMINAL_SERVICE=:1.92 GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GPG_TTY=/dev/pts/0 GROFF_NO_SGR=1 

The TEXMFHOME variable set in ~/.config/environment.d/envvars.conf file is available to Gnome-shell but PATH seems to be overridden by some program. I am not sure if it's related to systemd or Gnome-shell, But in the reddit link I shared above, a person says the problem stems from Gnome-shell. I expect that when I press alt+f2 and type an executable name which is present in ~/.local/bin/ to be executed.

I reported the bug to Debian gnome-shell package maintainers as well: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104035

If I press alt+f2 and execute sh -c 'echo "$PATH" > /tmp/path', then the content of /tmp/path is:

cat /tmp/path /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games 

If I press alt+f2 and execute sh -c 'echo "$TEXMFHOME" > /tmp/TEXMFHOME', which is defined in ~/.config/environment.d/envvars.conf, then:

cat /tmp/TEXMFHOME /home/farid/.texmf 
6
  • Are you pressing Alt+F2 in the GDM login screen? You haven't logged in there, so none of the files in your ~/ are relevant, and therefore the executable needs to be in ~/.local/bin of the gdm user, not yours. Where are you expecting this to work? Once you are logged in or in the GDM? Commented Apr 24 at 18:58
  • @terdon once I'm logged in. Commented Apr 24 at 19:30
  • Then why is GDM relevant? Wait, when you say "GDM" what do you mean? You mean the Gnome Display Manager, right? The login screen? Or do you use it to refer to the gnome shell? Commented Apr 24 at 19:34
  • Sorry, my mistake. I mean gnome-shell. Because of the gnome GDM issue I linked, I thought perhaps it's related to either GDM or gnome-shell. Commented Apr 24 at 19:34
  • Please try this: press alt + f2 and then paste sh -c 'echo "$PATH" > /tmp/path', run it, and then add the contents of /tmp/path to the question. Commented Apr 24 at 22:38

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.