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. run program as root
Forum Updated to NodeBB v4.3 + New Features

run program as root

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 396 Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jakubiszon26
    wrote on last edited by
    #1

    Hi, what should i do to get my qtwidgets app launching as root?. i'd like it to show password prompt and run as root. On linux

    JonBJ 1 Reply Last reply
    0
    • gde23G Offline
      gde23G Offline
      gde23
      wrote on last edited by
      #2

      You can just launch it with kdesudo (on KDE) or the equivalent for other desktops, however most probably it is not a very good idea.
      Why do you want to launch it as root?

      1 Reply Last reply
      3
      • J jakubiszon26

        Hi, what should i do to get my qtwidgets app launching as root?. i'd like it to show password prompt and run as root. On linux

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by
        #3

        @jakubiszon26
        As @gde23 says, not a good idea, and why? If the user wants to run your app by setting himself/the launch as root that's one thing. But your app prompting and changing to root is quite another.

        Anyway, it's moot, because you probably won't be able to do as you ask. If you app runs as non-root, prompts user and gets password, that's not going to help that same app to then change to running as root. At best you might then launch a second app as root....

        And finally, beware, there can be issues running a X windows program as root, it may not work right X-wise....

        1 Reply Last reply
        1
        • Kent-DorfmanK Offline
          Kent-DorfmanK Offline
          Kent-Dorfman
          wrote on last edited by
          #4
          chown root:root program
          chmod 4755 program
          

          disable selinux NSA spyware if problems persist

          no judgement...just syntax. LOL

          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