Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Do B2QT programs always have to run as root
Forum Updated to NodeBB v4.3 + New Features

Do B2QT programs always have to run as root

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
raspberrypib2qt
6 Posts 4 Posters 1.6k Views 2 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.
  • G Offline
    G Offline
    GregWilsonLindberg
    wrote on last edited by
    #1

    We're building a system that runs in a Raspberry Pi3 using B2QT. Is seems to me that applications compiled to run under B2QT are always run as root. Is this true?

    D 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Boot2Qt being a commercial product, you should bring this question to the Qt Company. You can try the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        magriada
        wrote on last edited by
        #3

        Wouldn't it be very relevant to users of the non-commercial meta-b2qt layer?

        http://blog.qt.io/blog/2016/07/01/aligning-with-the-yocto-project/

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Sure it is, however, I don't know have many of the forum users may have used that meta layer and could answer that question hence pointing @GregWilsonLindberg to potentially better place to get an answer.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 1 Reply Last reply
          1
          • SGaistS SGaist

            Sure it is, however, I don't know have many of the forum users may have used that meta layer and could answer that question hence pointing @GregWilsonLindberg to potentially better place to get an answer.

            M Offline
            M Offline
            magriada
            wrote on last edited by
            #5

            @SGaist Okay, I get you. Seemed like you might have been saying such questions were inappropriate for here. Cheers.

            1 Reply Last reply
            0
            • G GregWilsonLindberg

              We're building a system that runs in a Raspberry Pi3 using B2QT. Is seems to me that applications compiled to run under B2QT are always run as root. Is this true?

              D Offline
              D Offline
              diegor
              wrote on last edited by diegor
              #6

              @GregWilsonLindberg said in Do B2QT programs always have to run as root:

              We're building a system that runs in a Raspberry Pi3 using B2QT. Is seems to me that applications compiled to run under B2QT are always run as root. Is this true?

              It is indeed possible to run a B2Qt application as user (not root), but of course the user needs access to required devices, the most fundamental ones being video and input devices.

              As a small example add your user to the video and input groups:

              usermod -a -G video,input myuser
              

              and then create an appropriate XDG_RUNTIME_DIR:

              mkdir /run/user/1000
              

              and set the corresponding value in /etc/default/qt.
              Last, adjust the value of User= parameter in the systemd service (e.g.: /lib/systemd/system/qtlauncher.service).

              Additional permissions may be required for other features like reproducing audio, etc, but with the above tweaks the application should at least start the B2Qt application as myuser.

              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