[arch-general] PATH variable not set in DE (GNOME)
Hello list, I'm currently experiencing something weird on a (less than regularly, but recently) updated Arch machine. After the last update some graphical programs that rely on the path variable being properly set stopped working. In particular one application uses exiftool, and works properly if started from the command line. However, if I open an image, the application complains that it can not find exiftool. So I checked in a terminal: $ which exiftool /usr/bin/vendor_perl/exiftool $ echo $PATH .../usr/bin/vendor_perl... BUT if I put the following code in a file #!/bin/sh env > /tmp/env and execute it via GNOME (double click the file and select 'run') and then check the PATH variable in /tmp/env it does _not_ include the perl directory. What is the correct way to set this variable? I always thought it is set in /etc/profile.d/ but it is already there. # grep -R vendor_perl /etc grep: /etc/systemd/system/multi-user.target.wants/lm_sensors.service: No such file or directory grep: /etc/pacman.d/gnupg/S.gpg-agent: No such device or address /etc/profile.d/perlbin.csh:[ -d /usr/bin/vendor_perl ] && setenv PATH ${PATH}:/usr/bin/vendor_perl /etc/profile.d/perlbin.csh:[ -d /usr/lib/perl5/vendor_perl/bin ] && setenv PATH ${PATH}:/usr/lib/perl5/vendor_perl/bin /etc/profile.d/perlbin.sh:[ -d /usr/bin/vendor_perl ] && PATH=$PATH:/usr/bin/vendor_perl /etc/profile.d/perlbin.sh:[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=$PATH:/usr/lib/perl5/vendor_perl/bin Is there some way I do not know about? Is this a GNOME problem, or is something else causing this? The program used to run and find exiftool. I checked with the developer because my first thought was that they changed something about how they detect exiftool. They did not. Thank you for your help! Maximilian
On Sat, Apr 25, 2015 at 3:03 AM, Maximilian Kaul <archlinux@maxkaul.de> wrote:
So I checked in a terminal:
$ which exiftool /usr/bin/vendor_perl/exiftool
$ echo $PATH .../usr/bin/vendor_perl...
BUT if I put the following code in a file
#!/bin/sh env > /tmp/env
and execute it via GNOME (double click the file and select 'run') and then check the PATH variable in /tmp/env it does _not_ include the perl directory.
What is the correct way to set this variable? I always thought it is set in /etc/profile.d/ but it is already there.
Take a look at [1]. Basically the profile configuration files are for shell environments, but a DE is not a shell and is not run from one. According to that page, you can add the graphical environment in $HOME/.xinitrc. HTH [1]: https://wiki.archlinux.org/index.php/Environment_variables
/etc/environment is an option. This is used by pam_env, and applies to all PAM-authenticated sessions. However /etc/profile.d is used by most DEs. Did you export PATH? On 2015年04月25日 09:03, Maximilian Kaul wrote:
Hello list, I'm currently experiencing something weird on a (less than regularly, but recently) updated Arch machine. After the last update some graphical programs that rely on the path variable being properly set stopped working. In particular one application uses exiftool, and works properly if started from the command line. However, if I open an image, the application complains that it can not find exiftool. So I checked in a terminal:
$ which exiftool /usr/bin/vendor_perl/exiftool
$ echo $PATH .../usr/bin/vendor_perl...
BUT if I put the following code in a file
#!/bin/sh env > /tmp/env
and execute it via GNOME (double click the file and select 'run') and then check the PATH variable in /tmp/env it does _not_ include the perl directory.
What is the correct way to set this variable? I always thought it is set in /etc/profile.d/ but it is already there.
# grep -R vendor_perl /etc grep: /etc/systemd/system/multi-user.target.wants/lm_sensors.service: No such file or directory grep: /etc/pacman.d/gnupg/S.gpg-agent: No such device or address /etc/profile.d/perlbin.csh:[ -d /usr/bin/vendor_perl ] && setenv PATH ${PATH}:/usr/bin/vendor_perl /etc/profile.d/perlbin.csh:[ -d /usr/lib/perl5/vendor_perl/bin ] && setenv PATH ${PATH}:/usr/lib/perl5/vendor_perl/bin /etc/profile.d/perlbin.sh:[ -d /usr/bin/vendor_perl ] && PATH=$PATH:/usr/bin/vendor_perl /etc/profile.d/perlbin.sh:[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=$PATH:/usr/lib/perl5/vendor_perl/bin
Is there some way I do not know about? Is this a GNOME problem, or is something else causing this?
The program used to run and find exiftool. I checked with the developer because my first thought was that they changed something about how they detect exiftool. They did not.
Thank you for your help! Maximilian
On 15-04-25 09:45:15, Rodrigo Rivas wrote:
According to that page, you can add the graphical environment in $HOME/.xinitrc.
I tried the following [snip] export PATH=${PATH}:/usr/bin/vendor_perl [snip] exec gnome-session but it did not help. On 15-04-25 15:56:19, Carl Lei wrote:
/etc/environment is an option. This is used by pam_env, and applies to all PAM-authenticated sessions.
I put the line PATH=${PATH}:/usr/bin/vendor_perl in /etc/environment with the effect that I was no longer able to log in to GNOME. The loginmanager resets after entering the password and prompts me again for user/pass. Removing the line from /etc/environment fixes this behavior.
However /etc/profile.d is used by most DEs. Did you export PATH?
Not that I'm aware of. Until the last update I didn't need to do anything. The perl files (.csh .sh) in /etc/profile.d are as they were shipped by the perl package and as far as I understand they do export PATH.
participants (3)
-
Carl Lei
-
Maximilian Kaul
-
Rodrigo Rivas