I have gui application made in Qt and I wont to start it when desktop loads. I have tried to do this from terminal like this:
sudo cp MyApp /etc/init.d
sudo chmode 0777 /etc/init.d/MyApp
sudo update-rc.d MyApp defaults
but when I restart computer it gives me program error and asks me if I wont to report it.
Can anyone tell me what could be the problem, and how to solve it? I should point out that I'm new in linux.
EDIT:
I have also tried to create a script that starts this program, and start this script from startup in the same way but it gave me the same error.
I don't know if it's important but when this application start it starts a thread that reads data from serial port.