Skip to content
bobo1on1 edited this page Jan 8, 2013 · 12 revisions

xbev

xbev is a simple desktop eventclient for XBMC, written in Python, it creates a window on using gtk and sends any keypresses received on that window to XBMC's eventserver.

It also uses the JSON-RPC api to show a text input box when XBMC sends Input.OnInputRequested, the text entered there will be sent to XBMC using Input.SendText, this can be used to enter text in xbmc when needed. The entered text will be sent to XBMC immediately, when you press enter xbev will set the "done" parameter to true indicating that this is the final text. When the text input is active, xbev will not send any keypresses to XBMC except the escape key to abort the text input. This feature is only supported in XBMC Frodo and higher.

usage: xbev [HOST]

If xbev is started without arguments, it will automatically try to detect the ip address using zeroconf.

Known issues

  • A blocking socket is used from the main thread for JSON-RPC, if any operation on the socket blocks (for example the connect takes a long time), then xbev will be frozen until the call returns.
  • xbev assumes that the entire Input.OnInputRequested and Input.OnInputFinished JSON messages are fully read in one recv call.

Pretty pictures with text

When starting xbev without arguments, it will wait for XBMC to start. When XBMC starts (or is already running), xbev will connect to XBMC's eventserver and JSON-RPC server. If xbev can't connect to the JSON-RPC socket, it will show an error message. If XBMC sends a Input.OnInputRequested message to xbev, xbev will show a text entry.

Running xbev on windows (thanks to ParkerR_)

Download and install python 2.7 from http://python.org/download/ (I have no idea if it works with python 3.3, but there's no PyGTK package for it at the time of writing).

Add the path where you installed it to the PATH variable (default C:\Python27)

  1. Right click Computer
  2. Click Properties
  3. On the left hand side click Advanced system settings
  4. Then towards the bottom of that windows click Environment Variables...
  5. Scroll down in System variables until you see Path
  6. Add in the path to Python27 at the end. (Would be ;C:\Python27

Download and install the PyGTK all-in-one installer for python 2.7 from http://pygtk.org/downloads.html

Next open a command prompt and cd to the directory where xbev is. Run python xbev and the XBMC IP address (ex python xbev 192.168.1.128)

Clone this wiki locally