May 9, 201412 yr Over on the XBMC forum there is a lively discussion about running a headless instance of the latest XBMC version (gotham) and it's confirmed working now. This isn't my work, but i thought that some here would benefit from the collective knowledge, I'm no expert at tutorials and stuff, but here goes. I changed the install slightly from the version in the XBMC forums to allow for scanning of bluray rips, (without the changes it would report all the separate files in the rip as individual movies). This was done on a completely virgin install of ubuntu server 12.04 running as a VM, i selected default server tools and openssh in the tasksel selection of setting it up. Then run the following commands, sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo reboot ==== AFTER REBOOT ====== sudo apt-get install python-software-properties software-properties-common sudo add-apt-repository ppa:team-xbmc/unstable sudo add-apt-repository ppa:team-xbmc/xbmc-ppa-build-depends sudo apt-get update then to install the dependencies, apart from taglib. sudo apt-get build-dep xbmc sudo reboot ====== INSTALL TAGLIB ======= wget https://github.com/downloads/taglib/taglib/taglib-1.8.tar.gz tar xzf taglib-1.8.tar.gz cd taglib-1.8 cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_RELEASE_TYPE=Release . make sudo make install sudo ldconfig cd .. ======== Get Source Code From Git And Configure ======== git clone git://github.com/escoand/xbmc-server.git cd xbmc-server/ git remote add upstream git://github.com/xbmc/xbmc.git git checkout -b Gotham origin/Gotham git checkout Gotham git pull upstream Gotham ./bootstrap ============ next command is all one line ============== ./configure --enable-shared-lib --disable-debug --disable-vdpau --disable-vaapi --disable-crystalhd --disable-vtbdecoder --disable-vtbdecoder --disable-openmax --disable-joystick --disable-xrandr --disable-rsxs --disable-projectm --disable-rtmp --disable-airplay --disable-airtunes --disable-dvdcss --disable-optical-drive --enable-libbluray --disable-libusb --disable-libcec --disable-libmp3lame --disable-libcap --disable-pulse --disable-alsa =========== Then to build and install ============== sudo make sudo make install sudo cp libxbmc.so /lib cd xbmc sudo make -f make_xbmc-server all sudo make -f make_xbmcVideoLibraryScan all sudo cp xbmc-server /usr/local/lib/xbmc/xbmc-server.bin sudo cp xbmcVideoLibraryScan /usr/local/lib/xbmc/ ======== Now make it autorun at startup ================ cd ~ sudo nano xbmc_init (paste the following into the empty file, changing the RUN_AS=sparklyballs to suit your username) #! /bin/sh ### BEGIN INIT INFO # Provides: xbmc # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts instance of XBMC # Description: starts instance of XBMC using start-stop-daemon and xinit ### END INIT INFO ############### EDIT ME ################## # startup args XBMC_BIN_HOME=/usr/local/lib/xbmc XBMC_HOME=/usr/local/share/xbmc DAEMON=/usr/local/lib/xbmc/xbmc-server.bin DAEMON_OPTS=" --no-test" # script name NAME=xbmc # app name DESC=XBMC # user RUN_AS=sparklyballs # Path of the PID file PID_FILE=/var/run/xbmc.pid ############### END EDIT ME ################## #test -x $DAEMON || exit 0 set -e case "$1" in start) echo "Starting $DESC" start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS ;; stop) echo "Stopping $DESC" start-stop-daemon --stop --pidfile $PID_FILE ;; restart|force-reload) echo "Restarting $DESC" start-stop-daemon --stop --pidfile $PID_FILE sleep 5 start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 ====== Then run these commands ================ sudo cp ~/xbmc_init /etc/init.d/xbmc sudo chmod 744 /etc/init.d/xbmc sudo update-rc.d xbmc defaults That will give you a working instance of xmbc-headless. reboot and check it's running run top and look for xbmc-server.bin You will need to go into ~/.xbmc/userdata and edit the guisettings.xml file to suit your local setup and enable the webserver as well as making an advancedsettings.xml containing your mysql database location etc... hopefully this helps some people here, as said right at the beginning i'm no expert at tutorials and it's not my work, just stuff gathered from different sources.
May 10, 201412 yr Any chance you can link to the XBMC headless/gotham discussion (I've searched the XBMC forums and google and cannot find it)? I created a new VM (ubuntu 14.04/12.04) and followed your instructions and they don't appear to be working for me (it's entirely possible I'm an idiot though). I'm getting this or similar after running "git apply xbmc-server.patch" xbmc-server.patch:482: trailing whitespace. // SDL redefines main as SDL_main xbmc-server.patch:569: trailing whitespace. if (!g_application.IsVideoScanning()) error: patch failed: Makefile.in:481 error: Makefile.in: patch does not apply error: patch failed: Makefile.in:176 error: Makefile.in: patch does not apply error: patch failed: Makefile.in:534 error: Makefile.in: patch does not apply error: xbmc/make_xbmc-server: already exists in working directory error: xbmc/make_xbmcVideoLibraryScan: already exists in working directory error: patch failed: xbmc/network/Network.cpp:212 error: xbmc/network/Network.cpp: patch does not apply error: xbmc/xbmc-server.cpp: already exists in working directory error: xbmc/xbmcVideoLibraryScan.cpp: already exists in working directory
May 10, 201412 yr Author Any chance you can link to the XBMC headless/gotham discussion (I've searched the XBMC forums and google and cannot find it)? I created a new VM (ubuntu 14.04/12.04) and followed your instructions and they don't appear to be working for me (it's entirely possible I'm an idiot though). I'm getting this or similar after running "git apply xbmc-server.patch" xbmc-server.patch:482: trailing whitespace. // SDL redefines main as SDL_main xbmc-server.patch:569: trailing whitespace. if (!g_application.IsVideoScanning()) error: patch failed: Makefile.in:481 error: Makefile.in: patch does not apply error: patch failed: Makefile.in:176 error: Makefile.in: patch does not apply error: patch failed: Makefile.in:534 error: Makefile.in: patch does not apply error: xbmc/make_xbmc-server: already exists in working directory error: xbmc/make_xbmcVideoLibraryScan: already exists in working directory error: patch failed: xbmc/network/Network.cpp:212 error: xbmc/network/Network.cpp: patch does not apply error: xbmc/xbmc-server.cpp: already exists in working directory error: xbmc/xbmcVideoLibraryScan.cpp: already exists in working directory I'm no expert, but to me it looks like you've tried to do that step twice. The lines about files already existing in working directory are the key for me, as the part of the patch is to place those files there. They are not part of the GitHub files from xbmc, also the other stuff about patch does not apply would also fit in with you trying the patch command twice.. I may be the idiot and put the same command twice, but I'm out and don't have my glasses with me
May 13, 201412 yr I have been encountering some issues while running the "make" command. It seems to fail while making libxbmc.so I built my ubuntu 12.04 vm using the BUUX script, followed your directions precisely. Here's where the breakdown occurs http://pastebin.com/nE3tVXfg I appreciate any help.
May 13, 201412 yr Author I have been encountering some issues while running the "make" command. It seems to fail while making libxbmc.so I built my ubuntu 12.02 vm using the BUUX script, followed your directions precisely. Here's where the breakdown occurs http://pastebin.com/nE3tVXfg I appreciate any help. I'm not sure what the BUUX script is, also Wsinipex is modifying the code in github to remove the need for the patch.
May 13, 201412 yr This is how I built my ubuntu 12.04 vm http://lime-technology.com/forum/index.php?topic=33132.0
May 13, 201412 yr Author This is how I built my ubuntu 12.02 vm http://lime-technology.com/forum/index.php?topic=33132.0 There are some updated instructions here http://forum.xbmc.org/showthread.php?tid=132919&pid=1708770
May 13, 201412 yr Author This is how I built my ubuntu 12.02 vm http://lime-technology.com/forum/index.php?topic=33132.0 I've updated the instructions above with the info from the original post.
May 13, 201412 yr Still getting the same error at the same place, when running make. TagLibVFSStreamE[typeinfo for MUSIC_INFO::TagLibVFSStream]+0x10): undefined reference to `typeinfo for TagLib::IOStream' collect2: ld returned 1 exit status make: *** [libxbmc.so] Error 1
May 13, 201412 yr Author Still getting the same error at the same place, when running make. TagLibVFSStreamE[typeinfo for MUSIC_INFO::TagLibVFSStream]+0x10): undefined reference to `typeinfo for TagLib::IOStream' collect2: ld returned 1 exit status make: *** [libxbmc.so] Error 1 2 questions, are you sure you're using 12.04 ubuntu, and if so have you followed the taglib instructions ?
May 13, 201412 yr 2 questions, are you sure you're using 12.04 ubuntu, and if so have you followed the taglib instructions ? Question 1: Yes Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise Question 2: Yes
May 13, 201412 yr Author 2 questions, are you sure you're using 12.04 ubuntu, and if so have you followed the taglib instructions ? Question 1: Yes Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise Question 2: Yes try this sudo apt-get purge libtag1-dev
May 13, 201412 yr try this sudo apt-get purge libtag1-dev It worked!!! top is now showing xbmc-server.bin running Thanks so much! Now off to setting up my advanced settings file.
May 27, 201412 yr Just used your guide and it worked perfect! no errors at all! One question I have, how does the update library work? or clean library? Do I need to send scripts to update the library or will this monitor my sources and when media is added it will auto update? Thank You very much for putting all this together.
May 27, 201412 yr Author Just used your guide and it worked perfect! no errors at all! One question I have, how does the update library work? or clean library? Do I need to send scripts to update the library or will this monitor my sources and when media is added it will auto update? Thank You very much for putting all this together. You need to edit the guisettings.xml file in ~/.xbmc/userdata and change the following values to suit your setup (particularly the port and password, mine is starred below). (Note, the first value webserver needs to have the "default=" bit taken out to look like mine below, i can't remember if it says true or false) <webserver>true</webserver> <webserverpassword default="true">********</webserverpassword> <webserverport default="true">8080</webserverport> <webserverusername default="true">xbmc</webserverusername> If you are using a mysql based library setup you will also need to create an advancedsettings.xml file in ~/.xbmc to reflect your system Once you have done that and restarted you can access XBMC webui at <yourserverip>:8080 to do library tasks.
May 28, 201412 yr I have no idea if this is an option for me, but I hope. There is this line ./configure --enable-shared-lib --disable-debug --disable-vdpau --disable-vaapi --disable-crystalhd --disable-vtbdecoder --disable-vtbdecoder --disable-openmax --disable-joystick --disable-xrandr --disable-rsxs --disable-projectm --disable-rtmp --disable-airplay --disable-airtunes --disable-dvdcss --disable-optical-drive --enable-libbluray --disable-libusb --disable-libcec --disable-libmp3lame --disable-libcap --disable-pulse --disable-alsa Essentially, I see it is disabling alsa and pulse, the 2 things needed to play audio...What I am trying to accomplish is a XBMC install that play audio and is controlled from my phone (headless?) I have no need for the GUI other than to add my media, from there, I am passing through an audio card for playback. I was looking at this option simply because installing with the GUI rockets my CPU usage to 98% in my vm. As soon as XBMC is stopped, things return to normal. My thought is that it has to do with the video card I am passing through, but I am not 100% certain, but I was thinking, this might just be way easier and removes the need for that video card. However, based on the noted command, it seems I have disabled the 2 things that the system can use to do playback and in turn eliminating this as a possible option for me.
May 28, 201412 yr Author I have no idea if this is an option for me, but I hope. There is this line ./configure --enable-shared-lib --disable-debug --disable-vdpau --disable-vaapi --disable-crystalhd --disable-vtbdecoder --disable-vtbdecoder --disable-openmax --disable-joystick --disable-xrandr --disable-rsxs --disable-projectm --disable-rtmp --disable-airplay --disable-airtunes --disable-dvdcss --disable-optical-drive --enable-libbluray --disable-libusb --disable-libcec --disable-libmp3lame --disable-libcap --disable-pulse --disable-alsa Essentially, I see it is disabling alsa and pulse, the 2 things needed to play audio...What I am trying to accomplish is a XBMC install that play audio and is controlled from my phone (headless?) I have no need for the GUI other than to add my media, from there, I am passing through an audio card for playback. I was looking at this option simply because installing with the GUI rockets my CPU usage to 98% in my vm. As soon as XBMC is stopped, things return to normal. My thought is that it has to do with the video card I am passing through, but I am not 100% certain, but I was thinking, this might just be way easier and removes the need for that video card. However, based on the noted command, it seems I have disabled the 2 things that the system can use to do playback and in turn eliminating this as a possible option for me. It's a bit beyond my expertise, but you could try changing those two options to --enable instead of --disable and see what happens. you may need to install some extra libraries and if that is the case a swift google could help you out identifying the right ones.
May 29, 201412 yr was running through everything till I got to here: sudo make -f make_xbmc-server all ../libxbmc.so: undefined reference to `TagLib::Ogg::FLAC::File::File(TagLib::IOStream*, bool, TagLib::AudioProperties::ReadStyle)' ../libxbmc.so: undefined reference to `TagLib::Tag::properties() const' ../libxbmc.so: undefined reference to `typeinfo for TagLib::ID3v2::Latin1StringHandler' ../libxbmc.so: undefined reference to `TagLib::ID3v2::Latin1StringHandler::~Latin1StringHandler()' ../libxbmc.so: undefined reference to `TagLib::IT::File::File(TagLib::IOStream*, bool, TagLib::AudioProperties::ReadStyle)' ../libxbmc.so: undefined reference to `TagLib::PropertyMap::~PropertyMap()' ../libxbmc.so: undefined reference to `TagLib::IOStream::IOStream()' ../libxbmc.so: undefined reference to `TagLib::MP4::File::File(TagLib::IOStream*, bool, TagLib::AudioProperties::ReadStyle)' ../libxbmc.so: undefined reference to `TagLib::WavPack::File::File(TagLib::IOStream*, bool, TagLib::AudioProperties::ReadStyle)' collect2: ld returned 1 exit status make: *** [xbmc-server] Error 1 There is more, but that is simply all that I copied.
May 29, 201412 yr Just used your guide and it worked perfect! no errors at all! One question I have, how does the update library work? or clean library? Do I need to send scripts to update the library or will this monitor my sources and when media is added it will auto update? Thank You very much for putting all this together. You need to edit the guisettings.xml file in ~/.xbmc/userdata and change the following values to suit your setup (particularly the port and password, mine is starred below). (Note, the first value webserver needs to have the "default=" bit taken out to look like mine below, i can't remember if it says true or false) <webserver>true</webserver> <webserverpassword default="true">********</webserverpassword> <webserverport default="true">8080</webserverport> <webserverusername default="true">xbmc</webserverusername> If you are using a mysql based library setup you will also need to create an advancedsettings.xml file in ~/.xbmc to reflect your system Once you have done that and restarted you can access XBMC webui at <yourserverip>:8080 to do library tasks. ok fair enough. Got all that working, but for some reason the library scan stops after 18 seconds and nothing is found. Anyone else have this working with NFS? and mySQL? **EDIT** Never mind got it to work! now to get watchdog add on to work so I never need to manually update again! Thank you again!
May 29, 201412 yr Thanks sparklyballs (that's easily in the top 10 of things that I'd never have anticipated having to write ), I had issues with the first set of instructions not compiling properly (even after you pointed out I was running something twice). I tried multiple other instructions to no avail (they always failed somewhere). The updated instructions in the first post worked perfectly for 12.04 server. The only issue I had was that I didn't get an option for "default server tools" during the install - so I just installed SSH server when asked, everything still worked. Thanks again, I appreciate your work!
June 14, 201412 yr Hi, any chance this will work on Ubuntu Trusty (14.04). I changed the apt sources (team-xbmc-xbmc-ppa-build-depends-trusty.list) from "trusty" to "raring" but get the following error. # apt-get build-dep xbmc Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libsamplerate0-dev' instead of 'libsamplerate-dev' Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev' Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev' The following packages have unmet dependencies: libavfilter-dev : Depends: libavfilter3 (= 6:9.13-0ubuntu0.14.04.1) but it is not going to be installed libavformat-dev : Depends: libavformat54 (= 6:9.13-0ubuntu0.14.04.1) but it is not going to be installed libavresample-dev : Depends: libavresample1 (= 6:9.13-0ubuntu0.14.04.1) but 7:1.2.6-1~trusty1 is to be installed libavutil-dev : Depends: libavutil52 (= 6:9.13-0ubuntu0.14.04.1) but 7:1.2.6-1~trusty1 is to be installed libpostproc-dev : Depends: libpostproc52 (= 6:0.git20120821-4) but 7:1.2.6-1~trusty1 is to be installed libswscale-dev : Depends: libswscale2 (= 6:9.13-0ubuntu0.14.04.1) but 7:1.2.6-1~trusty1 is to be installed E: Build-dependencies for xbmc could not be satisfied.
June 14, 201412 yr Author Hi, any chance this will work on Ubuntu Trusty (14.04). I changed the apt sources (team-xbmc-xbmc-ppa-build-depends-trusty.list) from "trusty" to "raring" but get the following error. # apt-get build-dep xbmc Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libsamplerate0-dev' instead of 'libsamplerate-dev' Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev' Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev' The following packages have unmet dependencies: libavfilter-dev : Depends: libavfilter3 (= 6:9.13-0ubuntu0.14.04.1) but it is not going to be installed libavformat-dev : Depends: libavformat54 (= 6:9.13-0ubuntu0.14.04.1) but it is not going to be installed libavresample-dev : Depends: libavresample1 (= 6:9.13-0ubuntu0.14.04.1) but 7:1.2.6-1~trusty1 is to be installed libavutil-dev : Depends: libavutil52 (= 6:9.13-0ubuntu0.14.04.1) but 7:1.2.6-1~trusty1 is to be installed libpostproc-dev : Depends: libpostproc52 (= 6:0.git20120821-4) but 7:1.2.6-1~trusty1 is to be installed libswscale-dev : Depends: libswscale2 (= 6:9.13-0ubuntu0.14.04.1) but 7:1.2.6-1~trusty1 is to be installed E: Build-dependencies for xbmc could not be satisfied. You CAN get all the dependencies for 14.04 but the last I checked gotham version of a headless server crashes on 14.04 complaining about not having a GUI.
June 15, 201412 yr Did not get far in trying to get this installed......Any ideas? robert@ubuntu:~$ sudo apt-get build-dep xbmc Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libglew1.6-dev' instead of 'libglew-dev' Note, selecting 'libsamplerate0-dev' instead of 'libsamplerate-dev' The following packages have unmet dependencies: libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.37-0ubuntu0.12.04.1) but 10.0.11+maria-1~precise is to be installed E: Build-dependencies for xbmc could not be satisfied.
Archived
This topic is now archived and is closed to further replies.