You are not logged in.
I asked on SE but so far haven't gotten a solution so I thought I'd ask here.
https://unix.stackexchange.com/question … box/370944
How can I get a script to run from the lxpanelctl run box in LXDE? I have a script which can be run directly from a terminal using just the script name, and I added it successfully to the lxpanel main menu. Entering the full path in the run box works but I wonder if there isn't a way to let me simply type what I'd type in a terminal--the script name--and run the script.
Many thanks!
Lee
Last edited by lkblkb (2017-06-25 08:29:53)
Offline
What is the full path to the script? It sounds like it is in a nonstandard PATH, but you add that location to your PATH variable in interactive shells.
However, that revision to the PATH is not made before you log in to X so the run box doesn't inherit it. The solution is to set the PATH in the parent process to whatever starts X.
How do you start X?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Wow, fast reply. Thanks!
I'm afraid I don't know. My guess that the answer might be ... with LXDM? Sorry, I'm quite new to Linux.
Offline
I'm afraid I don't know.
So ... you're not using archlinux?
How did you install your system?
Mod note: moved to N.C. for now.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Yes, running Arch with the last pacman -Syu last week so it's fairly current.
I am running a live USB installed according to valleycat.org/foo/arch-usb.html. However this does not include any instructions for installing a DM or DE. I just used pacman to install the lxde group, as far as I recall. So x windows is being started however LXDE starts it by default. I never had to configure that myself.
Offline
You are using LXDM which reads environmental variables from /home/<user>/.xprofile. So first add the location of your script to the path like this in .xprofile
export PATH="${PATH}:/home/<user>/bin"Now any script you put in /home/<user>/bin will be available with just script name, from next login.
READ: Environmental variables & xprofile page on archwiki
Arch is home!
https://github.com/Docbroke
Offline
Somehow my installation does not have ~/.xprofile.
The script I'm trying to run was originally in ~/bin. I just copied it to /usr/local/bin and now it will run from the lxpanel run box. So it seems ~/bin is indeed missing from $PATH as sourced by LXDM--probably /etc/profile. That's just a guess though, based on the contents of /etc/lxdm/Xsession, which has /etc/profile as the first thing under Load profile. None of the other locations listed actually contain anything.
Marking as solved but anyone is free to comment further ![]()
Thanks Trilby and Docbroke!
Offline
You can just create .xprofile file in your home folder and add bin folder to that. That will avoid using superuser previlages every time you need to edit or add new custom scripts.
Arch is home!
https://github.com/Docbroke
Offline