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.
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,
_
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.
Re: QT gui application not starting automatically on startup in ubuntu 14.04
Quote:
Originally Posted by
manojpatidar
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
I can run App2 manually also.
As the user that is used to run App1?
Cheers,
_