Saturday, 25 February 2012

Changing the primary monitor in Linux Mint (and other distributions)


*** Update: To persist this change between machine restarts, see this post ***


1) Save this script as monitor-switcher.sh:

 #!/bin/bash  
 # Author: Andrew Martin  
 # Credit: http://ubuntuforums.org/showthread.php?t=1309247  
 echo "Enter the primary display from the following:"               # prompt for the display  
 xrandr --prop | grep "[^dis]connected" | cut --delimiter=" " -f1     # query connected monitors  
 read choice                                        # read the users's choice of monitor  
 xrandr --output $choice --primary                         # set the primary monitor  

2) Make executable with:
 chmod +x monitor-switcher.sh  

3) Execute by typing:

 ./monitor-switcher.sh  


4) Enter the name of the monitor you want to be the primary monitor.


All credit to the article here.

Wednesday, 22 February 2012

Installing the ADT Plugin for Eclipse under Linux Mint

If you get the following error when trying to install the ADT plugin for Eclipse:


Cannot complete the install because one or more required items could not be found.

Software being installed: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534)
Missing requirement: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found



You need to install linux-tools first. Go to Help -> Install New Software, and enter http://download.eclipse.org/technology/linuxtools/update into the Work with box. Install all of the components that appear, then restart Eclipse when prompted. Now go back to Help -> Install New Software, and enter
https://dl-ssl.google.com/android/eclipse/ into the Work with box. Go through the installation procedure again and the ADT Plugin will install successfully.

Thursday, 9 February 2012

Cloning a Laptop Drive

I recently had cause to replace a laptop hard drive, cloning the contents to avoid having to reinstall all the software on it. Here is a list of the tools used and steps taken:

  1. Clone drive to external USB hard disk using EaseUS® Todo Backup Free 4.0*
  2. Remove old hard drive from laptop and replace with new one.
  3. Clone old drive image from USB to new laptop hard drive using  EaseUS® Todo Backup Free 4.0 (bootable disk).
  4. Boot from Windows install CD and run system repair to fix master boot record (lost as it can't be sector cloned to USB hard drives).
  5. Boot from new hard drive into Windows.
  6. Run chkdsk /r to verify and repair new disk and file system.



* I actually used CloneZilla for this step, as I hadn't yet discovered EaseUS Todo Backup. Image based clones were failing due to the old hard drive physically failing, so a sector-sector clone was completed. CloneZilla could not restore this sector-sector image back from the intermediate drive as it wouldn't clone a 1TB drive back to a 500GB drive (I couldn't find a way to sector clone just the portioned areas of the external drive). EaseUS Todo Backup happily restored only the required partitions back to the new 500GB drive.

Wednesday, 8 February 2012