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. Ubuntu Run Qml Application on startup
QtWS25 Last Chance

Ubuntu Run Qml Application on startup

Scheduled Pinned Locked Moved Solved General and Desktop
qmlnvidia jetson tubuntu 14.04startup
16 Posts 3 Posters 9.2k 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.
  • RiteshPanchalR Offline
    RiteshPanchalR Offline
    RiteshPanchal
    wrote on last edited by
    #1

    I am using nvidia TX1 with ubuntu 14.04.
    I want to run QT gui application on startup without showing linux boot messages or ubuntu home.
    I have successfully disabled boot messages. But not able to run qt app directly on startup.
    I have tried putting my script on crontab, rc.local, lightdm.conf but still not getting any success.

    Can anyone have any idea?

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

      Hi
      Did you make a deployment folder for you app?
      http://doc.qt.io/qt-5/linux-deployment.html

      You should be able to just open shell, and start the program with
      /path/to/yourapp

      To verify it can find all its SO files.

      you can check with ldd also.

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

        @RiteshPanchal If you are trying to load the application before X loads then you will have to find some other solution for eg. using framebuffer.

        157

        1 Reply Last reply
        3
        • RiteshPanchalR Offline
          RiteshPanchalR Offline
          RiteshPanchal
          wrote on last edited by
          #4

          @mrjj ya i have made deployment folder for my app.
          I can able to run my app from shell.

          I need to add PATH for qt-gstreamer library which is used my app.

          export LD_LIBRARY_PATH=/usr/local/lib/arm-linux-gnueabihf/
          ./myApp
          

          @p3c0 Ya i need to load X11 for before running qt app.
          is there any way to bypass ubuntu after loading lightdm and execute my qt app. and always stays on the app?

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

            @RiteshPanchal lightdm will start X so there shouldn't be any issue. Btw. what do you meany by "bypass ubuntu" ?
            Also if you are using plugins then I think you will also need to set plugins path using QT_PLUGIN_PATH.

            157

            1 Reply Last reply
            0
            • RiteshPanchalR Offline
              RiteshPanchalR Offline
              RiteshPanchal
              wrote on last edited by
              #6

              @p3c0 "bypass ubuntu" means my app should start without showing any ubuntu home UI. And my app is fullscreen.
              I already done autologin and disabled root password prompt.

              So can you tell me where to put command for executing my script for running app?

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

                @RiteshPanchal Are you able to manually start the Qt application once system fully booted ?

                157

                1 Reply Last reply
                0
                • RiteshPanchalR Offline
                  RiteshPanchalR Offline
                  RiteshPanchal
                  wrote on last edited by
                  #8

                  Yes. I can start the app by following from terminal
                  export LD_LIBRARY_PATH=/usr/local/lib/arm-linux-gnueabihf/
                  ./myApp

                  mrjjM 1 Reply Last reply
                  0
                  • RiteshPanchalR RiteshPanchal

                    Yes. I can start the app by following from terminal
                    export LD_LIBRARY_PATH=/usr/local/lib/arm-linux-gnueabihf/
                    ./myApp

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

                    @RiteshPanchal said in Ubuntu Run Qml Application on startup:

                    export LD_LIBRARY_PATH=/usr/local/lib/arm-linux-gnueabihf/
                    ./myApp

                    and you put those 2 lines in a .sh file and call it during boot
                    and not the app directly?
                    Just checking as calling the ".exe" directly wont work.

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

                      @RiteshPanchal Ok. So the best way would be use autostart. On Ubuntu you can create a .desktop file and put it inside /etc/xdg/autostart or user's local autostart.
                      The contents of this file follows this specification.
                      For eg.

                      [Desktop Entry]
                      Version=1.0
                      Encoding=UTF-8
                      Name=My Application
                      Comment=My Desktop Application
                      Exec=/usr/local/app/launchmyapp.sh  #this script contains `export` and then launches app
                      Terminal=false
                      Type=Application
                      

                      157

                      RiteshPanchalR 1 Reply Last reply
                      3
                      • mrjjM mrjj

                        @RiteshPanchal said in Ubuntu Run Qml Application on startup:

                        export LD_LIBRARY_PATH=/usr/local/lib/arm-linux-gnueabihf/
                        ./myApp

                        and you put those 2 lines in a .sh file and call it during boot
                        and not the app directly?
                        Just checking as calling the ".exe" directly wont work.

                        RiteshPanchalR Offline
                        RiteshPanchalR Offline
                        RiteshPanchal
                        wrote on last edited by
                        #11

                        @mrjj Ya i have put these 2 lines in .sh file and try to call this script on boot.
                        But my question is where to put command from executing my .sh script so that it would load X11 and successfully run the app.?

                        1 Reply Last reply
                        0
                        • p3c0P p3c0

                          @RiteshPanchal Ok. So the best way would be use autostart. On Ubuntu you can create a .desktop file and put it inside /etc/xdg/autostart or user's local autostart.
                          The contents of this file follows this specification.
                          For eg.

                          [Desktop Entry]
                          Version=1.0
                          Encoding=UTF-8
                          Name=My Application
                          Comment=My Desktop Application
                          Exec=/usr/local/app/launchmyapp.sh  #this script contains `export` and then launches app
                          Terminal=false
                          Type=Application
                          
                          RiteshPanchalR Offline
                          RiteshPanchalR Offline
                          RiteshPanchal
                          wrote on last edited by
                          #12

                          @p3c0 Ya. this method works.
                          Thanks for your help.

                          But if i pressed Alt+Tab or Windows button or any other windows key combination it will again show ubuntu.
                          So is there any way to stop loading ubuntu unity home.? so my app user unable to accidentally minimized my app and can't access ubuntu?

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

                            @RiteshPanchal

                            But if i pressed Alt+Tab or Windows button or any other windows key combination it will again show ubuntu.

                            Window manager handles that part and in your case ubuntu unity. So look for a way to disable alt-tab from unity. I too dont know. A quick google search points out some.

                            Actually instead of using a full Ubuntu you should use a Minimal Ubuntu and install only those packages which are required. Then start X server on boot and a lightweight window manager. There are many of those available and also highly customizable.

                            157

                            RiteshPanchalR 1 Reply Last reply
                            0
                            • p3c0P p3c0

                              @RiteshPanchal

                              But if i pressed Alt+Tab or Windows button or any other windows key combination it will again show ubuntu.

                              Window manager handles that part and in your case ubuntu unity. So look for a way to disable alt-tab from unity. I too dont know. A quick google search points out some.

                              Actually instead of using a full Ubuntu you should use a Minimal Ubuntu and install only those packages which are required. Then start X server on boot and a lightweight window manager. There are many of those available and also highly customizable.

                              RiteshPanchalR Offline
                              RiteshPanchalR Offline
                              RiteshPanchal
                              wrote on last edited by
                              #14

                              @p3c0 Actually I am using nVidia Jetson TX1 board. And they are not giving flexibility to install minimal linux.
                              I need to search something else.
                              But thanks for your reply.

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

                                @You're Welcome :)

                                Actually I am using nVidia Jetson TX1 board. And they are not giving flexibility to install minimal linux.

                                Just curiosity. Why ?

                                157

                                RiteshPanchalR 1 Reply Last reply
                                0
                                • p3c0P p3c0

                                  @You're Welcome :)

                                  Actually I am using nVidia Jetson TX1 board. And they are not giving flexibility to install minimal linux.

                                  Just curiosity. Why ?

                                  RiteshPanchalR Offline
                                  RiteshPanchalR Offline
                                  RiteshPanchal
                                  wrote on last edited by
                                  #16

                                  @p3c0 There may be some advanced method for doing this.
                                  But They have given sample-root-file-system and kernel source. This file system contains full ubuntu 14.04. And provided documents to compile kernel and flashing this file system to TX1 eMMC.

                                  I think mostly TX1 user use this board in Robotics, Machine learning and embedded visual computing applications. So they required full ubuntu.

                                  As for now i don't know any method to do that nor any post related on their forum. I will post a question on there forum. And hope for their reply soon.

                                  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