Control X from the command line for scripts