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. Running Qt Project as Root

Running Qt Project as Root

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

    Hi all,

    I have an upboard and Ubuntu 16.04 is installed in it. Before using Qt, I simply have created a C++ text file to control pins and I compiled and run it succesfully using terminal with "sudo". We need to run it as admin to reach upboard's pins. Up to now there is no problem.

    When I copied the same code to Qt Creator's environment and tried to run it. But it didnt work because I think I tried to run it as a user. How can I fix this problem?

    aha_1980A 1 Reply Last reply
    0
    • YunusY Yunus

      Hi all,

      I have an upboard and Ubuntu 16.04 is installed in it. Before using Qt, I simply have created a C++ text file to control pins and I compiled and run it succesfully using terminal with "sudo". We need to run it as admin to reach upboard's pins. Up to now there is no problem.

      When I copied the same code to Qt Creator's environment and tried to run it. But it didnt work because I think I tried to run it as a user. How can I fix this problem?

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Yunus the correct way is to run your program as user.

      Often, these pin devices have a special group. In that case, simply add your user to that group to gain the read/write permissions.

      If not, I'd recommend you to set them up that way.

      Running programs as root can completely destroy your system, even flash memories and such.

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • YunusY Offline
        YunusY Offline
        Yunus
        wrote on last edited by
        #3

        @aha_1980 Thanks for your advise. I solved the problem giving permissions to user as you said. This link solved my problem. Actually it is completely not about Qt. I posted the topic in wrong area and sorry for that.

        1 Reply Last reply
        1

        • Login

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