2012-06-07, 19:06
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:
To get XBMC to update the video library:
To get XBMC to exit:
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
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