Running XBMC headless (ie. on a server) using latest code from head
#1
There have been a number of threads asking if it is possible to run XBMC headless on a (linux) server...

Well looking at the latest commits against head there is a change to xbmc/main.cpp where XBMC_Run now takes a parameter for GUI rendering.

So I have prepared the following patch to allow folks to run xbmc with --headless parameter to run without a GUI.

Headless Patch

You can then control the headless XBMC instance using the Web server interface, etc (Make sure you enable the Web server interface in advancedsettings.xml)

To run XBMC headless in the background:
Code:
./xbmc.bin --headless &

To get XBMC to update the video library:
Code:
curl --user xbmc_web_user:xbmc_web_password "http://xbmc_ip_address:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(XBMC.UpdateLibrary(video))"

To get XBMC to exit:
Code:
curl --user xbmc_web_user:xbmc_web_password "http://xbmc_ip_address:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(XBMC.Quit)"

Note: You need to enable HTTP access in XBMC and xbmc_web_user, xbmc_web_password, xbmc_ip_address will be specific to your setup

Edit by Memphiz: converted the link to pastebin for easier review
Reply
#2
This is very nice, now I can implement a simple .py script after I get a new movie or watch a folder and trigger the update library w/o the full xbmc GUI. Will test tonight and give you feedback. Keep up the good work
Reply
#3
Don't post bugs for this feature. Its more then unlikly that it works. Its not even in there for beeing a headless option. Its a needed approach for further development as the supported platforms are growing. Thats why there is no cmd line option for this. So consider this feature unsupported for now.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#4
With the latest code from head you now create a libxbmc.so shared library that can be used to create your own CLI (or server-based) XBMC applications... Smile

Here is a sample Video Library scanner application that uses libxbmc.so to update XBMCs Video Library...

http://pastebin.com/WpEvRTws

Enjoy!
Reply
#5
(2012-06-13, 10:46)vicbitter Wrote: With the latest code from head you now create a libxbmc.so shared library that can be used to create your own CLI (or server-based) XBMC applications... Smile

Here is a sample Video Library scanner application that uses libxbmc.so to update XBMCs Video Library...

http://pastebin.com/WpEvRTws

Enjoy!
Can this be compiled on Windows?
Reply
#6
So if I take the latest dailies release I can run xbmc in headless?
I'm on a CuBox in ArchLinuxArm and want to have xbmc on it purely to scan to library and run JSON.
Thanks
Niietzshe
Reply
#7
(2012-10-18, 12:45)niietzshe Wrote: So if I take the latest dailies release I can run xbmc in headless?
I'm on a CuBox in ArchLinuxArm and want to have xbmc on it purely to scan to library and run JSON.
Thanks
Niietzshe

Did this work?
Reply
#8
do you plan to make a PR for this feature?
HTPC: Asus AT5IONT-I | 4GB DDR3 RAM | XBMC git on FreeBSD 11-STABLE amd64
Home AV: Mitsubishi HC5000 | Denon 4810 | Monitor Audio GS20 GS10 GSLCR GSFX
Reply
#9
Is this in the xbmc mainline?
Reply
#10
i too would like to know the answers to the last 3 questions
Reply
#11
(2013-04-26, 21:54)bobbintb Wrote: i too would like to know the answers to the last 3 questions

No it is not.
Reply
#12
So is there an easy way to have a headless xbmc to update all our files in mysql?
I just installed ubuntu server for this purpose
Reply
#13
(2013-04-29, 22:22)alon24 Wrote: So is there an easy way to have a headless xbmc to update all our files in mysql?
I just installed ubuntu server for this purpose

Well, I spent 35 EUR on a rPi just for that purpose...works like a charm.
Reply
#14
I want to consalidate,
SickBeard, sabnzbd, deluge, xbmc, tvheadend, mysql

all in one server, and clients can be many

I have RPI but I want it to be a client (I also have an android stick).

I am still trying to find my way....
Reply
#15
(2013-04-29, 22:38)alon24 Wrote: I want to consalidate,
SickBeard, sabnzbd, deluge, xbmc, tvheadend, mysql

all in one server, and clients can be many

I have RPI but I want it to be a client (I also have an android stick).

I am still trying to find my way....

i use unraid for that
Reply

Logout Mark Read Team Forum Stats Members Help
Running XBMC headless (ie. on a server) using latest code from head1