Category Archives: General

Termux – Custom Prompt

Termux is a terminal emulator and Linux environment for Android. I wanted to customise my prompt in the same way that I have done on my desktop/laptop machines. Ordinarily I would have a .bashrc in my home directory where I would make the changes to the prompt (PS1). However Termux doesn't recognise this.

I found a reference to configuring this: http://blog.ataboydesign.com/2015/12/01/termux-is-the-one-for-android/

Following this method the changes to PS1 are made in "/data/data/com.termux/files/usr/etc/bash.bashrc". I had been successfully using this method for a while with no ill effects. That was until today when I realised an update to Termux had overwritten the changes. Not what I wanted.

So after some searching I have found a solution that should survive future updates. In your Termux home directory save the following as ".profile". This will be run when Termux is started and make Termux look for a ".bashrc" file in the home directory.

# .profile
if [ -n "BASH_VERSION" ]; then
  # Echo msg to indicate file is run - can be removed later
  echo "Profile load.bashrc"
  # include .bashrc if it exists
  if [ -f "$HOME/.bashrc" ]; then
  . "$HOME/.bashrc"
  fi
fi

Create and edit ".bashrc" with any custom options. Exit and restart Termux and your custom configuration should be loaded.

Aims for 2014

Time for a look back at what I intended to do last year.

  • Read an ebook on my Kindle Paper-white. - I have managed to read several and it's in regular use.
  • Contribute to some open source projects. - Failed
  • Continue to develop my wireless sensor system. - Mostly failed, a little progress made but not much.
  • Buy a new soldering iron/station. - I have an ERSA Icon Nano
  • Decorate and carpet my lounge. - Success - It now looks lived in.Still needs curtains.
  • Document more of my projects on this website. - Mostly failed, a few notes were uploaded but not much else.
  • Use my Raspberry Pi for something interesting. - Barely looked at it.
  • Clear clutter out of my garage. - Cleared once then got full again.
  • Finish networking between lounge and bedroom. - Completed as part of decorating.
  • Write an android application for my tablet or phone. - I wrote a calculator script for use at work but it's in html rather than an app.

So 2013 was mixed, some things achieved some not.
Time to see if I can complete some of last years goals in 2014.

  • Contribute to some open source projects.
  • Put more time into electronics projects (Raspberry Pi/Wireless Sensor System).
  • Get curtains for lounge.
  • Clear out Garage (again).
  • Write an android application for my tablet/phone
  • Pay off student loan.
  • Carpet master bedroom.
  • Build a Gaming PC and/or Steam Box
  • Repave Back Yard
  • Use a Linux desktop environment other than Gnome 3 for at least a month

Another to do list, but as before it will be a good year if I can cross a few of them off.

Bedroom Temperature

Now that the winter months are upon us getting out of bed in the morning has become more of a chore. The difference in room/duvet temperature is difficult to overcome. It would appear that a room temperature of 18-22 C is recommended for a good nights sleep. I might have a go at putting it to the test.

Current room temperature this evening is 17.37 C and it is cool but not uncomfortable. I will try a small oil filled radiator overnight and see if it maintains a suitable environment. It may cost more to maintain the temperature but I may be rewarded with better sleep. I'm still going to have my socks on in bed just in case.

PS3 Media Server + Bravia 22EX553

Due to the decline in the picture quality from my old 14" Goodmans CRT TV I recently purchased a replacement. The Sony Bravia 22EX553 is a nice 22" 720P set with a Freeview HD tuner. It's only a set for the bedroom so extra features were not a high priority. Having said that I decided to make use of the features it does have, in my case DLNA video streaming from the PS3 Media Server software running on my PC.

I will skip the setting up of the network/firewall as this is specific to me. The problem I experienced was with the transcoding settings when attempting to play video. I was able to get the TV to see the server and browse the video content. I was able to select it and begin playback, all I got was a blank screen. PS3 Media Server was transcoding but nothing was getting to the TV. I solved this when I found a setting for "Default renderer when automatic detection fails" although the TV was seen correctly by the server as "Sony Bravia EX".
Changing "Default renderer when automatic detection fails" from "Unknown renderer" to "Sony Bravia EX" and saving the setting solved the problem. I can now select and playback my videos without any problems.

Facebook Is Shit

Some people may not understand my dislike of Facebook as a company, today however it is Facebook as a service that is the problem. I don't normally use the popular social networking website due to the privacy policy, the force feeding of advertising and the user profiling. I maintain an account as a just in case option, I am not an active user.

This week I have needed to view a group message on the service regarding an upcoming event. I was hoping for a quick hop on to view the details and then log off again. What I was confronted with was a broken and unusable mess. Attempting to click to view a message greyed out my screen and did nothing. Ok, I am a Linux user using Firefox and the OpenJDK Java runtime, maybe it's my system which is the problem. Windows 7 with Internet Explorer 32&64bit with the official Java runtime and Firefox still presented me with the same problems.

I gave up in the end and had somebody else send me what I needed.

In future if anybody needs to communicate event details to me please just email it.