Kodi Shared MySQL / MariaDB Database

Kodi MySQL Database on Arch Linux

A centralized MySQL or MariaDB database allows any number of Kodi clients to share the same media library and to be constantly in sync with each other. This also has potential to greatly improve scraping performance since only a single database needs to be updated. Most useful feature is probably the synced watch and resume counter which allows resuming of paused media from any client.

Install MySQL / MariaDB on Arch Linux

Install MySQL / MariaDB on Arch Linux

Relational database like MariaDB is one of the required components to setup a web server as well as other less common uses such as when configuring a shared Kodi database. On Arch Linux MySQL has been replaced by a functionally identical community fork called MariaDB. The installation is also practically identical and as simple as can be expected.

Configure Command Line Notifications on Linux


Terminal notifications are not very useful these days since GUI is used far more often than command line. In any case it can be handy in some scenarios and it is good to know that no matter the mode of interaction the notification will always reach the user.

Install Media Browser on Arch Linux


Media Browser 3 is a web based interface that allows to view and manage movies, TV series and music among other things. Unfortunately Media Browser is unreasonably limited without paid features and that begs the question why one would use Media Browser when Plex Server is a much more well developed project. Free features still have some merit and Plex Server does not work with XBMC / Kodi which makes Media browser the only option in this case. The installation is painless so there is no reason not to give it a try.

Optimize XBMC / Kodi Cache Settings on Linux


Prior to changing cache settings install Kodi on Arch Linux. The default cache size in XBMC / Kodi is quite conservative especially when considering high bitrate streams. This lack of buffer can cause “Cache is Full” errors when streaming video and a general poor streaming performance. Increasing the cache should fix this issue. Cache settings are changed manually by editing advancedsettings.xml file which also has more cache related settings that can improve streaming.

Configure XBMC / Kodi Notifications on Linux


There are many reasons to set up notifications on certain events such as SMART error. Kodi / XBMC has a simple notification system that can be invoked programmatically or via a HTTP request. Before notifications can be received you will first need to install Kodi on Arch Linux and know the IP address and port on which it Kodi is reachable. It would be helpful to configure static IP on Arch Linux or setup static IP on Ubuntu Linux since then the IP would stay constant.

Configure Email Notifications on Arch Linux

arch-linux-email-logo Email system notifications can be used to warn of system issues like failing hard drives or failed backup scripts. To send emails a mail server can be configured but it is more complicated than it needs to be for simple notifications. Another issue with a local mail server is that some ISP’s may be blocking outbound emails making this method potentially unreliable.

A simpler alternative is to let an external mail service like Gmail send the actual email. To achieve this s-nail mail processing system will be used with the optional SMTP extension. The downside of this approach is that you will need to store you password in a plain text configuration file and allow “less secure apps” in Google settings. To avoid compromising the primary email account I opted to create a dummy account just for sending system notifications. This way, even if the Gmail account is compromised there is no real harm as no Emails are stored in that account.

Configure Automated SMART Checks on Arch Linux


SMART tests can give an early warning of impending hard disk failures. Tests can be run manually but this is inconvenient and results are not available immediately. Thankfully smartd can be used to run these tests automatically and email if any warnings occur. Before configuring automatic SMART monitoring you need to install smartmontools and check hard drives for SMART errors to make sure there are no failing hard drives. Smartmontools package also includes smartd daemon which will be used to run SMART tests automatically.

Check Hard Drives for SMART Errors on Arch Linux


SMART tests can give an early warning of impending hard disk failures. On most Linux distributions smartmontools package can be used to execute SMART scans. The package consists of smartctl utility which controls and monitors SMART disks and systemd daemon. Only smartctl is needed to run SMART tests manually but smartd is also required to Configure Automatic SMART Error Checks on Arch Linux.

Install Kodi on Arch Linux

Install Kodi on Arch Linux

Kodi on Arch Linux can be installed to run on a Desktop just like XBMC. It can also run without a Desktop environment with a help of a kodi-standalone-service package. Make sure to configure audio and especially video drivers before proceeding or it may fail to run.

Configure Static IP on Arch Linux


By default most Linux distributions including Arch Linux are configured with DHCP. Dynamically assigned IP is convenient for for desktop computers but quite cumbersome for headless servers. Setting up static IP allows a user defined IP addresses that will remain the same allowing to connect remotely. Arch Linux uses it’s own network configuration tool called netctl. Before you configure netctl profile you will need to find your network interface, gatewaynetmask and DNS.

Configure Samba Public Share

Samba Public Share

Before you configure Samba public share make sure to install Samba on Arch Linux or install Samba on Ubuntu Linux. You will also want to configure Samba shares. The public share is useful for sharing files freely between guest users without any credentials.

Enter Chroot Environment in Arch Linux

Arch Linux logo

When things go wrong to the point where recovering from the operating system is not possible chroot may the only practical way to recover a broken system. Chroot or change root gives access to otherwise inaccessible system and allows execution of commands within the system. To chroot into the system you will first need to Boot Arch Linux from USB or CD.

Fix “Unable to find root device” Error in Arch Linux

Fix "Unable to find root device" Error in Arch Linux

After a recent major update on Arch Linux which included a new kernel my system became unbootable. It is yet another lesson to be careful with Arch Linux. Thankfully regardless of how serious the issue seemed it can be solved with relative ease. You will need to boot Arch Linux from USB or CD and enter Chroot environment in Arch Linux to fix the issue.

Configure Samba Home Share

Samba Shares

Before you configure Samba home share make sure to install Samba on Arch Linux or install Samba on Ubuntu Linux. You will also want to configure Samba home shares. By default user home directories are made available as shares for each user of the same name. This means that if your requirements are only to share UNIX user home directories then you don’t need to make any changes outlined below.