Headless Kodi

  Thread Rating:
  • 5 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
topfs2 Offline
Team-Kodi Developer
Posts: 4,548
Joined: Dec 2007
Reputation: 17
Post: #16
Are you running it without X? Did it actually start and function. I never had a chance to test that so would love some feedback on it Smile

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
(This post was last modified: 2014-12-24 11:33 by topfs2.)
find quote
pgjensen Offline
Senior Member
Posts: 105
Joined: Dec 2008
Reputation: 2
Post: #17
Without X! It works great for library updates using xbmc-send, however, I can't get the webserver to start for some reason. It has an ERROR. Debug log gives me nothing.
find quote
sparklyballs Offline
Senior Member
Posts: 143
Joined: Feb 2012
Reputation: 1
Post: #18
i don't have access to the logs as i am away for xmas now, but i built it in a docker with no disables in the configure stage and run with --headless &

it runs but is filling up the log with can't find display, i'm running it on phusion baseimage 0.9.15 which is ubuntu 14.04 with some tweaks for docker like a init system that respawns crashed apps.

i can access the webserver, but not certain if that cos the init is respawning a crashed app.
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,548
Joined: Dec 2007
Reputation: 17
Post: #19
Would love a log and I can look at it after Christmas. Sounds like its xrandr or something. Fund that it almost work without x Smile

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
overbyrn Offline
Junior Member
Posts: 18
Joined: Apr 2009
Reputation: 0
Location: Wisconsin, US
Smile  RE: Headless Kodi
Post: #20
(2014-12-24 17:59)topfs2 Wrote:  Would love a log and I can look at it after Christmas. Sounds like its xrandr or something. Fund that it almost work without x Smile

Excellent Christmas present! Thanks for your efforts topfs2. I have your helix_headless branch running perfectly on ubuntu 14.04.1. In fact I'd just done the same for Helix rc3 days before, so the process was fresh in my mind.

If it helps others, I documented steps taken from initial build to running kodi.bin as a background process. Here's a link to the Evernote doc. Apologies, it's a bit rough as was just a brain-dump and not meant for public consumption, but I figure might as well share as those in this thread will be able to fill in any errors or gaps in the process.

Happy to provide logs of kodi running. Just let me know what you need.


Regards,
overbyrn
find quote
sparklyballs Offline
Senior Member
Posts: 143
Joined: Feb 2012
Reputation: 1
Post: #21
(2014-12-24 17:59)topfs2 Wrote:  Would love a log and I can look at it after Christmas. Sounds like its xrandr or something. Fund that it almost work without x Smile

in case it's important, i'm not running mine in portable mode (running as root in the docker) i found it more stable this way, ie i was having problems getting the webserver up and it to create the initial config folders etc...



however though i'm getting flak in unraid forum for a docker running as root and spitting out config files with root:root ownership, so it would be beneficial for it to run stable in portable mode.

(2014-12-24 23:05)sparklyballs Wrote:  
(2014-12-24 17:59)topfs2 Wrote:  Would love a log and I can look at it after Christmas. Sounds like its xrandr or something. Fund that it almost work without x Smile

in case it's important, i'm not running mine in portable mode (running as root in the docker) i found it more stable this way, ie i was having problems getting the webserver up and it to create the initial config folders etc...



however though i'm getting flak in unraid forum for a docker running as root and spitting out config files with root:root ownership, so it would be beneficial for it to run stable in portable mode.


EDIT: should note my 14.0 final headless docker is not based on this branch but 14.0-helix tag in main git, but was having the same issue regards running it portable in ubuntu 14.04 docker.
(This post was last modified: 2014-12-24 23:07 by sparklyballs.)
find quote
fma965 Offline
Fan
Posts: 411
Joined: Sep 2012
Reputation: 8
Location: United Kingdom
Post: #22
How would i go about building this for windows? I am comfortable building from source (never built it for windows though) just not sure if it's even possible to build this for windows? I run windows server 2012.
(This post was last modified: 2014-12-26 21:33 by fma965.)
find quote
sparklyballs Offline
Senior Member
Posts: 143
Joined: Feb 2012
Reputation: 1
Post: #23
(2014-12-26 21:33)fma965 Wrote:  How would i go about building this for windows? I am comfortable building from source (never built it for windows though) just not sure if it's even possible to build this for windows? I run windows server 2012.



I have no experience compiling in windows environment, but you could take a look here.

HOW-TO:Compile_for_Windows (wiki)

(2014-12-26 21:59)sparklyballs Wrote:  
(2014-12-26 21:33)fma965 Wrote:  How would i go about building this for windows? I am comfortable building from source (never built it for windows though) just not sure if it's even possible to build this for windows? I run windows server 2012.



I have no experience compiling in windows environment, but you could take a look here.

HOW-TO:Compile_for_Windows (wiki)
(This post was last modified: 2014-12-26 22:06 by sparklyballs.)
find quote
fma965 Offline
Fan
Posts: 411
Joined: Sep 2012
Reputation: 8
Location: United Kingdom
Post: #24
(2014-12-26 21:59)sparklyballs Wrote:  
(2014-12-26 21:33)fma965 Wrote:  How would i go about building this for windows? I am comfortable building from source (never built it for windows though) just not sure if it's even possible to build this for windows? I run windows server 2012.



I have no experience compiling in windows environment, but you could take a look here.

