Sunday, 13 April 2014

Firefox Aurora & Chrome Dev for Linux Mint : Preview upcoming features



I have been wanting to have the most up to date browsers for Linux Mint as its great to be able to see the cutting edge features before they are fully deployed.

This post shows how you can quickly setup Firefox Aurora and Chrome Dev builds on Linux Mint (will also work on Ubuntu as well).

Note : you cannot also run the Stable versions of Firefox & Chrome and the same time so they will be replaced.

Firefox Aurora

First update the repository from Mozilla to Aurora  :

$ sudo add-apt-repository ppa:ubuntu-mozilla-daily/firefox-aurora

Then update the repositories and install Firefox :

$ sudo apt-get update
$ sudo apt-get install firefox


Restart Firefox and you will now have the Aurora version. The Sotware Manager also recognized the change and updated to Aurora. All the bookmarks, settings etc will be the same as the stable Firefox version.

Chrome Dev Channel

The slight difference with Chrome is that you need to remove the installed package. First go to the Chrome Release Channels and download the Dev Channel unstable build for you OS architecture.

Next remove the current Chrome stable build :

$ sudo dpkg -r google-chrome-stable

Install the downloaded build :

$ sudo dpkg -i google-chrome-unstable_current_amd64.deb

Startup Chrome and enjoy being on the Dev channel builds!

Setup latest NVIDIA Drivers for Ubuntu or Linux Mint


  • If you need to install NVIDIA Driver's on either Ubuntu or Linux Mint the following three commands will update your system with the latest available drivers

$ sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update
$ sudo apt-get install nvidia-current nvidia-settings

  • Reboot your system and the drivers should be applied
  • For more detailed configuration open the 'NVIDIA X Server Settings Applet'

Paint Format : Google Doc's most useful time saving tool

After moving to only using Google Doc's for content creation one of the few but vital things I found to be lacking was the support for applying the same format to multiple sections at a time in a document.

After some searching I found the solution was the Paint format icon :


To be honest I had never really noticed this icon before and had presumed it was related to images. In fact this turns out to be the most useful and underrated Google doc feature.

Example of  Paint Format usage

A typical use case is you have a document with lots of text in it but some of the text in various places requires to be different. For example below I would like every line with a command starting # to be 'Courier New' with Font size of 10 :



Its very time consuming (especially in very large documents) to go to each line individually and select 'Courier New' with Font size of 10 each time.

Fast Track Process - Single Change
  • Define the first line as you would like e.g. 'Courier New' with Font size of 10
  • Press the 'Paint format' icon once and it will be grey


  • Use the mouse to highlight the full line you want to be the same
  • The line will now automatically change to 'Courier New' with Font size of 10





 Fast Track Process - Multiple Changes

  • In the above example the change only occurs for one selection. 
  • In large doc's we need to be able to apply the same format for many lines
  • Press the 'Paint format' icon twice and it will be grey
  • Every line you now highlight will change  to the new format
  • Disable by a single click to the 'Paint format' icon




Crop Images easily in Linux using GIMP

Its great to have a quick but powerful tool to be able to crop images. On Linux GIMP (GNU Image Manipulation Program) is a powerful tool but potentially not immediately obvious way to crop images. This post outlines how you can quickly crop your images on Linux Mint or Ubuntu.

  • GIMP should already be installed but you can quickly check from the terminal :
$ sudo apt-get install gimp
  • Browse to the image, right click and select 'Open With -> GIMP Image Editor'



  • The picture will open in the main window and a second 'Toolbox' window to the left will also appear (as highlighted below)


  • If the Toolbox does not appear from the main GIMP window select 'Windows -> New Toolbox'
  • On the Toolbox select the 'Crop Tool' icon as shown  below or press 'Shift + C'


  • Select the area you want to keep then choose a corner of this box e.g. as shown below with the arrow


  • By selecting the corner box this crops the picture 




  • The default save format is GIMP XCF. To save as another format e.g. jpeg select 'File -> Export' and select the relevant format you want.

Capture Screenshots using terminal or script with Shutter

For screenshots my favorite Linux tool is 'Shutter' which has lots of features. It can be useful to capture a screenshot using the terminal or a script. This post details how you can quickly use it on Linux Mint or Ubuntu.

  • To install shutter
$ sudo apt-get -y install shutter
  • Also useful to install (details at end of post)
$ sudo apt-get -y install gnome-web-photo libnet-dbus-glib-perl libimage-exif-perl libimage-exiftool-perl
  • Capture the full screen :
$ shutter -e -f -o FullScreen.png
  • Capture active window :
$ shutter -e -a -o ActiveWindow.png

Syntax

-a : Capture the current active window
-e : Exit after the first capture has been made
-f : Capture the entire screen 
-o : Filename to save the screenshot

Note : You can save to jpeg, png, gif and bmp format

  • Using a sleep command with shutter enables you to setup the capture as required :

$ sleep 5 && shutter -e -f -o FullScreen.png

  • Then open the file e.g. my workspace 



  • A simple bash script is


  • This example will create a file called 'FullScreen.png' after 5 seconds under the directory '~/Pictures/screenshots/' 
$ CaptureFullScreen.sh FullScreen

Some Useful Things

  • You can add the script under the a bin directory in your home folder i.e. mkdir ~/bin/
  • Add your bin directory (insert your username for <username>) to your PATH within ~/.bashrc
Syntax 

export PATH=/home/<username>/bin:$PATH

Example

export PATH=/home/cwishaw/bin:$PATH
  • Give the file executable privileges
$ chmod +x CaptureFullScreen.sh
  • Using a fast access top down terminal like Guake is great to quickly start scripts with F12
  • Further details can be found with 'man shutter'

Additional Package details

  • gnome-web-photo: Create snapshot images and print web pages from the command line
  • libnet-dbus-glib-perl - extension for the DBus GLib bindings
  • libimage-exiftool-perl - Library and program to read and write meta information in multimedia files
  • libimage-exif-perl - Perl module to extract EXIF information from image files

Useful Android Network Console Commands

When dealing with network connectivity issues on computers the quickest and usually most productive troubleshooting tools involve opening a console and typing a few key but vital commands.

In the same way for Android I have found myself asking why not follow the same tried & tested method. I have found that the same commands exist and are outlined below. With these commands you will soon locate networking issues.

Note : Your device does not required to have root (super user) access as these as standard. You will require a console or network emulator to be installed which can be found free on Google Play.

Netcfg

  • This is really useful to find out what intefaces you have and the current IP's
  • I also find this a quick way to get the MAC address instead of having to navigate through the various Settings screens
  • The following screen shows an example (I have obfuscated my MAC addresses)


Ifconfig

  • This is similar to what you would use on any Linux machine (or ipconfig on Windows)
  • The main thing of note is 'ifconfig' on its own or 'ifconfig -a' will not work you need also to specify an interface 
  • A common example would be for the WiFi interface e.g. 
$ ifconfig wlan0

What are the DNS servers defined as?

  • If internet access is not working correctly you may have DNS issues
  • To check the DNS servers use 
$ getprop net.dns1
$ getprop net.dns2

Routing Table

  • Its important for networking issues to be able to view the routing table

$ show ip route


  •  The following screen shows examples of running the last three commands


