detect arch/os when running gui scripts