Autoload Python Script at Cinnamon Login
Hi
I am using Cinnamon desktop on the top of arch linux. I wanted to load a python script at desktop login which informs me about battery stats, so I created a batterymonitor.desktop entry under ~/.config/autostart. The contents of batterymonitor.desktop are: Code:
[Desktop Entry] Can you help to load this script at cinnamon login? Regards |
The only autostart user job in ~/.config I have is as follows:-
Code:
[Desktop Entry] |
I have 2 more, dropbox and pulse audio. I want to create this 3rd one but not able to succeed yet :(
|
Is it listed in Admin, System settings, Start-up Programs?
|
Quote:
http://s12.postimg.org/b2uaennfh/Sta...rences_001.png I suspect that the problem is with this line: Code:
Exec=python /home/<myusername>/scripts/battery_monitor.py Code:
Exec=python /home/<myusername>/scripts/battery_monitor.py |
PS. PowerTop is showing that the process is running, but its not working like it used to do when I launch it from terminal.
|
Quote:
It might be that your python script runs BEFORE there are enough desktop parts active to support it correctly. For example, the desktop is an X-Windows DISPLAY. If your script's shell cannot learn the active DISPLAY or if your script cannot get proper access, the the script will not be able to create and open an on-desktop window. SUGGESTIONS: There are ways for your script to wait until needed resources are available. There are ways to impose a sequence on the various login-time applications. If all else fails, you could insert a run-time delay (consider adding a WAIT=nn script parameter) to allow for some time passage and those resources to be active. Good luck, ~~~ 0;-Dan |
All times are GMT -5. The time now is 03:15 AM. |