I added a script to autostart (using Default applications for LXSession). Later, I moved the folder containing the script.
As result, the autostart command was silently failing.
How can I enable warning messages about failed autostart commands?
I added a script to autostart (using Default applications for LXSession). Later, I moved the folder containing the script.
As result, the autostart command was silently failing.
How can I enable warning messages about failed autostart commands?
The solution below is not specifically for Lubuntu, only the way to set an application to autostart from GUI is a bit different, since
Lubuntu
does not have the Startup Applications application, like Ubuntu.Check if a script has started within a certain time limit from login
With the script below, you can check if a script started successfully, within a certain time limit from login. If the startup(s) was unsuccessful, a message will appear, mentioning which of the scripts did not start successfully. You can use it to check on multiple scripts or processes in one step.
After the time limit has passed and sent its message, the script terminates
How to use
proc_check.py
in a permanent :) location.Make sure the processes (to check) are not running, and test-run the script with the command:
It should send a warning after the time limit has passed.
If all works fine, add the command below to your Startup Applications:
Note:
If you have
notify-send
available (sudo apt-get install libnotify-bin
), you can also uncomment the before-last line, to get a confirmation if all went well:The advantage of that is that you will either get a notification that all went well, or a warning, mentioning which of the processes did not start up successfully.
You will notice then if you accidentally moved this script. :)
The script
It is assumed that your startup programs are in
/home/<your_username>/.config/autostart/
.And than something like this in your crontab:
Open your crontab with:
and add this line:
This will check your files in
.config/autostart/
every two hours and send a mail, if there is a problem.Thanks @terdon