miscellaneous code for linux