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 Qt widget app on linux with no GUI
QtWS25 Last Chance

Run Qt widget app on linux with no GUI

Scheduled Pinned Locked Moved Unsolved General and Desktop
linuxconsolewidgets
26 Posts 8 Posters 23.9k 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.
  • T Offline
    T Offline
    tomma
    wrote on last edited by
    #9

    You can try to run using minimal or offscreen platform-plugin. http://doc.qt.io/qt-5/qguiapplication.html#platformName-prop .

    1 Reply Last reply
    0
    • m.sueM Offline
      m.sueM Offline
      m.sue
      wrote on last edited by
      #10

      Hi,

      if the GUI app does not need user interaction you can try to run it with option --platform offscreen on the command line. Then the app will run without visible GUI. You will need to have the offscreen platform plugin in-place, of course.
      -Michael.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Bremenpl
        wrote on last edited by Bremenpl
        #11

        No, no thats not the case. I Need full GUI Widget functionality with user interaction. I Just want the whole operating system GUI background to be gone. So the user can only use the QT app when using a the PC. When PC starts there should be just command line without gui and after a while script would turn on my Qt application (thats graphical and needs user interaction).

        I Recall in Qt embedded I had to add -qws parameter to do this, but there was no GUI at all from the system. The app itself had GUI.

        lprzenioslo.zut.edu.pl

        1 Reply Last reply
        0
        • B Bremenpl

          Ok now I understand. Yes on F7 there is my regular gui and on F1 pure console. My question is- How can I qun qt application being in pure console? I havent disabled anything by hand yet, I just switched context F1-F7

          p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by p3c0
          #12

          Or you can just disable the fancy items loaded by the GUI and directly boot to your application by putting it into a startup script.
          Also disable the extra unwanted tty's and keep tty7 default

          157

          1 Reply Last reply
          2
          • B Offline
            B Offline
            Bremenpl
            wrote on last edited by Bremenpl
            #13

            Yes thats exacly what I need, and by disabling fancy stuff I wanted to disable whole OS gui. tty7 is default for now. So the scenario is like this:

            1. PC starts with only console mode
            2. Script turns on the QT GUI application in full screen mode.

            Would this be possible: http://doc.qt.io/qt-5/embedded-linux.html#linuxfb ?

            lprzenioslo.zut.edu.pl

            1 Reply Last reply
            0
            • p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by p3c0
              #14

              @Bremenpl Usually for these kind of applications (can say kiosk mode) people start with a minimal OS and a minimal light weight window manager so that OS customizations become easier.

              157

              1 Reply Last reply
              1
              • B Offline
                B Offline
                Bremenpl
                wrote on last edited by
                #15

                Thats exaclt what i mean- Kiosk mode. But my os is quite lightweight. I can make it lighter even, but the point is I dont know how to turn the app on in console mode in any OS for now :P.

                lprzenioslo.zut.edu.pl

                1 Reply Last reply
                0
                • p3c0P Offline
                  p3c0P Offline
                  p3c0
                  Moderators
                  wrote on last edited by p3c0
                  #16

                  @Bremenpl

                  but the point is I dont know how to turn the app on in console mode in any OS

                  As said earlier boot to default tty where X is running, launch the app in fullscreen mode through startup scripts.
                  Or you can try the linuxfb mode so that you own the framebuffer but then you get no window manager functionalities for eg. alt-tab switch or window decorations

                  157

                  1 Reply Last reply
                  1
                  • B Offline
                    B Offline
                    Bremenpl
                    wrote on last edited by
                    #17

                    So in short words, there is no way in linux to hide the whole OS GUI but still be able to run selected apps with GUI? One has to use own frame buffer?

                    lprzenioslo.zut.edu.pl

                    1 Reply Last reply
                    0
                    • p3c0P Offline
                      p3c0P Offline
                      p3c0
                      Moderators
                      wrote on last edited by p3c0
                      #18

                      @Bremenpl

                      So in short words, there is no way in linux to hide the whole OS GUI but still be able to run selected apps with GUI?

                      Yes there is. The most easiest is to use the minimal OS so customizations becomes easy. Donot install anything else but a bare minimal window manager so that the user gets a feel that only your application is running on top.

                      157

                      B 1 Reply Last reply
                      0
                      • p3c0P p3c0

                        @Bremenpl

                        So in short words, there is no way in linux to hide the whole OS GUI but still be able to run selected apps with GUI?

                        Yes there is. The most easiest is to use the minimal OS so customizations becomes easy. Donot install anything else but a bare minimal window manager so that the user gets a feel that only your application is running on top.

                        B Offline
                        B Offline
                        Bremenpl
                        wrote on last edited by
                        #19

                        @p3c0 So lets say I install Debian without any GUI and then I just install lightDM or OpenBox?

                        lprzenioslo.zut.edu.pl

                        1 Reply Last reply
                        0
                        • p3c0P Offline
                          p3c0P Offline
                          p3c0
                          Moderators
                          wrote on last edited by
                          #20

                          @Bremenpl Right. Or Fluxbox.

                          157

                          1 Reply Last reply
                          2
                          • B Offline
                            B Offline
                            Bremenpl
                            wrote on last edited by
                            #21

                            Ill try to do this the way you described. Thank you very much.

                            lprzenioslo.zut.edu.pl

                            1 Reply Last reply
                            1
                            • p3c0P Offline
                              p3c0P Offline
                              p3c0
                              Moderators
                              wrote on last edited by
                              #22

                              @Bremenpl Good Luck :)

                              157

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

                                Hi,

                                Depending on your needs, wayland and the QtWayland module might also be an option.

                                Another possible option might be KDE's kiosk mode.

                                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
                                2
                                • E Offline
                                  E Offline
                                  Eeli K
                                  wrote on last edited by
                                  #24

                                  If you mean that you want to boot to command line, then start the graphical Qt app but not be able to use other graphical applications and don't want a desktop environment (which you probably mean by "GUI") with desktop, panel, application launcher, etc., but still accept the X (maybe X.org) server running, then yes, it's possible. See "man startx" (ftp://www.x.org/pub/X11R7.5/doc/man/man1/startx.1.html). As you can see in the given .xinitrc example, you can write there what you want to start when X is fired up. Basically you put only your application name and the wanted command line arguments there. Then, on the command line, give the command 'startx'.

                                  You have to accept that when your application opens a dialog or other window it looks ugly, can't be moved or resized etc. You can of course try to implement a minimal in-application window manager or at least take care that window sizes and placements are good enough and maybe draw a nice border around it. OR you can add a minimal window manager to .xinitrc file, as in the example.

                                  B 1 Reply Last reply
                                  1
                                  • E Eeli K

                                    If you mean that you want to boot to command line, then start the graphical Qt app but not be able to use other graphical applications and don't want a desktop environment (which you probably mean by "GUI") with desktop, panel, application launcher, etc., but still accept the X (maybe X.org) server running, then yes, it's possible. See "man startx" (ftp://www.x.org/pub/X11R7.5/doc/man/man1/startx.1.html). As you can see in the given .xinitrc example, you can write there what you want to start when X is fired up. Basically you put only your application name and the wanted command line arguments there. Then, on the command line, give the command 'startx'.

                                    You have to accept that when your application opens a dialog or other window it looks ugly, can't be moved or resized etc. You can of course try to implement a minimal in-application window manager or at least take care that window sizes and placements are good enough and maybe draw a nice border around it. OR you can add a minimal window manager to .xinitrc file, as in the example.

                                    B Offline
                                    B Offline
                                    Bremenpl
                                    wrote on last edited by
                                    #25

                                    @Eeli-K Thank you, thats most likely what I meant :)

                                    lprzenioslo.zut.edu.pl

                                    mrjjM 1 Reply Last reply
                                    0
                                    • B Bremenpl

                                      @Eeli-K Thank you, thats most likely what I meant :)

                                      mrjjM Offline
                                      mrjjM Offline
                                      mrjj
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #26

                                      @Bremenpl
                                      Hi, other option is to create a custom session
                                      so you can have single app and also be able to start a desktop if needed.

                                      Most likely you will want to run a windows manager also.

                                      http://askubuntu.com/questions/23932/how-do-i-replace-the-desktop-by-an-application

                                      Im not sure if @Eeli-K solution is the same in debian version. :)

                                      1 Reply Last reply
                                      3

                                      • Login

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