Come on guys... I hate to be impatient, but...
The URL quoted above describes how to terminate a service launched at startup; ie terminate on XBMC shutdown, but I'm still in the dark about how to terminate a service started at login.
There needs to be a function that reports that we're logging out, or have logged out.
Steve
Forget autoexec.py: the right way to automatically starts addons
Steve Evans
Junior Member Posts: 20 Joined: Dec 2010 Reputation: 0 |
2011-10-06 23:29
Post: #21
|
| find quote |
_BJ1
Senior Member Posts: 126 Joined: Apr 2010 Reputation: 0 Location: Germany |
2011-10-07 09:41
Post: #22
I have solved this with a pid-file. if a pid-file isn't present, the process runs at first time, otherwise your process is already running. Don't forget to delete the pid-file if your process terminate correctly otherwise a new process will not start.
Code: import osThe pid-file is located at ~/.<USER>/temp/script.program.youraddon/youraddon.PID Hope this helps _BJ1
(This post was last modified: 2011-10-07 22:49 by _BJ1.)
|
| find quote |
queeup
Fan Joined: Feb 2009 Reputation: 15 |
2011-10-27 02:42
Post: #23
Is there any way to execute script before exit or stop xbmc? I am trying to stop bash script I started with xbmc.servise on XBMC start.
Code: <extension point="xbmc.service" |
| find quote |
LakersFan
Senior Member Joined: Jan 2008 Reputation: 0 |
2012-01-28 00:20
Post: #24
Code: <extension point="xbmc.service"Is there any way I can get it to start with a keyboard button as opposed to login, startup, and/or stop? |
| find quote |
Martijn
Team-XBMC Joined: Jul 2011 Reputation: 116 Location: Dawn of time |
2012-01-28 02:28
Post: #25
queeup Wrote:Is there any way to execute script before exit or stop xbmc? I am trying to stop bash script I started with xbmc.servise on XBMC start. LakersFan Wrote: Do not use "startup" and "login" at the same time!! Either use "startup" and the script will be run at startup or use "login" and it will be started on login and stopped on logout (logout only from beta3 and up) Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules. For troubleshooting and bug reporting, make sure you read this first For your mediacenter artwork go to ![]() |
| find quote |
leechguy
Senior Member Posts: 109 Joined: Aug 2009 Reputation: 4 Location: The Netherlands |
Please be aware that the 'startup' option contains a design flaw when using multiple profiles!
Code: <extension point="xbmc.service"Let's assume we have three profiles (Master user, Alice and Bob) and we are using the login screen at startup of XBMC. At startup of XBMC, the service will start automatically and you will be presented with the login screen (if enabled). Now, with no one logged in yet, from which profile will your addon load its settings? Well, actually someone is already logged in and this can be either Master user, Alice or Bob depending on who was logged in during the last session. So when using multiple profiles, the configuration of your addon must be exactly the same for all profiles, otherwise you won't know what your addon will do. One time it will use the settings from Alice, the next time from Bob and another time the settings from the Master user may be used. In my opinion, addon services starting at startup must always use the settings from the Master user, should only be configurable by the master user and should only be enabled/disabled by the master user. Services that require profile specific settings should use the 'login' start type. Any thoughts on this? |
| find quote |
Spinner65
Junior Member Posts: 5 Joined: Nov 2012 Reputation: 0 |
2012-11-28 08:55
Post: #27
Having some form of autoexec.py to auto launch external programs, would great in future releases.
I'm using autoexec.py to run some bash scripts (they run xmodmap and hidd commands). If the autoexec.py function is removed after Eden... how would I do the same thing ? |
| find quote |
ignisuti
Junior Member Posts: 14 Joined: Feb 2012 Reputation: 0 |
2013-05-15 05:17
Post: #28
Follow-up to Steve Evan's post on 2011-09-06 21:05 concerning the "autologout" script...
Where do I place the addon.xml and default.py files? |
| find quote |
leechguy
Senior Member Posts: 109 Joined: Aug 2009 Reputation: 4 Location: The Netherlands |
2013-05-20 22:43
Post: #29
(2013-05-15 05:17)ignisuti Wrote: Follow-up to Steve Evan's post on 2011-09-06 21:05 concerning the "autologout" script... If you want to do auto logout on idle, you may want to check out my addon: Load a configurable default profile on startup of XBMC |
| find quote |


![[Image: fanarttv.png]](http://trakt.us/images/thanks/fanarttv.png)
Search
Help