Like a lot of people I have a central computer which stores my pictures , videos etc, and have a home theater server with XBMC in the living room. To enable XBMC to display pictures and stream videos from your central computer you can use SAMBA. These instructions are for Ubuntu but apart from the actual SAMBA package install they should work for any Linux flavor.
On your server you want to share out the media from install SAMBA
sudo apt-get install samba
Create a nice easy directory structure
To make things easy for XBMC create a directory structure with symlinks to your media directories that can be shared out. e.g. within XMBC I want to have my media split into movies , videos, music_videos , music and pictures. The real directories for these on my central server are /videos/movies , /misc/vids, /misc/music_vids , /music , /camera . So I created a top level /xbmc directory with /xbmc/movies /xbmc/videos /xbmc/music_videos /xbmc/pictures
Now when I share out /xbmc everything is nicely organized.
sudo vi /etc/samba/smb.conf
Ensure your network interfaces are in the interfaces = line and remove the ; at the beginning of the line.
Add these lines after the interfaces line , where the IP address after 127.0.0.1 is the IP address of your XBMC box assuming it has a static IP, if you are using DHCP for the XBMC server then put in the DCHP subnet e.g. 192.168.1.0/24
After years of waiting for the price of quiet small form factor PCs to come down to a reasonable price point the Acer Revo 3700 has appeared. I purchased one to install XBMC on. I also purchased an add on external USB DVD drive as I also wanted to replace my DVD player.
Because I wanted to use the Revo to do other things besides XBMC I decided to do a normal Ubuntu install rather than a minimum install with XBMC. I selected Ubuntu 10.04 LTS 32 bit to install.
I decided to make things easy and do the install with a wired Ethernet connection and enable wireless afterwards.
As I had an USB DVD drive I thought I would use this to do the install – big mistake it failed after the splash screen with :-
(initramfs) mount mounting /dev/loop0 on filesystem.squashfs failed: Input/Output error Cannot mount /dev/loop0 (/cdrom/casper/filesystem.squashfs on // filesystem.squashfs
Looking at the forums it appeared that boot from a USB memory stick would be a better solution. To make a bootable USB stick go here
Power on the Revo and hit DEL to enter the BIOS. Select Advance BIOS Features – cursor down to 1st Boot Device and use the – key to select Removable Device.
F10 to save your settings and the Revo will reboot.
In spite of selecting Removable Device as the 1st boot it still booted from the hard disk – so I booted again and hit F12 to go into the boot menu then I could select the USB Flash to boot from.
Select erase and use the entire disk
Login name xbmc
Set a password and select Log in automatically
Once the installation is complete it will prompt you to reboot – click Restart Now. Hit DEL to go into the BIOS again and select the hard disk as the 1st Boot Device . Remove the USB memory stick you booted from. Hit F10 to save and exit. It should now boot from the hard disk into Ubuntu.
Open up a terminal and do netstat -rn to check the network looks right.
Stop the screen saver from locking the screen with a password – System – Preference – Screensaver – untick lock screen when screensaver is active.
Update manager should appear on the bottom toolbar advising that updates are available. Install the updates and once installed reboot the Revo.
I had a lot of problems getting the wireless network to work. First set it up in Network Manager , go to System – Preferences – Network Connections
Select Wireless – Add and add your wireless details. Choose Infrastructure rather than addhoc and select the tick box to allow all users access. Reboot the Revo and if like me the wireless does not work check in /var/log/messages for failure to open a file :-
Reboot the Revo – you will be prompted for your password to start the network and now you should get a message about the wireless network has established a connection.
Now go to System – Preference – Network Connections
You will see a new connection with Last Used of now
Edit this and ensure the mode is Infrastructure , Connect automatically is ticked and available to all users is ticked. Apply the changes – it will disconnect the wireless connection. Reboot the Revo and this time you should not be prompted for a password and the wireless network should connect successfully.
I would advise you to setup a static IP address for the Revo as this will make things easy for using NFS mounts and using an Android phone app as a remote.
To setup a static IP address go to the Network Manager, select the Wireless connection 1 and add a static IP ( your router should have details of the DHCP range of IPs it gives out so select an IP address outside of this range ). Fill in the gateway ( e.g. the address of your router , the DNS servers ( either use your ISP’s one or use a public DNS service like Google’s one ). Reboot the Revo and check with netstat -rn and ifconfig -a that all is well.
Install flash and other media codecs
As this server is going to be able to play multiple video and sounds formats install the restricted extras for Ubuntu – see here
Sound over HDMI in the Revo 3700
I had lots of problems with this and there are lots of remedies posted on forums, the fix does seem to depend on what version of Ubuntu you install. To have sound over HDMI working you need X up and be connected to a HDMI display so plug your TV into the HMDI port.
Update the Alsa packages – instructions are here – you need to reboot after updating.
After installing a newer version of ALSA you now see the Nvidia devices :-
Search for the hashed out line #load-module module-pipe-sink
Add a line :-
load-module module-alsa-sink device=plughw:1,7
Remove any local user pulse config files :-
rm -rf ~/.pulse ~/.asound* ~/.pulse-cookie
Create a new /etc/asound.conf
sudo vi /etc/asound.conf
Reboot the Revo and now you should be greeted by Tom-Toms when Ubuntu starts and playing a video from a website in Firefox the sound will now come out of the TV. Don’t worry about the slow performance playing a Video in Firefox – the fixes are later in this guide.
Render method Auto detect
Allow hardware acceleration (VDPAU)
Adjust display refresh rate to match video
Sync playback to display
A/V sync method video clock (drop/dupe audio)
VDPAU studio level color conversion
Shutdown function shutdown
Weather – General change area code 1 – set it to your local city
Speedup video playback
Ensure you installed NVidia hardware acceleration (VDPAU) when you did the XBMC install above. To allow flash videos ( like Youtube ) to run in full screen you need a version of flash that supports hardware acceleration – this currently means getting a beta version. The easiest way is to install Flash Aid Firefox plugin , once installed click on the Flash Aid symbol in the top right hand corner of Firefox and just let the wizard install the best version of flash for the hardware. I did notice that Youtube videos played faster in the XBMC plugin than in Firefox which is fine as the XBMC plugin is nice to use.
If you are in the UK then install the BBC Iplayer XBMC plugin – follow the instructions here . The XBMC BBC Iplayer plugin plays programs much better full screen than in Firefox.
As I have an Android phone I looked for a remote app for XBMC and downloaded the official XBMC app
On the Revo start up XBMC and go to System – Network . enable Allow control of XBMC via HTTP , Allow programs on other systems to control XBMC, set a user name and password. Then go to System – Settings – Input Devices and enable Remote control sends keyboard presses.
Assuming you already have your Android phone setup so it is connected to your WIFI :-
Download the XBMC Android app, Once downloaded press menu and fill in the IP address of the Revo , username and password you setup in XBMC above ( not the Linux username / password ) , tick WIFI only. press the back button and OK the settings. Now you should be able to control XBMC from your phone.
setup XBMC to autostart
To setup XBMC to autostart but still have the Gnome desktop available if you click exit rather than shutdown in XBMC :-
System – Preferences – Startup Applications. Click add and fill in name: xbmc , Command: xbmc , Comment xbmc
Now when the Revo boots it will run xbmc but you still have the option to exit to the desktop by selecting exit in XBMC or to shutdown the Revo by selecting shutdown in XBMC
Sound no longer works after updates that include a new kernel
If you install updates ( security fixes etc. ) and it includes a new kernel the HDMI sound won’t work and XBMC will say cannot open audio device.
Update the alsa packages as above, make a copy of your /etc/asound.conf , create a new /etc/asound.conf :-
If you don’t do this then you will get an error when starting alsamixer after the reboot ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused cannot open mixer: Connection refused
rm -rf ~/.pulse ~/.asound* ~/.pulse-cookie
Now reboot and check aplay -l sees the Nvidia sound card as in the install instructions above.
Startup alsamixer and unmute the channels as in the install instructions
Copy back your original /etc/asound.conf , reboot and your sound should be back.