Formatting an old 32 bit netbook with Linux to function as a file server

A friend wanted to reformat an old laptop with Linux to serve as a home file server, so that he could stream media files using VLC on iPad and Apple TV.

We initially tried with an HP laptop with a decent AMD chip (equivalent to i5 class) but had difficulty getting the installers for Fedora 27 64 bit and Linux Mint 18.3 64 bit Cinnamon to load. Problems with AMD have haunted me for 20 years. I am sure if we continue experimenting with command line arguments for the kernel at bootup we will find a solution.

My friend then found an old Acer Aspire One netbook. The system had an Atom N280 CPU (32 bit), 2GB RAM, and a 64GB hard disk.

Due to the limited offerings on the Fedora side (it is hard enough to convince  user to try to format with Linux, a text-only netinstall was all that Fedora offered for 32 bit), we decided to try Linux Mint 18.3 (32 bit) with a Cinnamon desktop. We encountered one problem with the install — we had to use the Tab key on startup to add the kernel command line arguments “acpi=off noapic”

Surprisingly, the system performed well — better than I expected, I remember trying to get 32 bit Fedora Linux to run on the same hardware: it ran hot, slow, and ran the fan like a leaf blower. I thought for sure that I would have to use a stripped-down desktop like XFCE, but the Cinnamon desktop ran well on the 32 bit system.

Until now, my advice has been to avoid 32 bit systems altogether — that such systems were below my junk pile threshold. The strong performance of Linux Mint 18.3 (32 bit) with a full Cinnamon desktop on such a low end system should change people’s expectations as to what is possible with a low-end system.

My friend is now able to stream media files from network file shares on the Linux server to stream media files via using VLC on iPad and Apple TV.

Streaming or downloading video files from a home network server to an iPad using VLC

A friend suggested that I write a blog post about about streaming video files from a home network to an iPad using VLC. There are 2 ways of consuming video on the iPad using VLC: by streaming files from a network share, or by using its built-in web server to receive files sent over a network.

If you are on the same local network as the network share, just stream the files. If you would like the file uploaded to the VLC data area of the iPad’s storage, use its built-in web server to receive the files sent over a network.

Let’s start with a sample video file, stored on a network share:

Streaming files from a network share

 

Using VLC’s built-in web server to receive files sent over a network

A good checklist item before you take a long trip by plane, train, or bus: load up your iPad with video files so you can entertain yourself offline.

 

Bluetooth shower speaker

My brother just gave me an advance birthday present, the Vic Tsing Bluetooth Shower Speaker.

The name says it all, here are some pictures:

On weekdays, my morning starts really early and i like to listen to the radio for traffic and weather while in the shower, or while shaving. However I can’t really hear the sound from the shower, and I do not like the idea of exposing my ipad to humidity.

So this devices should work out really well, the plan is to start a radio stream on the ipad, then send it to the speaker via bluetooth, from another room.

 

Followup: using VLC on the Apple TV to play media files stored on a local server

Now that VLC allows Apple TV to play stored media files, Apple TV is now a “twofer” that can replace either a Roku for streaming or Kodi for the playback of media files. As a bonus, Apple TV permits Apple-specific things like Airplay and access to iTunes purchases.

Apple TV remote control

The VLC developers did a good job of adapting the VLC interface and options to the “ten foot interface” paradigm with a remote control. Before we go any further, let’s talk about the Apple TV 4th generation’s remote control: it relies on a touchpad area at the top of the remote control that allows for gestures and swiping with your fingers, and its touchpad surface is clickable like a mouse. This is useful for “scrubbing” which is a technical term for moving the slidey thing to different parts of the media file.

File listing limitations

There is only one style available for the presentation of media files, as a set of rectangles, some with cover art, showing file names such as “show 1080p S01E11…mkv” with the title shortened to fit. Depending on how a file is named, this can cut off important information, such as the episode number.

Subtitles shown by default

If subtitles exist within a media file or externally as a subtitles file in the same directory, VLC will always show the subtitles by default. This can be annoying. In order to play a file with subtitles disabled, tap lightly on the touchpad to show the progress bar, then swipe down to show the subtitle menu while video keeps playing.

Subtitle download feature [Update: 20180816 subtitle download fixed at some point since this post]

The VLC “Track Selection” menu has an option to download subtitles for video files from an Internet service.

A pause bug has been fixed.

[Update: 2018/04/07 VLC on Apple TV has been updated and a bug in the pause/resume feature has now been fixed.] I am now able to recommend VLC on Apple TV as a replacement for Kodi as a media player for video and audio files stored on a local network file server.

Update 2018/03/27: You may find the following post of interest: “Streaming or downloading video files from a home network server to an iPad using VLC

Using VLC to play media files stored on a local file server

VLC is free software that is able to play most audio or video files, and can access those files from a local file server on a network.

I’ve used VLC for a long time, first on Windows and Linux laptops, then on my iPad, on my Android phone, and most recently, as an app on the Apple TV media player.

When I use VLC on my iPad, I either copy the file to VLC’s data area using its own built-in web server, or I access the content by connecting to a share on a local file server.  The server does not technically have to be local: I was able to mount a drive over a vpn connection from a hotel room while on vacation, but in practical terms, the server should be local, that is, on the same local Ethernet or wifi network as the device running VLC to play back its content.

I was able to run VLC on a laptop, and browse and play video files stored on a local file server, while using my Android phone as a remote control using a vlc remote control app.

