successfully compiled the program hotcorner
To which directories to copy(/usr/bin or /usr/local/bin? How to copy to have the necessary permissions in the BIN path?
The Makefile is by default set up to copy to /usr/bin/ but generally you’d keep /usr for your distribution’s package management and use /usr/local/bin (or even ~/bin but that’s not setup by default on Endeavour). Functionally it doesn’t actually matter but I’d use /usr/local/bin, i.e.,
make
sudo make PREFIX=/usr/local install
Thanks a lot
Can i use this command for make home directory?
make
sudo make PREFIX=~/usr/bin install
No, if you are asking to install into your home directory as per my mention of ~/bin then you will need to
- If it doesn’t yet exist first have to in fact create
~/bin
as per simplymkdir ~/bin
- Install the program into it with
make PREFIX=~ install
(note; nosudo
needed) - On Arch/Manjaro/Endeavour in fact add
~/bin
to your path (on Debian based distributions it’s by default as long as it exists) by adding to ~/.bashrc a line
[[ -d "$HOME"/bin ]] && PATH="$HOME/bin:$PATH"
- Log out and back in or reboot to have that PATH change active also for the GUI
Need to correct myself: the above will work fine, but specifically as to my point 4… I don’t in fact run Endeavour at the moment and/but when I just now double-checked in a VM, bash hence ~/.bashrc
is not in fact in a standard XFCE session’s process tree.
This is to say that to be correct you should undo the line added to ~/.bashrc
in point 3 and instead add it to ~/.profile
:
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
I see that ~/.profile
does not exist by default on Endeavour but just create it then (and also note the in this case conceptually better single [
over the bash-specific double [[
). You will then again want to log out and back in or reboot.
Or you may decide to not care; it’s not important. The earlier ~/.bashrc
route is fine for working from the terminal – but since I specifically mentioned to “have that PATH change active for the GUI” I still should correct myself. Where to add/tweak environment variables is a bit of a mess over different Linux distributions…
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.