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. Start Qt Application without going through a window manager
Forum Updated to NodeBB v4.3 + New Features

Start Qt Application without going through a window manager

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 5 Posters 8.0k Views 3 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.
  • N nwoki

    @jsulm said in Start Qt Application without going through a window manager:

    @nwoki Does it have to be a GUI application? If not you can just create a console application.

    Yes. It has to be a Gui application

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #4

    @nwoki But why do you want to start a GUI application via systemd? Where do you expect to see the GUI?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    N 1 Reply Last reply
    0
    • jsulmJ jsulm

      @nwoki But why do you want to start a GUI application via systemd? Where do you expect to see the GUI?

      N Offline
      N Offline
      nwoki
      wrote on last edited by
      #5

      @jsulm said in Start Qt Application without going through a window manager:

      @nwoki But why do you want to start a GUI application via systemd? Where do you expect to see the GUI?

      Because i need the application to restart in case of a crash. I expect to see my Qt application window shown on the screen connected to the pc in use. This is how it's supposed to work:

      1 - attach the ac plug to the pc
      2 - switch on the pc
      3 - application starts automatically WITHOUT passing through sddm/kdm/gdm/kwin_x11/twm/fluxbox etc. It's a pc with a product that starts on boot.

      jsulmJ 1 Reply Last reply
      0
      • N nwoki

        @jsulm said in Start Qt Application without going through a window manager:

        @nwoki But why do you want to start a GUI application via systemd? Where do you expect to see the GUI?

        Because i need the application to restart in case of a crash. I expect to see my Qt application window shown on the screen connected to the pc in use. This is how it's supposed to work:

        1 - attach the ac plug to the pc
        2 - switch on the pc
        3 - application starts automatically WITHOUT passing through sddm/kdm/gdm/kwin_x11/twm/fluxbox etc. It's a pc with a product that starts on boot.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #6

        @nwoki said in Start Qt Application without going through a window manager:

        I expect to see my Qt application window shown on the screen connected to the pc in use

        Do you use a desktop manager? If so do you want to show the app for the currently logged on user? If no user is logged on and only the log-in window is shown: where do you want to show the app?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • N Offline
          N Offline
          nwoki
          wrote on last edited by nwoki
          #7
          • I do not use a Desktop manager and I don't want to
          • I want my application to start ONLY X server and nothing else

          Is there a way to actually acheive this or am i missing something?

          1 Reply Last reply
          0
          • artwawA Offline
            artwawA Offline
            artwaw
            wrote on last edited by
            #8

            Hi,
            it possible that I am missing something here but I my solution would be two-fold:

            • small deamon-like program that actually monitors if target app is running and if requirements for it to run are met;
            • target app (your main program) that runs in front the way you like.

            For more information please re-read.

            Kind Regards,
            Artur

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

              Hi,

              Then shouldn't you rather avoid X altogether and use Qt for Embedded Linux ?

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

              N 1 Reply Last reply
              0
              • SGaistS SGaist

                Hi,

                Then shouldn't you rather avoid X altogether and use Qt for Embedded Linux ?

                N Offline
                N Offline
                nwoki
                wrote on last edited by
                #10

                @SGaist said in Start Qt Application without going through a window manager:

                Hi,

                Then shouldn't you rather avoid X altogether and use Qt for Embedded Linux ?

                Why? The application is running on a normal pc. Anyway, I'll stick to using kwin_x11 and figure something out

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

                  Embedded doesn't mean it should be credit card size, an ATM is a sort of embedded system even if its locked in a wall.

                  From your description, it looks like your system should be some sort of kiosk since you don't want any window manager hence my suggestion of using one of the other backends available. This will also have the advantage of reducing the requirements and dependencies of your system.

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

                  N 1 Reply Last reply
                  3
                  • B Offline
                    B Offline
                    bask185
                    wrote on last edited by
                    #12

                    I also have a window-less GUI application on ubuntu. To get rid of the window manager I made a new desktop which auto launches the app.

                    However if it crashes, it does not restart and I still did not manage to prevent the display from going to sleep after x minutes. But I do not expect my application to crash on my target system. This might be a solution?

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

                      @bask185 What might be a solution ?

                      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
                      • SGaistS SGaist

                        Embedded doesn't mean it should be credit card size, an ATM is a sort of embedded system even if its locked in a wall.

                        From your description, it looks like your system should be some sort of kiosk since you don't want any window manager hence my suggestion of using one of the other backends available. This will also have the advantage of reducing the requirements and dependencies of your system.

                        N Offline
                        N Offline
                        nwoki
                        wrote on last edited by
                        #14

                        @SGaist said in Start Qt Application without going through a window manager:

                        Embedded doesn't mean it should be credit card size, an ATM is a sort of embedded system even if its locked in a wall.

                        From your description, it looks like your system should be some sort of kiosk since you don't want any window manager hence my suggestion of using one of the other backends available. This will also have the advantage of reducing the requirements and dependencies of your system.

                        Sorry for the late reply.

                        Yeah, I looked that up but didn't think it was necessary and that maybe there was another way. I'll try the eglfs platform plugin (via the -platform eglfs switch) and see if it does what I expect it to. I'll get back to you

                        1 Reply Last reply
                        0
                        • N Offline
                          N Offline
                          nwoki
                          wrote on last edited by
                          #15

                          In the end i'm using matchbox and launching the application with the -platform eglfs flag activated. There's no way in getting the app to run directly on X (which is what I wanted to achieve in the beginning) so I'm going with a very slim window manager.

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

                            Then you need the xcb backend.

                            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