xbev

From Official Kodi Wiki
Jump to navigation Jump to search

xbev is a simple eventclient for XBMC, written in Python, it creates a window on the desktop using gtk and sends any keypresses received on that window to XBMC's eventserver.
It can be downloaded from https://github.com/bobo1on1/xbev (click the zip button if you don't have git or don't know how to use it).


It also uses the JSON-RPC api to show a text input box when Kodi sends Input.OnInputRequested, the text entered there will be sent to Kodi using Input.SendText, this can be used to enter text in xbmc when needed. The entered text will be sent to Kodi 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 Kodi except the escape key to abort the text input. This feature is only supported in Kodi 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 (I know it's retarded, but I'm new to python).

Pretty pictures with text

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 Kodi IP address (ex python xbev 192.168.1.128)