Friday, August 21, 2009

Remote access to XBMC Live /xbmcbuntu with GUI

We will use NX server to do this. It is the easiest/most stable/most secure method.
I would like to be able to use XDMCP since it would require no additional components. Problem is that I don't know how to make Xming start the wm manually.

This will work on XBMC Live and xbmcbuntu installations. Live have fluxbox installed, xbmcbuntu have what ever you installed.

1) install NX server
(check for new versions

sudo apt-get install libaudiofile0


sudo dpkg -i nxclient_3.3.0-6_i386.deb nxnode_3.3.0-17_i386.deb  nxserver_3.3.0-22_i386.deb

2) Install NX client on laptop/desktop

3) Connect the NX client
Start the client
Type a new session name
Press configure
enter host/ip
Select Desktop Unix-Custom
Press settings=>
Run the following command: /usr/bin/fluxbox (or in my case /usr/bin/openbox-session)
Select : New virtual desktop
Save settings

4) Logged in!
This will bring up a black window with no visible menus and no desktop.
Right-click on background to get menus select "terminal emulator". This works fine in fluxbox.
In openbox xterm does not work correctly in NX when started from the top level menu and we do not have an application/ Debian menu.  To fix this we install "menu" and another terminal.

sudo apt-get install menu roxterm 
roxterm is not really needed, xterm works fine in NX if started from the the Debian menu.

I want to be able to do some stuff before I install gnome so I add some applications directly:
sudo apt-get install menu roxterm dillo rox-filer leafpad 
(dillo = web, rox-filer = browse file system, leafpad text editor)
If you want to use gnome you will not need these.

4) Next step
If you want to keep  it very light weight you can use the system like this, just continue to add the none gnome applications that you need.
Otherwise you may want to use a desktop environment like gnome, lxde or rox.
It also works fine to add gnome-support but use gnome applications in openbox. This is what I will do now.

5) Install Gnome
sudo apt-get --no-install-recommends install gnome-core

Now you can change from custom to gnome in NX and connect.
I have listed a number of gnome applications here

To start with I want to share a folder, have a bittorrent client, mount usb and browse the web:
sudo apt-get install deluge nautilus-share epiphany-browser epiphany-extensions gnome-mount


  1. So what is the advantage to this method over basic third party remote access software? I enjoy tinkering as much as the next guy, especially in a Linux setting, but this is almost like trying to make a better mousetrap///

  2. It depends what you mean. I think nx is a basic third party remote access software?

    If you a are refering to vnc this is better a for a number of reasons.
    1) It is not that simple to get vnc to create multiple background sessions ad-hoc. This is my main reason for using nx.
    2) better performance
    3) ssh based and encrypted.

  3. With this recipe usb mount work in XBMC and Gnome?

  4. It you mean if usb disks will auto mount in xbmc and gnome the answer is no. I cant get usb mount to work with gnome in xbmc 9.11. There is a problem with policykit or something. For the moment I use lxde instead of gnome.

  5. ...and install policykit-1-gnome :-(

  6. Ps.: My comment is true if use apt-get install lxde

  7. use install --no-install-recommends lxde

  8. thanks for your help this way is good
    Ps.: Sorry for my bad english ;-)

  9. Vikjono, can you help me with the following.

    I found your post at : (number 5) and found it very usefull so far, but still had a question / issue. After more searching i found your blog :-)

    My question as follows;

    I want to monitor xbmc (not the xmanager LXDE), but the application xbmc (or better say, sesssion XBMC as it is possible to login using XBMCbuntu)

    I found out that this was not working, resulting in the following error when i tries starting XBMC in LXDE as an application. While for example starting Chrome wasn't any problem at all.

    "XBMC needs hardware accelarated OpenGL rendering. Install an appropriate graphics driver." and a black screen....

    I hope you can help me out so i finally can monitor a running XBMCbuntu configuration on a other location (i'm worink in a school environment)

    Regards, Patrick

  10. as an addition,

    You gave some examples for possible sesssions (below)

    Now we can connect from the laptop with nx server client for windows.
    Select custom and enter

    & new virtual desktop

    (/usr/bin/lxsession -s XBMCbuntu -e LXDE)

    Maybe there is an working /usr/bin/..... for my question i didn't found out ?


  11. It will not be possible with NX server (as far as I know). Somepeople to it with vnc but I think that does not work well on linux. It should work fine with xdmcp as long as you do not want sound or remote functionality.

  12. Thankyou vikjono, i will look out for some other solution. I hoped to skip VNC (slow in performance), will look into RDP solutions.

    Regards, Patrick