Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-07-17 09:30:32

iainrs
Member
Registered: 2012-07-23
Posts: 7

Exec path in .desktop files

I've just had a problem after installing the latest version of Rapid Photo Downloader.
details :
https://discuss.pixls.us/t/cannot-run-r … lved/19192

basically the problem is that my $PATH from .bashrc includes '~/.local/bin' but loaders running from the (whisker) menu or
panel cannot find programs/scripts there and I have to add the path to the .desktop exec line.

How can I modify the $PATH used by the .desktop files ?

[Kernel: 4.15.18-041518-generic x86_64
  Desktop: Xfce 4.12.3 Distro: Ubuntu 18.04.4 LTS
CPU:Quad core Intel Core i5 750 (-MCP-) cache: 8192 KB]

Offline

#2 2020-07-17 11:24:12

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,007

Re: Exec path in .desktop files

It doesn't seem like the built-in interpreter is aware of user-based configurations like those set in ~/.bashrc. However, if set globally, it does process it. As per the Arch wiki, if you set the path globally via /etc/profile.d/path.sh (or just /etc/profile if your distro uses it) with the following content:

# If user ID is greater than or equal to 1000 & if ~/bin exists and is a directory & if ~/bin is not already in your $PATH
# then export ~/bin to your $PATH.
if [[ $UID -ge 1000 && -d $HOME/bin && -z $(echo $PATH | grep -o $HOME/bin) ]]
then
    export PATH="${PATH}:$HOME/bin"
fi

...then your ~/bin will be accessible by the interpreter.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB