Whilst you may be running debian as an HTPC (Home Theater PC) connected to your TV running Kodi , the machine can be servered-up do additional tasks.
For instance I would also like it to host my angular app controlling my MQTT devices, or make files accessible though the internet using ssh/ftp/nfs ..
For that reason this blog is a list of addtional services I’ve installed on that machine. No need to waste the resources of buying an extra machine for the server or home automation.
Allows the server to share a folder using the smb:// protocol. This makes it’s shares visible to the windows workgroup network. Easy for accessing files between windows-linux from explorer-thunar (in debian XFCE )
The easiest in use and configuration by far is from the gadmin package:
sudo apt-get install gadmin-samba
Now you may be wondering, why a VNC client when we’ve got teamviewer? Well while Teamviewer is easy to install and use, there are some drawbacks:
- they’ve been hacked not long ago exposing accounts and passwords
- it’s commercial soft; the annoying nag screen that comes on the remote computer after disconnecting.. messing up your movie/game experience
- it prevents some games going fullscreen correctly
Vnc is light and easy to install using the following steps (for debiaan 8 xfce )
su apt-get install xfce4 xfce4-goodies gnome-icon-theme tightvncserver
External Access: anywhere through the internet to your server
For most people, the server is on a NAT behind the ISP’s router. In my case, the ISP gives you one dynamic external IP address… Easier would be to link it to a dynamic dns service. Create a free account on no-ip.com , just gotta log in every 30days to keep it alive. The client software can also be found on their site.
cd wget http://www.noip.com/client/linux/noip-duc-linux.tar.gz tar zxvf noip-duc-linux.tar.gz cd noip-2.1.9-1 sudo make sudo make install
The make install asks for your credentials you credited in the noip account earlier. Don’t forget to setup your account and one hostname first! ( I recommend following the new device configurator). It’s ver straight forward for the average user.
Once you’ve got your connection tested from the noip configuration wizard, you only need to forward your ports on your router that your apps use on the remote server.
HTPC (entertainment + server in one ! )
In my case my debian server will not be head-less. Since the server is sitting near the TV we might as well give it some added functionality like KODI and some simple games
Debian Software Common Packages
This adds the add-apt commands for example making it easier to add repositories:
sudo apt-get install software-properties-common
It’s always fun having the old-school emulators to play games from N64, Sega .. Let’s get our emulators installed first. So let’s get retroarch installed: dependencies for debian 8.7
apt-get -y install build-essential libxkbcommon-dev zlib1g-dev libfreetype6-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev nvidia-cg-toolkit nvidia-cg-dev libavcodec-dev libsdl2-dev libsdl-image1.2-dev libxml2-dev
Then clone the repo so we can make a fresh build.
git clone git://github.com/libretro/libretro-super.git
Wait a long time for the compilation of all the cores..
mkdir -p ~/ra/cores cd retroarch make DESTDIR=~/ra install cd .. #to libretro-super directory ./libretro-install.sh ~/ra/cores