I have just received an advance birthday present – a new Apple TV 4th generation media player (1080p 32GB). The Apple TV media player has the ability to load apps from the App Store, including VLC. (The Apple TV device will probably get its own blog post soon.)

I was pleasantly surprised that the VLC app on the Apple TV allowed me to browse and stream video and audio files stored on a Samba share (Windows-style network drive) on my home Linux server.

Update 2018/03/27: You may be interested in this post: “Followup: using VLC on the Apple TV to play media files stored on a local server,”

and this post: “Streaming or downloading video files from a home network server to an iPad using VLC

Creating a VOIP PBX telephone server with Asterisk and FreePBX

One of my current projects is the configuration of a new telephone server running Asterisk and FreePBX.

The copper landline telephones of our past have been mostly replaced by cell phones, and to a lesser extent, Voice over IP (VOIP) technology, which uses Session Initiation Protocol to connect desk telephone to a server running the Asterisk PBX software, whether it be local or external. Consumers typically order 1 or 2 VOIP “landlines,” but business offices still have a large number of desk telephones still in use.

I come to Asterisk VOIP from the the perspective of an old web hosting guy. So to me, Asterisk for telephone servers is analogous to an Apache web server for web pages, or to a qmail/vpopmail toaster for email.

There are several subsystems that work together to create a telephone server:

  • The server’s operating system, typically Linux for a VOIP server.
  • The Asterisk VOIP server and associated plugins.
  • The FreePBX web interface program.
  • An external “trunk” that completes telephone calls at a service provider over the Internet.
  • A set of “routes” that determine how calls are directed between local telephones, or to one or more external termination providers based on least-cost routing.
  • A set of extensions, which include extension numbers, passwords, voicemail boxes, and rules on things like call forwarding.
  • A set of Inbound Voice Routing (IVR) rules that create voicemail menu choices by touchtone.
  • A set of recordings used by the mailboxes and IVRs.

I have the luxury of having an existing system to which I can refer. The existing system uses CentOS, Asterisk, and Elastix HTML GUI.

Although the original server was deployed 9 years ago, the desk phones in the office have all been replaced recently with Cisco SP504G phones.

After surveying options in the marketplace, it was clear that this private little PBX server with 20 clients was only costing C$50/mo. in recurring telecom, vs C$450 for an outsourced solution, based on a few quotes from vendors. So a new build would have to take place.

There are several ways to set up, including virtual appliance images and several installation ISOs that can create a pre-packaged server with much of the configuration work pre-done.

A package called the “FreePBX Distro” is actually a re-packaging of CentOS 7, with Asterisk, plugins, and FreePBX GUI all automatically installed.

There is still a significant amount of work to do, but so far I have been able to configure a “backhaul” connection uses IAX2 between the server and a service provider that will terminate (complete) calls to the outside world. I was able to connect a Cisco SP504G desk phone to make a SIP connection to an extension account on the telephone server, and I was able to make a phone call using that desk telephone to a cell phone answered by a colleague.

More work ahead, especially in terms of the creation of IVR rules and recordings. I plan to test the server with a test phone number, then when it is ready, switch over the main number and all of the desktop phones over a weekend.

Even in an age where office workers use their cell phones for most calls, an Asterisk telephone server can allow for the forwarding of calls based on a touch tone menu to an extension or department that can forward to an outside telephone line.

Reformat an old computer with Linux to function as a home server

If you have an older Windows PC (minimum 64bit with at least 2GB RAM), you can reformat it with Linux to function as a home server.

This is only an overview

This post is intended to provide an overview of what is possible. Over time, I will be posting detailed information on how to implement each of these steps. For detailed steps on how to install OpenVPN server software, see my blog post on the subject.

A home server running Linux can perform several functions:

File server

A home Linux server can be setup to run file sharing using a free program called Samba, which makes the Linux server act as a Windows-style file share, accessible via Windows or MacOS, and of course, Linux desktops. You can stream movies stored on your home server to your iPad over wifi using VLC media player, creating your own private Netflix.

VPN server

With a port forwarded on the router to point to the home server, a free program called OpenVPN can be installed and set up to provide remote secure access to the home network. For example, if you forgot a document on one of the computers in your home, you could connect via the VPN to your home server, then become part of your home network from a remote location, able to browse files and connect to desktops within the home network. There are OpenVPN client applications available for Windows, MacOS, Linux, Android, and iOS.

LAMP web server for testing, programming

You can configure a home web server to host Linux/Apache/MySQL/PHP (LAMP) web pages, allowing you to play with the same technology used by large web hosting operations. You can learn a great deal by installing a server and configuring each of its services. This learning experience will give you insights and make you a better administrator of the productized services you manage via web hosting and VPS providers.

A home LAMP server can be used for development of new websites and web-based programs, then deployed on a VPS or shared web host on a web hosting provider for production use with the public.

You can make the server visible to the public Internet by forwarding a port on your router. You can assign a semi-permanent web address to your server by using a service like no-ip.com.

Nextcloud image management application

Nextcloud is a free image management application that runs as a LAMP web site. Nextcloud can take the place of Google Images, or Apple’s iCloud storage: at least for the management of image and media files. By running your own image management application on your own home server, you maintain your privacy, while making files available for computers within your home network and from outside, via the Internet. Nextcloud client apps are available for Android and iOS.