Results 1 to 4 of 4

Thread: QT gui application not starting automatically on startup in ubuntu 14.04

  1. #1
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default QT gui application not starting automatically on startup in ubuntu 14.04

    I have two Qt applications, one is non gui called "App1" and another one is gui called "App2". As per my need I need to start "App1" on startup of Ubuntu 14.04 machine.

    This "App1" runs a sh file called "myshfile.sh" and I am starting "App2" into this shell script file by /opt/myprojectname/App2 &

    So to do the same I make .sh file called "myupstart.sh" and write into /opt/myprojectname/App1 & it and copy the file at path /etc/init.d/ and gave it +x permission to start "App1" on startup.

    When I restart my machine then it runs "App1" (which is qt non-gui app) automatically on startup and runs "myshfile.sh" as expected. Till now all are working fine but the problem occurs from here as per below.

    As I have mentioned above that "App1" runs a sh file called "myshfile.sh" and I am starting "App2" into the shell script file by /opt/myprojectname/App2 & but "App2" is not staring ( which is qt gui app).

    When I do the same by simply running command into termianl /opt/myprojectname/App1 then all works fine and it calls the "myshfile.sh" file and "myshfile.sh" file also starts "App2".

    So what I found that when I do the same by manually into termianl then all works fine and by script etc/init.d/myupstart.sh, it starts only Qt non-gui application and not starting Qt gui application on startup.

    Kindly suggest me where I am wrong.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QT gui application not starting automatically on startup in ubuntu 14.04

    Is App2 started a user that has access rights to the X server connection?
    I.e. the user that App1 runs as?

    If you open a shell and change to that user, can you run App2 manually?

    Cheers,
    _

  3. #3
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: QT gui application not starting automatically on startup in ubuntu 14.04

    Yes both App1 and App2 have same access rights and the user who starts App1 can also starts App2. I can run App2 manually also.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QT gui application not starting automatically on startup in ubuntu 14.04

    Quote Originally Posted by manojpatidar View Post
    Yes both App1 and App2 have same access rights and the user who starts App1 can also starts App2.
    Not what I was asking.

    Quote Originally Posted by manojpatidar View Post
    I can run App2 manually also.
    As the user that is used to run App1?

    Cheers,
    _

Similar Threads

  1. Launch Qt Server Application at startup ?
    By JcPep in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd May 2013, 16:24
  2. Qt application loads tons of dll's ONLY on OS startup
    By tomrider in forum Qt Programming
    Replies: 5
    Last Post: 12th May 2011, 09:52
  3. Replies: 5
    Last Post: 6th January 2011, 13:32
  4. Application starting slowly.
    By aj2903 in forum Qt Programming
    Replies: 3
    Last Post: 30th December 2008, 11:19
  5. Showing a dialog at application startup
    By PaladinOfKaos in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2008, 20:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.