Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Blind55 opened this issue Jan 23, 2020 · 10 comments
Open

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

Blind55 opened this issue Jan 23, 2020 · 10 comments

Comments

@Blind55
Copy link

Blind55 commented Jan 23, 2020

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
  • Distribution & Version: Arch Linux
  • Kernel: 5.4.13-arch1-1
  • Qt Version: 5.14.0
  • liblxqt Version: 0.14.1
  • lxqt-build-tools Version:
  • Package version: 0.14.1-1 (mostly)
@wxl
Copy link
Member

wxl commented Jan 24, 2020

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
Copy link
Member

tsujan commented Jan 24, 2020

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
Copy link
Member

wxl commented Jan 24, 2020

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
Copy link
Member

tsujan commented Jan 24, 2020

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
Copy link
Member

agaida commented Jan 24, 2020

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
Copy link
Member

tsujan commented Jan 24, 2020

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
Copy link
Member

tsujan commented Jan 24, 2020

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
Copy link
Author

Blind55 commented Jan 25, 2020

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

  • one can execute a script if one adds the full path of the executable
  • once one has entered the script name with full path, the history search is helpful

@stefonarch
Copy link
Member

Was about to open an issue for exactly this.

@antis81
Copy link

antis81 commented Jul 3, 2021

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)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants