Opening a database makes it selected in main database list.
Fixed checking for running under Linux.
Minor variable name change.
Merge branch 'dev'