Kodi Community Forum
Solved Startup Location - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Solved Startup Location (/showthread.php?tid=336407)



Startup Location - jp2code - 2018-10-12

Whenever Kodi starts up, is there any way to configure it to start in a particular spot?

For example, I would like Kodi to always automatically go to Videos > Files.

If that setting exists already, I have not been able to find it.

Thanks


RE: Startup Location - Karellen - 2018-10-12

Use autoexec.py (wiki) and add the following

xml:
import xbmc
xbmc.executebuiltin('ActivateWindow(Videos,sources://video/,return)')



RE: Startup Location - DarrenHill - 2018-10-12

I think some skins also have a configuration setting for this.


RE: Startup Location - jp2code - 2018-10-12

(2018-10-12, 20:20)Karellen Wrote: Use autoexec.py (wiki) and add the following

xml:
import xbmc
xbmc.executebuiltin('ActivateWindow(Videos,sources://video/,return)')
  
That sounds interesting. I'll have to read up on autoexec.py.

(2018-10-12, 21:56)DarrenHill Wrote: I think some skins also have a configuration setting for this.
  
I was pretty sure I had this set in the past. Maybe it was Confluence. Huh


RE: Startup Location - jp2code - 2018-10-12

(2018-10-12, 20:20)Karellen Wrote: Use autoexec.py (wiki) and add the following

xml:
import xbmc
xbmc.executebuiltin('ActivateWindow(Videos,sources://video/,return)')
  
So, do I need to install anything to get 'autoexec.py' to run, or is it already built into Kodi (just drop a text file in the UserData folder)?


RE: Startup Location - Karellen - 2018-10-12

Ready to run. Kodi searches for that file at startup


RE: Startup Location - DarrenHill - 2018-10-13

Under Estuary and Confluence/Xonfluence it's in settings > interface > startup > start window

That can start in videos, but not videos > files.


RE: Startup Location - Karellen - 2018-10-13

(2018-10-12, 15:45)jp2code Wrote: For example, I would like Kodi to always automatically go to Videos > Files.

(2018-10-13, 08:57)DarrenHill Wrote: Under Estuary and Confluence/Xonfluence it's in settings > interface > startup > start window
But that does not give the option to get to Videos>Files. The closest option is Videos, so the user still has to scroll and select to get where s/he wants to be.


RE: Startup Location - DarrenHill - 2018-10-13

Yup, as I noted in parallel whilst you were posting Wink

Just wanted to add where the option is in the skins for anyone else who might want something similar.


RE: Startup Location - jp2code - 2018-10-14

I'm running Kodi from the Microsoft Windows 10 Store. Instead of this path:

WindowsStart - type %APPDATA%\kodi\userdata - press <Enter>

I found it here (after doing a search and not realizing it was in the wiki https://kodi.wiki/view/Userdata):

Windows UWP %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\

I created a Text file with this content:

xml:
import xbmc
xbmc.executebuiltin('ActivateWindow(Videos,sources://video/,return)')

Saved the file in the "...\Roaming\Kodi" folder, renamed it to "autoexec.py", and launched Kodi.

It didn't work. Sad

Did I miss a step?

For now, I'm running what DarrenHill pointed out. That gets me pretty close.


RE: Startup Location - DarrenHill - 2018-10-14

The location and file structure look right, but I'm not sure the arguments in ActivateWindow are right.

See autoexec.py (wiki) and Window_IDs (wiki) for more details, maybe videos instead of Videos for example? The pages and links from them might help.


RE: Startup Location - Karellen - 2018-10-14

(2018-10-14, 16:38)jp2code Wrote: It didn't work. Sad

Did I miss a step?
I just tested it on Win10 v17.6 and it works here. It took me straight into my list of Sources.

xml:
Windows UWP %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\
Should be saved in
xml:
Windows UWP %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\userdata
Has to be saved in the Userdata folder, not where the Userdata folder is saved. Same place where guisettings.xml, sources.xml and others are saved


RE: Startup Location - jp2code - 2018-10-15

(2018-10-14, 22:21)Karellen Wrote: Has to be saved in the Userdata folder, not where the Userdata folder is saved. Same place where guisettings.xml, sources.xml and others are saved 
  
Bingo!

That was it.

Thanks Karellen!


Startup Location - Karellen - 2018-10-15

Great. I'll mark this solved.

Thread marked solved.


RE: Startup Location - Karellen - 2022-01-31

The method described in this thread no longer works.

Please use this method... https://kodi.wiki/view/Autoexec_Service