Monday, October 03, 2016

Location of Android ADB in Windows

Android Debug Bridge (adb.exe) location in Windows 10


Thursday, September 29, 2016

Installing .Net 3.5 on Windows 10 offline using DVD/ISO media

Installing .Net 3.5 using the Control Panel in Windows 10 (anniversary update) can sometimes be very slow. Alternative option is to install from DVD/ISO, like:

c:\>DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:E:\sources\sxs

E: is the drive letter of DVD/ISO


Wednesday, September 28, 2016

BlackBerry Playbook Simulator 2.1 not working after installing on Ubuntu 16.04 64-bit

I was able to install BlackBerry Playbook Simulator 2.1 on Ubuntu 16.04 64-bit by installing supported libraries, see here.

Running the IDE (/opt/bbndk-2.1.0/ fails with a message as shown below.

/opt/bbndk-2.1.0/host/linux/x86/usr/bin/../..//usr/qde/eclipse/qde: error while loading shared libraries: cannot open shared object file: No such file or directory

The above message says we don't have libgtk-x11-2.0 libraries. Since the IDE was compiled as i386 we need to install the library like:

sudo apt install libgtk2.0-0:i386

Running the IDE again yields the following error message:
(qde:2418): Gtk-WARNING **: Unable to locate theme engine in module_path: "hcengine",
# A fatal error has been detected by the Java Runtime Environment:
#  SIGSEGV (0xb) at pc=0xf771179d, pid=2418, tid=4131637376
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode, sharing linux-x86 )
# Problematic frame:
# C  []
# An error report file with more information is saved as:
# /home/y/hs_err_pid2418.log
# If you would like to submit a bug report, please visit:
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
Aborted (core dumped)

What is happening here is that Momentics IDE ships with Java 1.6 runtime but it is not compatible with some of the libraries that comes with Ubuntu 16.04. To fix this install Java 1.9 runtime for i386 architecture, like:

sudo apt install default-jre:i386

The above installation will make Java runtime available in the default path which will override sourcing by the scripts. Running the IDE this time should work but with some minor warnings, like:

(qde:2418): Gtk-WARNING **: Unable to locate theme engine in module_path: "hcengine"

To clean the console message out, do:

sudo apt install gtk2-engines:i386

You should now have a working Momentics IDE!!!

Tuesday, September 27, 2016

Installing BlackBerry Playbook Simulator 2.1 fails on Ubuntu 16.04 64-bit

Tried to install BlackBerry Play Simulator 2.1 on Ubuntu 16.04 64-bit but it fails with error message below.

sudo ./installer-bbndk-2.1.0-linux-1032-201209271809-201209280007.bin

Preparing to install...Extracting the JRE from the installer archive...Unpacking the JRE...Extracting the installation resources from the installer archive...Configuring the installer for this system's environment...
Launching installer...
./installer-bbndk-2.1.0-linux-1032-201209271809-201209280007.bin: 3320: exec: /tmp/install.dir.3056/Linux/resource/jre/bin/java: not found

The installation is failing because it has dependencies to 32-bit libraries. To fix it, do:
$ sudo dpkg --add-architecture i386
$ sudo apt install libc6:i386
$ sudo ./installer-bbndk-2.1.0-linux-1032-201209271809-201209280007.bin

Installation should now complete but the IDE will not be working. Next post details how to fix it.

Follow-up post is here.

Saturday, September 24, 2016

Installing VMware Workstation Professional VMware Tools in Ubuntu 16.04

It is good practice to get the latest updates before installing VMware Tools. Open terminal and run the following:
$ sudo apt update
$ sudo apt upgrade
$ sudo reboot
If the update needs to upgrade the kernel, it is a good idea to reboot the machine before installing the tools so that we are compiling against the correct kernel.

From VMware Workstation menu, do VM | Install VMware Tools....
$ mount cdrom
$ mkdir ~/tmp
$ tar -xvzf /media/u1/VMware\ Tools/VMwareTools-9.9.5-3735633.tar.gz -C ~/tmp
$ cd ~/tmp/vmware-tools-distrib/
$ sudo ./ -d
$ eject
$ sudo reboot
u1 = is the username, replace it with your username
VMwareTools-9.9.5-3735633.tar.gz = version of VMware Tools in the ISO, change it with what's in /media/<user>/VMware Tools/.

Friday, September 23, 2016

How to determine BlackBerry PlayBook Simulator IP address

Click on user icon, a popup dialog will show up and show the IP address.

Thursday, September 22, 2016

Windows 10 Task Manager not updating

This is probably my silly mistake but it took me a while to figure out why it is not updating - it was paused!!! Did I do it? Maybe... but could be Windows just deciding to pause it. Anyway, un-pause it like as shown below.


Wednesday, September 21, 2016

tmux cheatsheet

Resizing the window of an existing session
tmux attach -d

Work in progress!!!!

How to remove floppy icon in Ubuntu 16.04 running on VMware Workstation 11

Even when the floppy hardware is removed from the VM configuration of a Ubuntu guest under VMware Workstation 11, the icon for floppy disk drive still shows up in the Launcher. To fix this  you need to disable Legacy Diskette A in the virtual BIOS of the guest. An easy way to boot to the virtual BIOS is to shutdown the VM, then select VM | Power | Power On to Firmware.
Then change Legacy Diskette A: to [Disabled], F10 to save and exit. This should reboot the machine.


Monday, September 19, 2016

What is 169.254.x.x IPv4 address?

169.254.x.x is a link-local IP address that gets assigned automatically when, generally, DHCP is not available. On Windows operating system, this is called APIPA (Automatic Private IP Addressing). RFC 3927 defines the address block for use in the link-local assignments. Note that routers are not supposed to route traffic from this address block.


BlackBerry Tablet Simulator Mouse Gestures

Mouse Gestures for BlackBerry Tablet Simulator

Show top bar (notification area)
Move mouse top middle and click
Show Browser options
Move mouse top right and click
Show applications running
Move mouse bottom middle and click
Show application home screen (aka desktop)
Move mouse bottom middle and click twice
Show on screen keyboard
Move mouse to lower left and click

Sunday, September 18, 2016

BlackBerry Tablet Simulator shows black screen

On Windows 10 Enterprise version 1511 build 10586.589 + VMware Workstation 11.1.4, powering up a BlackBerry PlayBook Simulator 2.1 shows blank/black screen. The simulator was created around September 2012, it may have worked back in the day but with latest versions of the host OS and VMware it is not working using default configuration. The link from here mentions about supported graphics card, thus say, should support OpenGL 2.0. I am using a machine that supports Open GL 4.1 and still not working.

To have a partially working simulator, change QNX boot option to 2.
You can play with the simulator but developing an application that needs EGL does not work.


Blank screen
Black screen
BlackBerry Table Simulator Not working on VMware Workstation

Thursday, September 15, 2016

Installing BlackBerry Tablet Simulator 2.1 fails with "Windows error 2 occured while loading the Java VM"

Installing BlackBerry Tablet Simulator 2.1 on Windows 10 fails with the error message as shown below.

LaunchAnywhere Error
Windows error 2 occured while loading the Java VM
To fix this install x86 version of JRE (tested with jre-8u102-windows-i586.exe). Running the installer again will still fail. Workaround is to pass command line argument to the installer, like:

BlackBerryPlayBookSimulator-Installer-2.1.0-1032-Win-201209272349 LAX_VM "C:\Program Files (x86)\Java\jre1.8.0_102\bin\java.exe" -i GUI

Run the above command on elevated prompt.

Tested on Windows 10 1511 (OS Build 10586.545)


Sunday, September 11, 2016

Add a regular user in Kali Linux

Create a new user, say timus.
# adduser timus
Add user to sudoers group. This enables the user to become root when needed, for example to install new software.
# usermod -a -G sudo timus


Install Linux headers in Kali

In Kali Linux 2016.2, Linux headers were not installed when build-essential package was installed. Linux-headers is need when installing VirtualBox guest additions. To install the headers, do:

# apt install linux-headers-$(uname -r)

This should apply to the following distribution as well:
- Debian
- Ubuntu and derivatives


Sunday, July 24, 2016

Hide an application from the taskbar

Hide an application (notepad in this case) from task bar using PowerShell


Saturday, May 07, 2016

OS X Keyboard Shortcuts

Screen capture of user defined screen
Saves the screenshot on the Desktop
Document Shortcuts
Fn+Left Arrow
Home: Scroll to the beginning of a document.

Fn+Right Arrow
End: Scroll to the end of a document.

Fn+Up Arrow
Page Up: Scroll up one page.

Fn+Down Arrow
Page Down: Scroll down one page.

mc - Midnight Commander
Quick cd (M-c)
Change directory
Search/Go to directory



Under construction.


How to view Console.WriteLine output in Xamarin Studio UI Test

To view Console.Write/Console.WriteLine output from within Xamarin Studio UI Test, do:
  1. If Unit Test pad/window is not visible, using App menu, do View | Pads | Unit Tests
  2. On a test that passed (e.g., ), select test and right click, then select Show results pad ( )

Thursday, May 05, 2016

Resize OS X El Capitan HD to full size

Got OS X El Capitan running inside VMware Fusion 8. The default drive size is around 40GB and I wanted to change it to 120GB. Disk Utility seems like the tool to do the job but is not working properly. To resize, do:

$ sudo disktuil resizeVolume / R


Sunday, April 03, 2016

The Maximum Log Size specified is not valid when changing Windows Event Viewer log size

When changing Application Windows Event Log maximum size and you are seeing the message below then it is possible that it is set by group policy (local or Active Directory).

Event Viewer
The Maximum Log Size specified is not valid. It is too large or too small. The Maximum Log Size will be set to the following:  1028 KB

This behavior can be modified allow changes via Windows Event View application. To do so open Group Policy Editor (gpedit.msc). Then navigate to Computer Configuration | Administrative Templates | Windows Components | Event Log Service | Application (for example) then change Maximum Log Size (KB) to Not configured.

Note that you need to be an administrator to make the changes.

Saturday, April 02, 2016

Running Python one liner

Running on liner Python is sometimes just fells awesome, practice with caution though. Below spits out uuid4 using Python one liner.

c:\> ipy -c "import uuid; print(uuid.uuid4())"


Disable/Enable network interface using PowerShell

Windows 10 update 1511 sometimes losses connection inside a VirtualBox(5.0.16) VM. Mostly it happens after the host machine recovers from sleep or hibernate. Workaround I have observed so far is to disable/enable the interface. This can get boring overtime, so below is the PowerShell script that I use to automate it.

Note that O is the name of my network adapter.

Enable ClearType using PowerShell

When I remote desktop to Windows machines most of the time the fonts just looks ugly. This can be improved by enabling ClearType and I do this every time I connect to a box which I do several times a day. Below is a Powershell code that enables ClearType which I shamelessly copied from StackOverflow.


Enable ClearType using Python

When I remote desktop to Windows machines most of the time the fonts just looks ugly. This can be improved by enabling ClearType and I do this every time I connect to a box which I do several times a day. Below is a Python code that enables ClearType which I shamelessly copied from StackOverflow.


Thursday, March 31, 2016

OpenSUSE Tumbleweed does not boot to GUI after upgrade

OpenSUSE Tumbleweed kernel update as of 3/31/2016 does not boot to the UI anymore. This was observed on VirtualBox 5.0.16. Workaround is to pass iomem=relaxed to the kernel, see below for details.
  1. Reboot the machine.
  2. During the boot-up press e at the screen below.
  3. Look for the line with linux and add iomem=relaxed

