![]() |
How to autostart application at boot?
Hi,
I am struggling now for over 12 hours with a problem of starting my application after the boot. I have created scripts and saved them in following locations: /etc/init.d/imhere /etc/init.d/imhere_run_later then I have used "ln -s" command to create a link to /etc/init.d/imhere from /etc/rc2.d/S99imhere Unfortunately my application did not start. I started playing around with those files in init.d and finally ended up with following: /etc/init.d/imhere: Code:
#!/bin/sh Code:
echo "ENTERED RUN_LATER" >> /home/user/startuplog I have modified also /etc/init.d/hulda by adding at the beggining of the file following piece of code: Code:
echo "HULDA INIT" >> /home/user/startuplog If I run myself the script /etc/init.d/imhere from terminal, the startuplog file will fill up with "SLEPT..." and the other echoed text as expected and /usr/bin/imhere starts running. Question is: Why my own scripts are not called/executed at startup? Thanks in advance. |
Re: How to autostart application on boot?
|
Re: How to autostart application on boot?
Thanks, that was a very good advice. Indeed maemo uses upstart.
I have checked the post about batlevel and it helped a lot, finally my script starts at the startup time. Now, I see I have some other problems also. I want to start a Qt application and show the window to the user, the problem is, that the application does not want to start(is terminated?), though I have no problems to run it from applications menu or the command line. I have heard, that I should split my code to 2 applications ( non graphical daemon, and the window app), but I would prefer having only one. Any ideas? |
Re: How to autostart application on boot?
what app is it that you are trying to start ?
how do you start it ? could you provide more details then somebody or myself could try and help, there isnt much info you have provided :) ? |
Re: How to autostart application on boot?
I am developing my own application, that listens to text messages and then executes different kind of actions depending on the text given in the message.
Usually the application runs hidden in the background, but it might be woken up (shown in FullScreen) by certain commands in the text messages. The application is ready and working if it has been run after the reboot, but it does not want to start during startup. Here is the main.cpp: Code:
#include <QApplication> |
Re: How to autostart application on boot?
what does your startup script in the event.d look like ?
and are you starting the above app in the startup file ? do you see any error/trace ? or does the app not start at all ? |
Re: How to autostart application on boot?
I know nothing about Upstart, so all I can do is give lame hints.
You may need the D-Bus initialization routines from http://talk.maemo.org/showpost.php?p...9&postcount=16 and, also, have you tried making it start when hildon-desktop has done so? I believe it's something like "start on started hildon-desktop" (alternatively, "start on started xsession" may work for you) in your Upstart service definition. |
Re: How to autostart application on boot?
This is my /etc/event.d/imhere:
Code:
description "Starts the imhere application" Code:
#!/bin/sh Code:
MHERE INIT CALLED |
Re: How to autostart application on boot?
Quote:
I have tried to run my application from a init.d script inlcuding: Code:
echo "SOME TEXT" I have checked with ps -A | grep imhere from terminal |
Re: How to autostart application on boot?
Code:
start on started hildon-desktop |
All times are GMT. The time now is 07:38. |
vBulletin® Version 3.8.8