HOW-TO:Compile_for_Windows (wiki)

(2014-12-26 21:59)sparklyballs Wrote:  
(2014-12-26 21:33)fma965 Wrote:  How would i go about building this for windows? I am comfortable building from source (never built it for windows though) just not sure if it's even possible to build this for windows? I run windows server 2012.



I have no experience compiling in windows environment, but you could take a look here.

HOW-TO:Compile_for_Windows (wiki)
Yeah thanks, i know that, i just didn't know if the code changes would even be relevant to Windows.
find quote
brownbear1984 Offline
Senior Member
Posts: 101
Joined: Dec 2010
Reputation: 1
Location: Maidenhead, UK
Post: #25
(2014-12-24 18:41)overbyrn Wrote:  
(2014-12-24 17:59)topfs2 Wrote:  Would love a log and I can look at it after Christmas. Sounds like its xrandr or something. Fund that it almost work without x Smile

Excellent Christmas present! Thanks for your efforts topfs2. I have your helix_headless branch running perfectly on ubuntu 14.04.1. In fact I'd just done the same for Helix rc3 days before, so the process was fresh in my mind.

If it helps others, I documented steps taken from initial build to running kodi.bin as a background process. Here's a link to the Evernote doc. Apologies, it's a bit rough as was just a brain-dump and not meant for public consumption, but I figure might as well share as those in this thread will be able to fill in any errors or gaps in the process.

Happy to provide logs of kodi running. Just let me know what you need.


Regards,
overbyrn

I've just managed to compile successfully using your instructions It seems to work fine although i have 1 problem. It keeps starting the webserver on port 80. I can't run it on that port as i run a apache. When i try to change the port in guisettings.xml it doesn't do anything. Is this set somewhere else in headless mode?
find quote
fma965 Offline
Fan
Posts: 411
Joined: Sep 2012
Reputation: 8
Location: United Kingdom
Post: #26
(2014-12-27 02:34)brownbear1984 Wrote:  
(2014-12-24 18:41)overbyrn Wrote:  
(2014-12-24 17:59)topfs2 Wrote:  Would love a log and I can look at it after Christmas. Sounds like its xrandr or something. Fund that it almost work without x Smile

Excellent Christmas present! Thanks for your efforts topfs2. I have your helix_headless branch running perfectly on ubuntu 14.04.1. In fact I'd just done the same for Helix rc3 days before, so the process was fresh in my mind.

If it helps others, I documented steps taken from initial build to running kodi.bin as a background process. Here's a link to the Evernote doc. Apologies, it's a bit rough as was just a brain-dump and not meant for public consumption, but I figure might as well share as those in this thread will be able to fill in any errors or gaps in the process.

Happy to provide logs of kodi running. Just let me know what you need.


Regards,
overbyrn

I've just managed to compile successfully using your instructions It seems to work fine although i have 1 problem. It keeps starting the webserver on port 80. I can't run it on that port as i run a apache. When i try to change the port in guisettings.xml it doesn't do anything. Is this set somewhere else in headless mode?

try adding it to advancedsettings.xml, shot in the dark,

PS :also i got the code and everything downloaded on my pc for building it for windows, just gotta wait till not on my mobile internet connection (tomorrow) to update my visual studio from 2012 to 2013
find quote
sparklyballs Offline
Senior Member
Posts: 143
Joined: Feb 2012
Reputation: 1
Post: #27
it ran for me on port 8080 with relevant lines in advancedsettings.xml

Code:
<services>
<devicename>XBMC Server</devicename>
<esallinterfaces>false</esallinterfaces>
<escontinuousdelay>25</escontinuousdelay>
<esenabled>true</esenabled>
<esinitialdelay>750</esinitialdelay>
<esmaxclients>20</esmaxclients>
<esport>9777</esport>
<esportrange>10</esportrange>
<upnpannounce>true</upnpannounce>
<upnprenderer>false</upnprenderer>
<upnpserver>true</upnpserver>
<webserver>true</webserver>
<webserverpassword>xbmc</webserverpassword>
<webserverport>8080</webserverport>
<webserverusername>xbmc</webserverusername>
<webskin>webinterface.default</webskin>
<zeroconf>true</zeroconf>
</services>
find quote
brownbear1984 Offline
Senior Member
Posts: 101
Joined: Dec 2010
Reputation: 1
Location: Maidenhead, UK
Post: #28
Actually i figured it out. I needed to delete default="true" from the line

So
Code:
<webserverport default="true">80</webserverport>

becomes
Code:
<webserverport>8080</webserverport>

Thanks anyway
find quote
pgjensen Offline
Senior Member
Posts: 105
Joined: Dec 2008
Reputation: 2
Post: #29
Thanks, I got the webserver to work now! I am having issues getting the JSONRPC server working, though. It says it was started successfully but I can't get anything connected. I have esenabled=true and esallinterfaces=true in the guisettings.xml file. Any thoughts?
find quote
fma965 Offline
Fan
Posts: 411
Joined: Sep 2012
Reputation: 8
Location: United Kingdom
Post: #30
Doesn't work for windows, just built it from source and tried /headless --headless -headless etc but nothing, the GUI still loads up. Great work though.

EDIT: since i did this at stupid o clock i think i forgot to select the helix_headless branch, will try again with the correct branch xD
(This post was last modified: 2014-12-28 15:02 by fma965.)
find quote
Post Reply