def start_galicaster(): global galicaster global root, predicate import gi gi.require_version('Atspi', '2.0') gi.require_version('Wnck', '3.0') from dogtail.tree import root, predicate pid = is_running('run_galicaster') if pid: execute(['kill', str(pid)]) run('python run_galicaster.py') galicaster = root.application('run_galicaster.py')
def start_galicaster(): global galicaster global root, predicate import gi gi.require_version('Atspi', '2.0') gi.require_version('Wnck', '3.0') from dogtail.tree import root, predicate pid = is_running('run_galicaster') if pid: execute(['kill',str(pid)]) run('python run_galicaster.py') galicaster = root.application('run_galicaster.py')
def configure_keyboard(dispatcher=None): configuration = { '/org/onboard/auto-show/enabled' : 'false', '/org/onboard/layout' : "'Phone'", '/org/onboard/theme' : "'Ambiance'", '/org/onboard/theme-settings/color-scheme' : "'/usr/share/onboard/themes/Aubergine.colors'", '/org/onboard/window/landscape/dock-expand' : 'false', '/org/onboard/start-minimized' : 'false', '/org/onboard/system-theme-tracking-enabled': 'false', '/org/onboard/use-system-defaults' : 'false', } write_dconf_settings(configuration, logger) pid = is_running('onboard') if not pid: subprocess.Popen(["onboard"]).pid #FIXME: Set again onboard properties, otherwise some of them would be ignored write_dconf_settings(configuration, logger)
def configure_keyboard(dispatcher=None): configuration = { '/org/onboard/auto-show/enabled' : 'true', '/org/onboard/layout' : "'Phone'", '/org/onboard/theme' : "'Ambiance'", '/org/onboard/theme-settings/color-scheme' : "'/usr/share/onboard/themes/Aubergine.colors'", '/org/onboard/window/landscape/dock-expand' : 'false', '/org/onboard/start-minimized' : 'true', '/org/onboard/system-theme-tracking-enabled': 'false', '/org/onboard/use-system-defaults' : 'false', } write_dconf_settings(configuration, logger) pid = is_running('onboard') if not pid: subprocess.Popen(["onboard"]).pid #FIXME: Set again onboard properties, otherwise some of them would be ignored write_dconf_settings(configuration, logger)
def unconfigure_keyboard(dispatcher=None): write_dconf_settings({'/org/onboard/use-system-defaults': 'true'}, logger) pid = is_running('onboard') if pid: execute(['kill', str(pid)])
def unconfigure_keyboard(dispatcher=None): write_dconf_settings({'/org/onboard/use-system-defaults':'true'},logger) pid = is_running('onboard') if pid: execute(['kill', str(pid)])
def test_is_running(self): output = systemcalls.is_running("bash") self.assertNotEqual(output, None) output = systemcalls.is_running("inexistent") self.assertEqual(output, None)