lxqt / lxqt-runner

Tool used to launch programs quickly by typing their names
https://lxqt.github.io
GNU Lesser General Public License v2.1
45 stars 23 forks source link

local executables are not picked up by lxqt-runner #138

Open Blind55 opened 4 years ago

Blind55 commented 4 years ago
Expected Behavior

User has his own executables located somewhere in his $HOME directory, and set the $PATH environment variable accordingly in, e.g., ~/.profile When executing lxqt-runner, the executables in the $PATH environment should be picked up, so that the user can run them using this tool.

Current Behavior

lxqt-runner does not pick up an individual user's path environment, so executables located for example in $HOME are not found and cannot be executed using lxqt-runner.

Possible Solution

Determine the $PATH environment from the shell somehow (might not be trivial), or maybe allow to configure lxqt-runner to use specific additional directories in a configuration setting?

Steps to Reproduce (for bugs)
  1. create a shell script to execute a task in $HOME directory or subdirectory, and make it executable
  2. set shell $PATH to the location of shell script in 1.
  3. log out/in; from a terminal, the executable will be picked up
  4. use lxqt-runner to try and (try to) execute the shell script
Context

Anyone having shell scripts or executables in their personal $HOME cannot use lxqt-runner to execute them. E.g., I have a script that calls xfreerdp with a specific command line. I cannot call that script from lxqt-runner and always have to use terminal; that is unfortunate.

System Information
wxl commented 4 years ago

I actually use Kubuntu at work and have a bunch of scripts in $HOME/bin which is loaded into $PATH by the default $HOME/.profile in *buntus. I make heavy use of krunner for these scripts. That said, I can see a lot of value to this.

tsujan commented 4 years ago

I'm not a "runner" user -- have removed lxqt-runner from start-up -- but I've seen that lxqt-runner finds scripts in ~/bin (if it's inside $PATH) only when their whole names are typed; then, it could run them too.

wxl commented 4 years ago

Actually, I find that you are correct @tsujan. The thing about needing to type the whole name is a little weird. I made a thingy script and a thingy2 script and if I searched in lxqt-runner for thingy, only that one showed in the results, rather than both of them. Additionally, neither shows with th, thi, thin, or thing. That is potentially a small bug.

tsujan commented 4 years ago

The thing about needing to type the whole name is a little weird.

It isn't weird; it's bad, IMO. lxqt-runner should do its good job with everything in $PATH. A patch is needed.

agaida commented 4 years ago

well, a patch is really needed - didn't noticed this problem because i never ever use local compiled executables for years now. My bad, i have no use case for, obvious reasons ...

tsujan commented 4 years ago

I have 5820 files in /usr/bin. If I type a in pcmanfm-qt, 2498 files will be shown. So, either a fast method of dealing with huge numbers of files should be found or root paths should be ignored. The problem isn't trivial.

tsujan commented 4 years ago

And this is absurd for a runner:

$ echo $PATH
/home/pedram/bin:/home/pedram/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/intel/mediasdk/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
Blind55 commented 4 years ago

You folks have lost me somewhere in the later posts, but I can corroborate that

stefonarch commented 3 years ago

Was about to open an issue for exactly this.

antis81 commented 3 years ago

One can set the PATH in LXQt Session Configuration to achieve what @Blind55 asked for:

lxqt-session-config

Why? Because lxqt-runner is not run from a (login) shell!

Note that setting is "LXQt session wide" and will take effect for practically every application (including bash/zsh)!