Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Reg: Qt application at start-up in Linux
QtWS25 Last Chance

Reg: Qt application at start-up in Linux

Scheduled Pinned Locked Moved India
16 Posts 3 Posters 11.0k 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.
  • V Offline
    V Offline
    Vishva
    wrote on 3 Jan 2014, 13:30 last edited by
    #1

    Hi All,
    I have developed a QT application. i want to this application to start after booting, before login. I dont want the desktop...

    I tried the following..
    added my file to /etc/profile and /etc/rc.d/rc.local... but didnt succeed..

    i coped my script to /init.d

    added below line to rcS
    echo Program Starting
    ./etc/rc.d/init.d/sample.sh

    my script file sample.sh
    echo Program Starting
    insmod /g_webcam.ko
    insmod /uvcvideo.ko
    export VSALPHA=1
    chmod a+x /root/user/my_qt_prog
    ./root/user/my_qt_prog -qws

    While linux booting i get the following message
    Program Starting
    Program Starting
    g_webcam gadget: uvc_function_bind
    g_webcam gadget: Webcam Video Gadget
    g_webcam gadget: g_webcam ready
    *
    But QT program is not running.....*

    Kindly point out my mistake and share your suggestions

    Thanks in Advance

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 3 Jan 2014, 22:18 last edited by
      #2

      Hi,

      Just to be sure, are you trying to run a Qt gui for embedded linux on a desktop system with X11 installed ?

      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
      • V Offline
        V Offline
        Vishva
        wrote on 4 Jan 2014, 07:26 last edited by
        #3

        Embedded Linux...

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p3c0
          Moderators
          wrote on 4 Jan 2014, 15:15 last edited by
          #4

          Hi,

          Have you made sure that your Qt Application is able to resolve all the required dependencies before login ?

          157

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 4 Jan 2014, 21:19 last edited by
            #5

            Also, what distribution are you using ?

            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
            • V Offline
              V Offline
              Vishva
              wrote on 6 Jan 2014, 05:35 last edited by
              #6

              Hi,
              "Qt Application is able to resolve all the required dependencies before login"

              can you be lilttle more specific abt wat u meant??
              i am a newbie....

              I am using Linux Distribution from Freescale. kernel 3.0.35

              And i need to login in my embedded linux to start working in it.. does it mean i have to add login details in my script or??

              1 Reply Last reply
              0
              • P Offline
                P Offline
                p3c0
                Moderators
                wrote on 6 Jan 2014, 06:42 last edited by
                #7

                I mean that your Qt Application requires Qt libraries and Qt libs itself depends on other libraries and also maybe you have linked to other third party libraries.

                You can check that by using the ldd utility.

                Just edit your script and ldd to your executable and redirect output to a file.

                For e.g. from your script
                Add this
                @
                ldd /root/user/my_qt_prog > /root/deps
                @

                before calling

                @
                ./root/user/my_qt_prog -qws
                @

                Then check in the "deps" file for any missing dependency or paste its contents here.

                157

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  Vishva
                  wrote on 6 Jan 2014, 06:48 last edited by
                  #8

                  ldd /root/user/my_app > /root/deps
                  -sh: ldd: not found

                  Hi,
                  ldd utility is not available in my distribution....

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    p3c0
                    Moderators
                    wrote on 6 Jan 2014, 07:11 last edited by
                    #9

                    Ok,
                    Try this
                    @
                    LD_TRACE_LOADED_OBJECTS=1 /root/user/my_app > /root/deps
                    @

                    157

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      Vishva
                      wrote on 6 Jan 2014, 07:17 last edited by
                      #10

                      libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x2aba2000)
                      libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0x2b460000)
                      libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x2b566000)
                      libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x2b80b000)
                      libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x2aad1000)
                      libz.so.1 => /usr/lib/libz.so.1 (0x2aaef000)
                      libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x2ab09000)
                      libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x2b8df000)
                      libts-1.0.so.0 => /usr/lib/libts-1.0.so.0 (0x2ab88000)
                      libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x2b924000)
                      libpng.so.3 => /usr/lib/libpng.so.3 (0x2b993000)
                      libasound.so.2 => /usr/lib/libasound.so.2 (0x2b9d1000)
                      libpthread.so.0 => /lib/libpthread.so.0 (0x2ab14000)
                      libstdc++.so.6 => /lib/libstdc++.so.6 (0x2ba94000)
                      libm.so.6 => /lib/libm.so.6 (0x2bb42000)
                      libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2aab6000)
                      libc.so.6 => /lib/libc.so.6 (0x2bbb3000)
                      libdl.so.2 => /lib/libdl.so.2 (0x2ab92000)
                      librt.so.1 => /lib/librt.so.1 (0x2bcda000)
                      /lib/ld-linux.so.3 (0x2ab60000)

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        p3c0
                        Moderators
                        wrote on 6 Jan 2014, 07:29 last edited by
                        #11

                        Well as per the output all deps are resolved. But is it before login ?
                        As you said you want to launch app before login.

                        bq. i want to this application to start after booting, before login

                        157

                        1 Reply Last reply
                        0
                        • V Offline
                          V Offline
                          Vishva
                          wrote on 6 Jan 2014, 07:41 last edited by
                          #12

                          Hi,
                          My exact requirment is:
                          i doesnt want the desktop to show... i want my qt application to be the only screen after the system boots...
                          but wen the system boots it requests for login and password..
                          so i thought its better to launch before login!!!!

                          wat can i do to make my qt application launch without showing the desktop??? can you advice plz

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 6 Jan 2014, 08:35 last edited by
                            #13

                            If your system is debian based, there's a startup script example that you can use to correctly start your application.

                            You also need to launch it from the correct run level.

                            On a side note, the correct place for applications is /usr/bin not /root/

                            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
                            • V Offline
                              V Offline
                              Vishva
                              wrote on 6 Jan 2014, 09:44 last edited by
                              #14

                              My distribution is Linux freescale 3.0.35, ubuntu oneiric.
                              Can you share the details about the start-up script!!!

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 6 Jan 2014, 21:41 last edited by
                                #15

                                Less exclamation mark please

                                "Ubuntu boot up howto":https://help.ubuntu.com/community/UbuntuBootupHowto gives some explanation.

                                "Debian administration":http://www.debian-administration.org/articles/28 also

                                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
                                • V Offline
                                  V Offline
                                  Vishva
                                  wrote on 7 Jan 2014, 07:33 last edited by
                                  #16

                                  Hi,
                                  After booting the OS requests for login and password... is there a way to do autologin ???
                                  i cannot use keyboard in my embedded device...

                                  1 Reply Last reply
                                  0

                                  1/16

                                  3 Jan 2014, 13:30

                                  • Login

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