PDA

View Full Version : Qt application in embedded linux startup



hakanaktan
29th July 2019, 07:57
i have an embedded linux device and an application that has to start after boot.
linux : Linux 3.12.10-ti2013.12.01 armv7l

at the end of file "/etc/init.d/rc" , i added this line:

cd /home/root/ && /home/root/ApplicationName

it gives error: "Permission denied"
if i run the application manually one time, then it works fine at every start up.

i tried the line below but it gives error "command not found"

cd /home/root/ && chmod +x /home/root/ApplicationName && /home/root/ApplicationName

how should i start the application?
note: startup does not have a login.

anda_skoa
29th July 2019, 09:52
if i run the application manually one time, then it works fine at every start up.


Do you do anything special when you do start it manually or are you just repeating the command you have in the startup file?

Cheers,
_

ChrisW67
31st July 2019, 07:34
cd /home/root/ && /home/root/ApplicationName
it gives error: "Permission denied"

Possibly because:

ApplicationName is not marked executable (as you guessed)
ApplicationName tries to write something somewhere it has no permission and bombs. Perhaps the filesystem is still mounted read-only at that time.
/home/root is on a filesystem marked noexec (which may or may not affect the init process)


if i run the application manually one time, then it works fine at every start up.
Maybe, but you are probably running it from a shell with a different environment and after the system is fully booted.


i tried the line below but it gives error "command not found"
cd /home/root/ && chmod +x /home/root/ApplicationName && /home/root/ApplicationName

Probably because the limited embedded Linux does not have a chmod command or it is not in the PATH available at the time. This should not be necessary though, set the x flag on the file once and it should stay.

wysota
1st August 2019, 22:31
/home/root is on a filesystem marked noexec (which may or may not affect the init process)

Or readonly...