Ping

  • The simplest yet very powerful tool is available
  • First ping the local gatway e.g. 192.168.0.1 then try an IP on the Internet  e.g. 8.8.8.8 (Google's Public DNS)



Buying an Android tablet for a non tech savvy relative

When buying a new tablet for ourselves its easy to know what must have features we want. Having to decide for a relative who is not technically savvy can be daunting. This guide gives a proven method to ensure the correct tablet is purchased. Top tip is making a survey for your relative (sample given at the end)!



Screen Size

  • The main options are either 7, 8 or 10 inch screens
  • Considerations
    • How do they feel about their current mobile phone size?
    • Is a larger screen size a preference?
    • Would they use it on a table or prefer to be hand held?
    • Does it have to fit into a particular bag size e.g. hand bag?

Weight


  • The larger screens inevitably lead to more weight
  • Considerations
    • Will the tablet be carried a lot e.g. for commuting?
    • If the tablet is to be used for reading is the preference to be able to hold the tablet like a book?

Cameras


  • Not all tablets have front and rear cameras
  • Considerations
    • Will the tablet be used for video calls (front camera required)?
    • Is there a need for taking good quality photos or apps that require back camera e.g. scanning bar codes for shopping apps?

E-Reader


  • One of the main functions of a tablet can be using it as an e-reader e.g. with Kindle or Kobo
  • Considerations
    • How often will the tablet be used as an e-reader?
    • Would the user prefer a large easy to ready screen, or a lighter, smaller tablet?

TV Connectivity


  • Connecting the tablet to TV can be great for sharing or playing content. Using an HDMI connection is easiest but there are adaptors available for tablets without HDMI connection e.g. USB and 30 pin to HDMI are available
  • Considerations
    • Does your current TV have any HDMI connections?
    • Are there sufficient available HDMI connections on the TV or will an HDMI splitter be needed?
    • Is there a location the tablet can be placed (e.g. a shelf) to connect to the TV?

Video Calls


  • One of the most common reason for buying a relative a tablet is for video calling using Skype or Google Hangouts so a forward facing camera would be required
  • Considerations
    • Is the quality of the video playback and sound good enough for video calls?
    • Does a particular application require to be supported e.g. Skype. Worth checking on reviews to see if other tablet owners have successfully used these apps.

3G or WiFi only


  • Wifi only is significantly cheaper. 
  • Considerations
    • Do they need 3G? 3G models also tend to weigh slightly more than their wifi only counterparts

GPS


  • If the tablet is to be used for maps outside the home GPS may be useful.
  • Considerations
    • Some GPS on tablets have "Assisted GPS" which relies on a data connection

Clumsy or Careful Owner


  • How rugged does this tablet need to be? 
  • Considerations
    • Will it be bumped, dropped or roll around in a bag? 
    • Models with Gorilla glass are tougher and less likely to be scratched but if you suspect rough treatment a good padded case and screen protectors are a must. 
    • Cheaper models may not have so good build quality. 
    • If possible feel them in store for flex and check out some reviews.

App Usage


  • What type of app's will your relative be interested in e.g. news, games, YouTube, music.
  • Considerations
    • Does the OS version matter. Are they familiar with a version of Android already? 
    • App compatibility with certain versions of Android.
    • Certain types of apps may display better on a larger screen and some apps were developed for mobile so look odd on a big screen.

Accessories


  • Accessories are important to most tablet owners
  • The person receiving the tablet might like to immediately accessory their latest tech gadgets with cases, screen protectors or speakers.
  • Considerations
    • While you might like to buy the latest model with great features for your own use bear in mind it might not be possible to buy accessories right away for new release models. 
    • The person receiving the tablet might like to immediately accessory their latest tech gadgets with cases, screen protectors or speakers.
    • Does the tablet have USB connections or bluetooth?
    • Do they want to use USB accessories or bluetooth keyboards and headphones? 

Getting the correct answers...the easy way!

  •  As there are so may things to consider speaking with a relative it can overwhelm them 
  • I would recommend taking 15 minutes to create a customized survey for your relative using something like SurveyMonkey which has a free service
  • With the survey approach the relative can think about what they really want on their own time & give you all the answers!

Sample Survey


1. Do you want to read e books?

Yes
No

Not sure

2. What size screen would you prefer?

7 inch
8 inch
10 inch
Other (please specify)


3. Do you want to use the tablet to take photos?

Yes
No
Not sure


4. Do you want to connect to tv via HDMI?

Yes
No
What is HDMI?


5. Do you want to make VoIP calls on tablet i.e. Skype or Google hangouts

Yes
No
Not sure


6. Will you want to use tablet for sudoku and crossword apps?  

Yes
No
Maybe


7. Is device likely to be used outside home?

Yes
No
Maybe