Ejemplo n.º 1
0
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')
Ejemplo n.º 2
0
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')
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
0
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)])
Ejemplo n.º 6
0
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)])
Ejemplo n.º 7
0
    def test_is_running(self):
        output = systemcalls.is_running("bash")
        self.assertNotEqual(output, None)

        output = systemcalls.is_running("inexistent")
        self.assertEqual(output, None)