Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Sudo make install in build steps
QtWS25 Last Chance

Sudo make install in build steps

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AlvaroSA Offline
    AlvaroSA Offline
    AlvaroS
    wrote on last edited by
    #1

    Hello to all.
    I would like to do "make install" in qt as a sudo.
    But I don't know how to do that as a sudo.

    In "project-build step" I can chose "install" but not as a sudo.
    Any ideas?

    Thanks a lot.

    jsulmJ A 2 Replies Last reply
    0
    • AlvaroSA AlvaroS

      Hello to all.
      I would like to do "make install" in qt as a sudo.
      But I don't know how to do that as a sudo.

      In "project-build step" I can chose "install" but not as a sudo.
      Any ideas?

      Thanks a lot.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @AlvaroS I'm not sure whether it is possible as you need to enter your root password.
      Why do you want to do it while developing?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • AlvaroSA AlvaroS

        Hello to all.
        I would like to do "make install" in qt as a sudo.
        But I don't know how to do that as a sudo.

        In "project-build step" I can chose "install" but not as a sudo.
        Any ideas?

        Thanks a lot.

        A Offline
        A Offline
        ambershark
        wrote on last edited by ambershark
        #3

        @AlvaroS You would have to have a process that could execute your install running as root already. I usually have a helper process running as root when I have apps that need root permissions. Then I use an interface; named pipes, shared memory, socket, whatever to communicate with the process and have it do the tasks I need done as root. You should limit what the process is allowed to do though so people don't run any sort of hacks against your app.

        Or you could run a shell script that ran sudo for you, but it would pop up a terminal and prompt the user for their password.

        And finally, you can whitelist your process for root/sudo access without a password. Note, this is a super bad idea and very dangerous. If you are in a multiuser environment expect to get hacked if you do this. ;)

        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved