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. Qt App as init process
QtWS25 Last Chance

Qt App as init process

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
embeddedqpaframebuffer
2 Posts 2 Posters 1.4k 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.
  • janhieberJ Offline
    janhieberJ Offline
    janhieber
    wrote on last edited by
    #1

    Hi,

    currently i have a QT GUI app running on a Buildroot Linux on RPI.
    The app runs without X11/wayland with the following environment variables:

    QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
    QT_QPA_EGLFS_WIDTH=800
    QT_QPA_EGLFS_HEIGHT=600
    

    And the following parameters:

     -plugin EvdevMouse -plugin EvdevKeyboard
    

    Now I want to use the app as init process, started directly from kernel.
    For this to work I do the init stuff (mounting /tmp /dev ...) in main() at the beginning.

    My only problem is: When i launch the app with the kernel "init=" parameter,
    i can not set the environment variables or the parameters.

    So is there a way to do both, QPA and Plugins in C code in the app?

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

      Hi and welcome to devnet,

      Why not use a script to start your application ?

      By the way, shouldn't it rather be launched by your init manager (systemd, init, etc.) ?

      In any case, qputenv could be used to set the environment variables and you would have to modify by hand argc and argv before passing them to your QApplication instance.

      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

      • Login

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