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. I want to develop a application that as long as it launch it asks root privilige.
QtWS25 Last Chance

I want to develop a application that as long as it launch it asks root privilige.

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 864 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.
  • _ Offline
    _ Offline
    _hunter
    wrote on last edited by
    #1

    just like this.anyone can help me?or just give me a demo?
    ![alt text](image url)

    A 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      There is no platform independent way for that.
      So on what platform ?

      _ 1 Reply Last reply
      1
      • mrjjM mrjj

        Hi
        There is no platform independent way for that.
        So on what platform ?

        _ Offline
        _ Offline
        _hunter
        wrote on last edited by
        #3

        @mrjj
        it is on ubuntu platform.

        mrjjM 1 Reply Last reply
        0
        • _ _hunter

          @mrjj
          it is on ubuntu platform.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @_hunter
          Ok. the normal way is via a .desktop file
          https://askubuntu.com/questions/118822/how-to-launch-application-as-root-from-unity-launcher
          or you can simply launch the app via
          /usr/bin/gksudo /usr/bin/yourapplication

          _ 1 Reply Last reply
          2
          • _ _hunter

            just like this.anyone can help me?or just give me a demo?
            ![alt text](image url)

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

            @_hunter I answered you in the thread you necro'd... https://forum.qt.io/topic/60141/how-to-create-a-gui-that-can-enter-root-mode-as-well-as-gparted-applications/19

            The way gparted does it is using pkexec.. However linux users are used to things like sudo -E app, gksu, kdesudo, etc.

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

            _ 1 Reply Last reply
            2
            • mrjjM mrjj

              @_hunter
              Ok. the normal way is via a .desktop file
              https://askubuntu.com/questions/118822/how-to-launch-application-as-root-from-unity-launcher
              or you can simply launch the app via
              /usr/bin/gksudo /usr/bin/yourapplication

              _ Offline
              _ Offline
              _hunter
              wrote on last edited by
              #6

              @mrjj thank you ,this solved my problem

              1 Reply Last reply
              2
              • A ambershark

                @_hunter I answered you in the thread you necro'd... https://forum.qt.io/topic/60141/how-to-create-a-gui-that-can-enter-root-mode-as-well-as-gparted-applications/19

                The way gparted does it is using pkexec.. However linux users are used to things like sudo -E app, gksu, kdesudo, etc.

                _ Offline
                _ Offline
                _hunter
                wrote on last edited by
                #7

                @ambershark thank you.

                1 Reply Last reply
                2

                • Login

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