Corrected various DBus calls and moved X11 code.