• Subcribe to Our RSS Feed

Laptop as a Linux Server and HTPC

Dec 7, 2015   //   by wvanbusk   //   Technology  //  Comments Off on Laptop as a Linux Server and HTPC

A laptop can be an ideal home network server.  The advantage of a laptop is that it is quiet, has built in battery backup and is normally designed to run down to a low power state when not in use, so it is efficient.  In this case the laptop is not also for computing in a lap, rather it is to sit on a shelf and serve up web sites, media and files on the LAN. In this state of being, the laptop can be administered remotely via web panels or remote desktop.  However, given a good network connection, adequate storage, and other desirable performance achievements, a laptop could be both a primary computer as well as a home server. But dual usage can reduce mobility and availability.

In this post I will describe a particular case for a home server mounted behind a large screen television also acting in the role of media server and managed by other computers on the home network. The OS is the Ubuntu distribution called Mate with the full windowed environment to be displayed on the laptop display, the TV and remote desktop program VNC. The laptop is a Asus x551ma with external sata raid with two desktop drives.

power lid optionsThe laptop server can be left opened or closed. Laptops have a lid switch that normally trigger wake/sleep or shutdown/startup, but may be configured to be ignored or to merely turn on/off the screen backlight. In this instance the backlight is off when the lid is closed, which is a common power option in both windows and Linux. This allows the laptop to sit in a wall rack with the system bottom facing the wall so that it takes up little depth behind a 55″ TV and can be taken out of the rack and used as console access to the server as needed. There is some difficulty using the laptop out of the rack due to the length of the power, hdmi, network and sata cables and the relative confined space behind the TV mounted on an articulating arm. Time is not well spent standing with the laptop in one hand and controlling the keyboard and trackpad with the other.

An issue that came up after implementation were OS updates or upgrades requiring a reboot. When rebooting with the lid closed, the system went into sleep mode after restart rather than into the active power on state. With some digging I found a solution.  To disable entering the sleep mode during reboot with the lid closed you may edit the /etc/systemd/logind.conf file to enable: HandleLidSwitch=ignore. This seemed to work for Mate 1.10.2 Ubuntu 15.10 Wily Werewolf on Dec 6, 2015 unless the issue was fixed in Wily, since logind was changed the same day after a Vivid update reboot put the system to sleep and led to the edit. After the freshly installed Wily reboot the system did not enter sleep with the lid closed.