GithubHelp home page GithubHelp logo

Comments (8)

aristocratos avatar aristocratos commented on August 26, 2024

@daniejstriata
The PREFIX variable defaults to /usr/local/bin if not set by user which is default behaviour in most makefiles.
Running as superuser is not a requirement, the make setuid command is optional and added for convenience, so defaulting to /usr/local/sbin wouldn't be a good fix.

Might I suggest that you add /usr/local/bin to your path instead, since that's the path most user installed software will end up by default...

from btop.

daniejstriata avatar daniejstriata commented on August 26, 2024

It only seems to happen on Mint. My Fedora 34 setup does not have this issue. Closing.

from btop.

daniejstriata avatar daniejstriata commented on August 26, 2024

@aristocratos I would like to continue the discussion and point out another issue.

  1. Install script always add bin in-front of the binary. This will cause undesired installation:
    Install command:
    make install PREFIX=/usr/local/sbin
    Output:
    Installing binary to: /usr/local/sbin/bin/btop
    I would've expected the install script to honour the path I gave it without adding bin.

  2. By default Centos 7 also do not include the default path to /usr/local/bin. That makes sense from this statement below.

/usr/local/bin is for programs that a normal user may run. /usr/local/sbin is for system administration programs (which are not part of the core OS) that a local administrator may run. By default, a normal user does not have /usr/local/sbin on their path.

Would /usr/local/sbin not be the better install location without having to make changes to everyone's path? What I've done is to create a symlink for the binary in bin to sbin.

from btop.

aristocratos avatar aristocratos commented on August 26, 2024

@daniejstriata
btop++ is not a "system administration program" it's a system monitor like top, ps or htop and just like them belongs in */bin.
The PREFIX variable defines where the desired top level folder containing bin and share is located.
The themes and readme also uses the PREFIX to get correct location.
If you really want btop in your sbin folder you're gonna have to move it yourself or write a script to do it for you.

That makes sense from this statement below.

What? If you got /usr/local/sbin in your path by default and not /usr/local/bin, it's the complete opposite of the cited statement...

from btop.

daniejstriata avatar daniejstriata commented on August 26, 2024

@aristocratos What that statement tries to say is if I'm root I have in path sbin. If I'm a regular use then I would not.

Have you seen my other commend about the make script always prepending the binary with bin?

from btop.

aristocratos avatar aristocratos commented on August 26, 2024

@daniejstriata
The first line of the statement /usr/local/bin is for programs that a normal user may run applies here, there is no need to be root to run btop, it gives you more capabilities (like killing any process), but it's not designed to only be run by a superuser.

Have you seen my other commend about the make script always prepending the binary with bin?

Yes, and as I explained above, the PREFIX variable isn't supposed to be pointed at the binary location, but the folder above your binary location. /bin/ is added on the PREFIX path to get it to the binary folder, just as /share/btop/ is added on the PREFIX path to get the themes in the correct location.

from btop.

aristocratos avatar aristocratos commented on August 26, 2024

@daniejstriata
If the goal is to get the default install path changed to /usr/local/sbin you're gonna have to be dissapointed.

I'm not sure why you see it as a problem to add /usr/local/bin to your path?

from btop.

daniejstriata avatar daniejstriata commented on August 26, 2024

@aristocratos Thank you for your explanation. I'm seeing the light. I'm updating my process.

from btop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.