It seems to me like this should be shared code between all external libraries. Also only working on German GNOME Linux? Surely there's a better way.