monitor script compatible with gnome