HOWTO: Add a PATH path for keyboard shortcuts  [Solved]

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
frenchiveruti
Posts: 52
Joined: Sun May 02, 2021 8:59 pm

HOWTO: Add a PATH path for keyboard shortcuts

#1 Post 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
Last edited by frenchiveruti on Wed May 05, 2021 2:43 pm, edited 1 time in total.
Argentine 🇦🇷
- Intel P6200 | 4GB RAM | 480 Crucial BX500 SSD | MXLinux 19.4

I have stupid broadcom drivers, see how to fix here: viewtopic.php?t=64470

User avatar
Jerry3904
Administrator
Posts: 23059
Joined: Wed Jul 19, 2006 6:13 am

Re: How to add a PATH to global PATH?

#2 Post by Jerry3904 »

Maybe the Wiki could help: https://mxlinux.org/wiki/system/path/
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
fehlix
Developer
Posts: 12613
Joined: Wed Apr 11, 2018 5:09 pm

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

#3 Post 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.

User avatar
frenchiveruti
Posts: 52
Joined: Sun May 02, 2021 8:59 pm

Re: How to add a PATH to global PATH?

#4 Post 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?
Argentine 🇦🇷
- Intel P6200 | 4GB RAM | 480 Crucial BX500 SSD | MXLinux 19.4

I have stupid broadcom drivers, see how to fix here: viewtopic.php?t=64470

User avatar
fehlix
Developer
Posts: 12613
Joined: Wed Apr 11, 2018 5:09 pm

Re: How to add a PATH to global PATH?

#5 Post 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.

Post Reply

Return to “Tips & Tricks by users”