My parents gave me an Acer Aspire One netbook over five years ago, and it was a nifty little machine for taking notes in graduate school before the ascendance of ubiquitous touchscreen tablets. I still use it as a quick terminal machine when I’m feeling masochistic, and here’s how I’ve extended the shelf life on some rather humble hardware.
The netbook originally shipped with Windows XP, but there is that old joke that rings true, especially when I got the computer in 2009, “How do you get better performance out of Windows? Install Linux.” I used a Trusty Tahr iso on a USB drive to wipe out Windows and install Ubuntu.
Boot into text mode
More often than not, I was using the Linux terminal on the netbook. Instead of having to wait for the Unity desktop environment to load every time, I followed this guide to change around the grub.conf file and boot directly into text-only mode. If I need to use a web browser or e-mail client, I can fire up Unity with the command
sudo service lightdm start . When I need to switch back to text mode, I can use Ctrl+Alt and a function key to switch between virtual consoles.
Make an alias to check on battery life
For my last step, I wanted to know how much battery life I had remaining, since terminals typically don’t have an indicator for that. I used the guidance from this AskUbuntu answer to make a quick
battery command to tell me what I want to know.
First, I used
upower -e to find out what my battery address was.
[jweis@netbook ~]$upower -e
Looks like it’s that BAT1 line.
upower -i gives the following results:
[jweis@netbook ~]$upower -i /org/freedesktop/UPower/devices/battery_BAT1
power supply: yes
updated: Sat 13 Jun 2015 10:55:22 AM EDT (7 seconds ago)
has history: yes
has statistics: yes
energy: 57.4758 Wh
energy-empty: 0 Wh
energy-full: 63.5919 Wh
energy-full-design: 73.26 Wh
energy-rate: 8.8356 W
voltage: 11.986 V
time to empty: 6.5 hours
1434639288 90.000 discharging
1434639287 0.000 unknown
1434639322 8.836 discharging
1434639292 8.902 discharging
1434639288 8.625 discharging
1434639287 0.000 unknown
That doesn’t fit too well on an 8.9 inch screen. With a little
grep filtration, we can get the most pertinent information.
[jweis@netbook ~]$upower -i /org/freedesktop/UPower/devices/battery_BAT1| grep -E "state|to\ (full|empty)|percentage"
time to empty: 5.8 hours
Finally, I made an alias to make that long, piped command into the simple word “battery”.
cat >> ~/.bash_aliases
alias battery='upower -i /org/freedesktop/UPower/devices/battery_BAT1| grep -E "state|to\ (full|empty)|percentage"'
I appended the command to the
.bash_aliases file, then made sure the
.bashrc file loaded up the alias. Not a bad way to keep an old computer running.