10

In Xfce, Alt-F2 opens a dialog "Application Finder" (xfce4-appfinder -c). How to customize the $PATH of Xfce's session that is used for auto-completing and running the command?

(It's not the $PATH of .profile or .bashrc)

Kevin Bowen
  • 19,395
  • 55
  • 76
  • 81
Martin Monperrus
  • 742
  • 8
  • 14
  • What version of Xfce? Well, you may consider using a different application launcher instead. One possibility is [xfce4-whiskermenu-plugin](http://gottcode.org/xfce4-whiskermenu-plugin/). Another is `gmrun`; I'm pretty confident that `gmrun` uses the same path as Bash. – landroni Jan 30 '14 at 07:55

2 Answers2

5

I'm a bit late to the party, but for some reason Appfinder was finding things in my customized $PATH for a long time, before suddenly it stopped some time ago.

So, if you're using xinit, then put a file into /etc/X11/Xsession.d/ before the 55xfce4-session file. Like this:

/etc/X11/Xsession.d$ cat 49add-user-path 
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"

And log out, log in, and $PATH is propagated nicely among running components.

PAStheLoD
  • 551
  • 1
  • 5
  • 7
3

Xfce does not check .profile, and .bashrc is only used for interactive bash shells. If you want to add path variables, one way is to add them to ~/.pam_environment. However, the syntax is a little bit different from the usual profile files.

Below is an example to add ~/bin to the path used by Application finder:

PATH DEFAULT=${PATH}:${HOME}/bin
Kevin Bowen
  • 19,395
  • 55
  • 76
  • 81
mp035
  • 151
  • 6
  • Note that this might be Ubuntu-specific, not a feature from XFCE itself: I tried it on Debian Jessie (XFCE 4.10) and it didn't work, Alt+F2 still does not see the programs in `~/bin`. – anol Aug 28 '16 at 15:18