The Midlife Geek

Ramblings of a middle aged engineer, runner and open source enthusiast

Category: Linux (page 1 of 3)

Simple Arch Linux Installation

This is a quick post to remind myself of the stuff I do when re-installing Arch. Continue reading

Flashing Nexus 9 factory image

This tablet was super fast when I got it but now it lags and drives me nuts. I’d seen someone post on Reddit that flashing the factory image helped so I gave it a go.

Factory images are available here along with good, clear instructions. One caveat, Arch needs super user for fastboot otherwise you get “< Waiting for device >”. For the same reason run flash-all.sh with sudo too.

As to whether or not it helped, it is hard to say but I feel it has. How do you measure something that is entirely subjective?

Edit. Its been a few days now and it is faster. Much faster and without lag. I’m unclear why though. I’m not completely familiar with Android’s architecture but wonder if it’s a combination of multiple updates being applied (this was I think Android 5.0 when bought) and accumulated futz.

[Insert project title here]

An Android fitness tracker application. Feedback from the preparation forum was positive, there is enough scope to expand or contract the project as needed. Importantly, it is “substantially within the sphere of information technology”.

Taking approaches from IT Systems Planning for Success (TM353) and an Agile approach from Software Engineering (TM354) meets the requirements. There is a substantial part of the application that needs synchronise with a server, utilising another level 3 module Developing Concurrent Distributed Systems (M362).

What I haven’t decided is the title!

Install Android Studio on Ubuntu

Android Studio is a great development environment and is available on Ubuntu. I’m using Ubuntu Mate 16.10 “Yakkety Yak”.
 
First install a Java Development Kit (JDK). OpenJDK is pre-installed or you can use Oracle Java 8 (there is a great guide here). I don’t wish to argue over your choice – I need to use the latter (my tutor does). Download Android Studio here. – I extracted it to /opt; ran the installer; and used my home folder for the SDK. If you are using 64 bit, you need the 32 bit GNU standard C++ library:
sudo apt install lib32stdc++6

For Arch you need to enable “multilib” repository:

<code><span class="pln">sudo pacman </span><span class="pun">-</span><span class="typ">Syu</span> <span class="pun">&amp;&amp;</span><span class="pln"> sudo pacman </span><span class="pun">-</span><span class="pln">S multilib</span><span class="pun">/</span><span class="pln">lib32</span><span class="pun">-</span><span class="pln">libstdc</span><span class="pun">++</span><span class="lit">5</span><span class="pln"> multilib</span><span class="pun">/</span><span class="pln">lib32</span><span class="pun">-</span><span class="pln">zlib</span></code>

Virtualisation support is interesting. I read two tutorial and Google’s guide. The former makes reference to command line options not in version 2.2.2. These posts suggest this is a bug, but it may now be default behaviour. First enable that virtualisation in BIOS (check if enabled using “kvm-ok”).

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
sudo adduser dougie kvm
sudo adduser dougie libvirtd

This results in an error.
screenshot-at-2016-11-25-21-16-19

Using the system version of libstdc++.so.6 works. Add the following to /etc/environment:

ANDROID_EMULATOR_USE_SYSTEM_LIBS=1

It seems snappy but with no feedback I’m unsure if accelerated.

So I now have a development environment set up for my project. The next hurdle is to choose a title. So far it is a: development project; distributed application; and uses Android.

TM470

After a false start when The Open University opened the TM470 module site, we got back on track on Wednesday. Although the module doesn’t start until February, I need to decide a project to assign a tutor.
 
I read the study guide and project choice pages. Self development is key, by being a reflective practitioner.
 
My project can be research, development or evaluation. It should develop knowledge acquired at level three, where I took:
  • Developing Concurrent Distributed Systems (M362),
  • IT Systems Planning for Success (TM353) and
  • Software Engineering (TM354).
I also want to use:
  • Algorithms Data Structures and Computability (M269) as I enjoyed the subject and
  • Web Technologies (TT284) as I enjoyed mobile application development and gained a distinction.
Developing a mobile application with a software engineering approach makes sense. There are techniques and approaches from TM353 that help. For TT284 I used MIT’s AppInventor but would like to use Google’s Android Studio. I worked through the tutorials and it offers a comprehensive suite of tools and runs on Ubuntu.
 
The trick is to be find an achievable solution to a defined problem. I have ideas but have lots of research ahead of me. I am writing down ideas in a notebook as I get them and aim to decide in the next few weeks.
 
Throughout I am going to blog, more for myself than anything else. I’ve noticed students reaching out for support on Twitter. While being careful about plagiarism, thought’s trigger conversations we wouldn’t otherwise have.

Assumption

Someone asked me yesterday “You’re good with computers, can you give me a copy of Photoshop?“. Aside from the fact I run Linux on most of my computers, I’m not keen on being accused of software piracy on the basis that I’m “good with computers” or any other reason. I made the mistake of asking why he needed it, he wanted to resize some pictures – so I suggested Paint.net.

His answer? “Oh no that’s free, it’s bound to be rubbish.”

Strange, I thought he wanted Photoshop free.

Best Linux comment ever

Extract from an article over at “The Art of Manliness” that gives instructions on editing hosts to block time wasting sites:

Linux
If you’re using Linux, you’re probably a geek and don’t need some guy who blogs about manliness to tell you how to edit your host file.

Linux is not a get of jail free card

I’ve been having line problems with my ISP – British Telecom. To cut a long story short we see a 75% speed drop, phone BT, jump through umpteen hoops and they reset the profile at the exchange. The fault is with the line and it’s intermittent.

That doesn’t really bother me. The customer support agent told me to use BT’s speed diagnostic tool. Now aside from why their tool would be better, its not really an option as its a poorly written Java applet that doesn’t seem to work with Firefox or Chromium in Linux. Now I dare say I could get it to work but why spend the energy? When I mentioned it to the agent, he told me BT doesn’t officially support Linux and helpfully suggested I keep a Windows laptop handy.

Are you kidding? Keep a Windows laptop handy? There are reasons why I use Linux, there are reasons people use Macs and Windows too – they chose to. What the hell has that got to do with my ISP? I have no software from them, it’s a wireless access point they provide. Do you know what operating system it runs? Linux.

Any colour will do

I hope Dustin Kirkland wont mind me re-posting this but it’s so insightful I felt I must. Poul-Henning Kamp posted this concerning Free BSD development over eleven years ago…

Bash

Two things that improve my bash productivity – stopping the cursor keys inserting characters in vim and history search in bash.

Edit ~/.vimrc or /etc/vim/vimrc (for system wide) and add turn off vi compatibility:

1
set nocompatible

The latter can be improved by editing ~/.inputrc (or /etc/inputrc for everyone). Pressing the up key scrolls through all the commands you’ve typed but by adding:

1
2
"e[A":history-search-backward
"e[B":history-search-forward

You can type the first letter or two and get the command you need, so if you typed “mysql -u root -p” last Tuesday but can’t remember the options, typing “my” and pressing the up key will find it.

« Older posts

© 2018 The Midlife Geek

Theme by Anders NorenUp ↑