Install minimal GNOME shell on Debian Stretch

#: apt install gdm3 xserver-xorg-legacy
This will install just the GNOME shell, pretty lean and mean (for GNOME standard :)


  • This is a pre-release of Debian Strech
  • Need to add xserver-xorg-legacy otherwise it will not work, might be related to this bug.

Howto: Installing pywin32 on Python 3.5.1 64-bit

Installing Python for Windows Extensions on Python 3.5.1 64-bit
C:\>pip install pypiwin32

If you are getting the following error message in importing win32gui install VC++ 2010 redistributable.

>>> import win32gui
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.


Sunday, March 27, 2016

Remove VirtualBox guest additions on Debian

# apt-get purge virtualbox*


Install minimalist GUI on top of Debian Stretch netinstall

LXDE is pretty lightweight desktop environment. There are other lighter weight DEs out there mind you but for most practical purposes LXDE serves most of the modern x86 machines.

To install minimalist (just the core) LXDE on Debian Strech, do:

#: apt-get install lxde-core lightdm


  • This will also install a lighter version desktop manager LightDM
  • This is a pre-release version, it may change without notice.

VI Editor common operations

My commonly used vi shortcut keys:

File operations
:qQuit VIThis will exit VI editor
:q!Force quitThis will exit VI editor even if buffers are dirty
:wSave current bufferSave currently active buffer
:bdKill current buffer
:set nowrapDon't wrap text
:set numberShow line number
:set nuShow line number (short hand)
Text Operations
vStart Visual Mode(for copying)
yYank/copy selected text
yyCopy line
2yCopy 2 lines from the cursor
pPaste _after_ the current line
PPaste _before_ the current line
xDelete char under the cursor
dwDelete the word under the cursorThis will also delete the space after it
3dwDelete 3 wordsThis will also delete the space after it
ddDelete lineDeletes the entire line
0Jump to beginning of line
$Jump to end of line
bMove to the beginning of the word
eMove to the end of the word (punctuation considered part of the word)
geJump to previous word ending
gEJump to previous word ending, ignore punctuation
ggStart of file
GEnd of file
21GGo to line 22
Search and Replace
/{string}{ENTER}Search for string
:%s/foo/bar/gSearch for foo and replace with bar in the current buffer
Note** run vimdiff file1 file2
]cJump to the next difference
[cJump to the previous difference
doCopy line diff from _right_ buffer to the _left_ buffer
dpCopy line diff from _left_ buffer to the _right_ buffer
Buffer operations
:bdDelete current buffer
:bnextMove to next buffer
:bpreviousMove to previous buffer

VIM Introduction and Tutorial (link)
VI Cheat Sheet (link)
VIM Tips (link)
Code Merging with VIM (link)

Allow changes to SQL Server table schema if the changes require table re-creation

Modifying an SQL Server table that requires the table to be re-created is not allowed by default using SQL Server Management Studio for good reason. For example, changing a column of type nvarchar from 10 to 20 will result with the following error:

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.

To allow schema change for the above situation using SSMS, do the following:
  1. Open SSMS (SQL Server Management Studio). I am using SSMS 2014. 
  2. For good measure, back-up the database.
  3. Navigate to Tools | Options
  4. Click on Designers.
  5. Remove the check box on Prevent saving changes that require table re-creation
  6. Click on OK
  7. Proceed with changing the table schema.
  8. Again for good measure, enable Prevent saving changes that require table re-creation to prevent accidental table schema change that might drop some information.


Saturday, March 26, 2016

How to determine Hyper-V hostname inside the guest VM

On Hyper-V virtual machine with integration services installed the host machine can be identified by reading HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters\Hostname on the guest machine itself.


Enable logging of .Net assembly binding via registry

You have a .Net application that fails to load and you are suspecting that it may have to do with assembly dependencies. On a development machine fuslogvw.exe will aid you in collecting failed assembly binding but fuslogvw.exe is not normally available on production environment. So what do you do?

Logging of assembly binding can be enabled via the Registry, to do so navigate to HKLM\Software\Microsoft\Fusion. Add the following keys with corresponding values:


You need to restart the .Net application under test for this to take effect. The log files will be saved in C:\FusionLog.


Monday, March 21, 2016

How to install Squeak 5.0 on Ubuntu 15.10 64-bit

Squeak 5.0 stable as of this writing (3/21/2016) only supports 32-bit on Linux. To get this to work on 64-bit install follow the instructions below.
  • Download Squeak 5.0 from
  • Extract to location, e.g., ~/apps/
    • Open a console
    • $: cd ~/Downloads
      $: unzip -d ~/apps/
  • Get 32-bit libraries
    • Use the Squeak built-in script to get most (not all is installed)
    • $: cd ~/apps/Squeak-5.0-All-in-One
  • This will fail with the error message below (at least on Ubuntu 15.10)
    • Fail with the following error message:
      E: Unable to locate package lib32bz2-1.0
      E: Couldn't find any package by regex 'lib32bz2-1.0'
      E: Unable to locate package libgl1-mesa-dri-lts-utopic
      E: Unable to locate package libgl1-mesa-glx-lts-utopic
  • Let us fix this by running command below:
    • $: sudo dpkg --add-architecture i386
      $: sudo apt-get update
      $: sudo apt install lib32z1
      $: sudo apt install libuuid1:i386
      $: sudo apt install libgl1-mesa-glx:i386
      $: sudo apt install libsm6:i386


View library dependencies in Linux

I was trying to get Squeak VM 5.0 running on Ubuntu 16.04 beta 1 and got the following:

could not find display driver vm-display-X11; either:
  - check that /home/timus/Downloads/Squeak-5.0-All-in-One/ exists, or
  - use the '-plugins <path>' option to tell me where it is, or
  - remove DISPLAY from your environment.
./ line 1:  8289 Aborted                 (core dumped) ./

To view library dependencies in Linux, do:
$: ldd

This should display library dependencies of vm-display-X11.

Sunday, March 20, 2016

Hyper-V enhanced session mode supported guest OS

Enhanced session mode in Hyper-V allows redirection of local devices and resources from computers running virtual machine connection. This is very convenient functionality as it allows the same level of interaction as remote desktop connection. In fact, it seems like it is a modified version of RDP from the way it works.

To use it you need to have host OS running Windows Server 2012 R2 or Windows 8.1 Enterprise or later. The guest OS has to be Windows Server 2012 R2 or Windows 8.1 Pro or later.

Saturday, March 19, 2016

PS: Download using Powershell

Download files using PowerShell
PS A:\> $wc = New-Object System.Net.WebClient
PS A:\> $url = ""
PS A:\> $output = "a:\"
PS A:\> $wc.DownloadFile($url, $output)

Saturday, February 13, 2016

Eclipse shortcut keys

This are some of the shortcut keys that I find useful while working with Eclipse.

Key Action
Ctrl+/ Comment out the current line
Ctrl+\ Uncomment the current line
Ctrl+D Delete the current line
Ctrl+M Maximize editor view
Ctrl+Alt+Arrow Up Duplicate current line, maintain caret location
Ctrl+Alt+Arrow Down Duplicate current line, move caret location down
Window Navigation
Ctrl+F7 Move to different views.
Ctrl+F6 Move to different editor windows
Alt+Shift+Q+C Focus Console View
Alt+F7 Switch between different consoles
Ctrl+O Quick Outline

Sunday, January 31, 2016

Show a temporary window in SikuliX

I can't find documentation in SikuliX to show a window or dialog and hide/close it after configured time. Since SikuliX uses Jython behind the scenes and Jython can access Java easily then showing a simple Swing window should be straightforward.

Sample code below demonstrates

Alternative solution as proposed by Raiman
Jython GUI Sample applications
Swing Sample applications in Jython

Saturday, January 30, 2016

Read 64-bit remote registry from a 32-bit process in IronPython

Sample IronPython code to read remote 64-bit registry from a 32-bit process. Note that this can also be vice versa.

Eclipse configuration

Oxygen.2 (v4.7.2):
Base: Eclipse Platform Binary(link)
Tfs Integration: Team Explorer Everywhere (link)
Python Editor: PyDev
System Integration: StartExplorer(link)
Subversion Integration: Subclipse
Web Development: Eclipse Web Developer Tools
XML Editor: Eclipse XML Editors and Tools

Neon (v4.6.x):
Base: Eclipse Platform (link)
Tfs Integration: Team Explorer Everywhere (link)
Python Editor: PyDev
System Integration: StartExplorer(link)
Subversion Integration: Subclipse
Web Development: Eclipse Web Developer Tools
XML Editor: Eclipse XML Editors and Tools

Base: Eclipse Classic
Python Editor: PyDev
System Integration: StartExplorer(link)
Subversion Integration: Subclipse
Tfs Integration:
Web Development: Eclipse Web Developer Tools
XML Editor: Eclipse XML Editors and Tools

Base: Eclipse Classic
Python Editor: PyDev
System Integration: StartExplorer
Subversion Integration: Subclipse
Web Development: Eclipse Web Developer Tools
XML Editor: Eclipse XML Editors and Tools

Base: Eclipse IDE for Tester
Subversion Integration: Subclipse
Python Editor: PyDev
XML Editor: Eclipse XML Editors and Tools

Base: Eclipse IDE for C/C++ Developers
Subversion Integration: Subversive
Python Editor: PyDev
XML Editor: Eclipse XML Editors and Tools

Saturday, January 23, 2016

Show Debian/Ubuntu/Mint package version using apt-cache

$: apt-cache show monodevelop | grep Version

How to install git on Debian 8.x(Jessie)

#: apt-get install git

Assign keyboard shortcut to lxterminal on LXDE

On my Debian 8.2 LXDE minimal install, need to assign keyboard shortcut to open lxterminal. To assign keyboard binding in LXDE, open ~/.config/openbox/lxde-rc.xml then add the following inside <keyboard> element:
Then run the following to for OpenBox/LXDE to reload the configuration.
$:  openbox --reconfigure

Change LXDE keybinding without logging out

When you make edits to ~/.config/openbox/lxde-rc.xml to change keybinding, you have two options to make the changes take effect. First option is to logout or second option is to run the following command:
$:  openbox --reconfigure


Friday, January 22, 2016

The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?

After fixing items below related to MonoDevelop on Linux Mint 7.3, another error shows up:

The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?

To fix install gtk-sharp-2.0 libraries, like:
$: sudo apt-get install gtk-sharp2

Thursday, January 21, 2016

Could not obtain a C# compiler. C# compiler not found for Mono / .Net 4.0

Tried to build a monodevelop project in Linux Mint 17.3 but got the following error message

Could not obtain a C# compiler. C# compiler not found for Mono / .Net 4.0
To fix this do:
$: sudo apt-get install mono-gmcs


Monodevelop does not start on Linux Mint 7.3

This is issue is similar to this one but different dependencies. So, I have installed monodevelop like:
$: sudo apt-get install monodevelop
Unfortunately it is not working. Need to install the following dependencies to make it to work
$: sudo apt-get install libmono-cairo2.0-cil

Saturday, January 09, 2016

py2exe does not work yet on Python 3.5

Installing py2exe on Python 3.5 (64-bit) using pip works (pip install py2exe) but it can't build standalone executable yet - run-py3.5-win-amd64.exe does not exists.