Page 1 of 1

HOWTO: Add a PATH path for keyboard shortcuts

Posted: Mon May 03, 2021 7:33 am
by frenchiveruti
Hello. I've been trying to add a path to the global $PATH variable but no luck so far.
I've edited .bashrc, .profile and even /etc/profile and none of them worked for my idea.
My idea was to use a single folder where I would have my personalized keyboard shortcuts scripts such as:
Turn off screen: https://www.humblec.com/how-to-turn-off ... -in-linux/
Show desktop shortcut (IDK why this isn't included by default): http://www.webupd8.org/2009/10/show-des ... me-do.html

The problem I have is that regardless of which file for path I touch, the issue still persists, the keyboard shortcut states that it cannot find the executable.

I'm using the included GUI for keyboard shortcuts.

How should I proceed?
Thanks

Re: How to add a PATH to global PATH?

Posted: Mon May 03, 2021 7:37 am
by Jerry3904
Maybe the Wiki could help: https://mxlinux.org/wiki/system/path/

Re: How to add a PATH to global PATH?  [Solved]

Posted: Mon May 03, 2021 7:50 am
by fehlix
Gui (X11) environment parameters/variables are set differently.
You might do something like this example for having ~/mybin within PATH
Open terminal and run

Code: Select all

echo 'PATH=$PATH:$HOME/mybin'  >>  ~/.xsessionrc
logout and login to take effect.
+++ Added single quotes above.

Re: How to add a PATH to global PATH?

Posted: Mon May 03, 2021 7:59 am
by frenchiveruti
fehlix wrote: Mon May 03, 2021 7:50 am Gui (X11) environment parameters/variables are set differently.
You might do something like this example for having ~/mybin within PATH
Open terminal and run

Code: Select all

echo 'PATH=$PATH:$HOME/mybin'  >>  ~/.xsessionrc
logout and login to take effect.
+++ Added single quotes above.
Why don't you use "export PATH..." in this case?

Re: How to add a PATH to global PATH?

Posted: Mon May 03, 2021 8:07 am
by fehlix
frenchiveruti wrote: Mon May 03, 2021 7:59 am
fehlix wrote: Mon May 03, 2021 7:50 am Gui (X11) environment parameters/variables are set differently.
You might do something like this example for having ~/mybin within PATH
Open terminal and run

Code: Select all

echo 'PATH=$PATH:$HOME/mybin'  >>  ~/.xsessionrc
logout and login to take effect.
+++ Added single quotes above.
Why don't you use "export PATH..." in this case?
PATH is already marked as exported parameter/variable earlier on.