Activates or deactivates autostarting autokey during user login.
    Autostart is handled by placing a .desktop file into '$XDG_CONFIG_HOME/autostart', typically '~/.config/autostart'
326556
def set_autostart_entry(autostart_data: AutostartSettings):
    
    _logger.info("Save autostart settings: {}".format(autostart_data))
    autostart_file = Path(common.AUTOSTART_DIR) / "autokey.desktop"
    if autostart_data.desktop_file_name is None:  # Choosing None as the GUI signals deleting the entry.
        delete_autostart_entry()
    else:
        autostart_file.parent.mkdir(exist_ok=True)  # make sure that the parent autostart directory exists.
        _create_autostart_entry(autostart_data, autostart_file)
512877
public function setAutostart($autostart)
    {
        if (is_bool($autostart) === true) {
            $this->autostart = $autostart;
        } else {
            $msg = "The 'autostart' argument must be a boolean value, '" . gettype($autostart) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
167156
def on_start_at_login_toggled(self, chk):
        
        self.settings.general.set_boolean('start-at-login', chk.get_active())
        refresh_user_start(self.settings)
749573
function logConfiguration (program) {
  utils.log(chalk.bold.green.underline('\nConfiguration: '))
  utils.log(`Desktop Converter Location:    ${program.desktopConverter}`)
  utils.log(`Expanded Base Image:           ${program.expandedBaseImage}`)
  utils.log(`Publisher:                     ${program.publisher}`)
  utils.log(`Dev Certificate:               ${program.devCert}`)
  utils.log(`Windows Kit Location:          ${program.windowsKit}
`)
}
452
def systemctl_autostart(self, service_name, start_cmd, stop_cmd):
        
        # get config content
        service_content = bigdata_conf.systemctl_config.format(
            service_name=service_name,
            start_cmd=start_cmd,
            stop_cmd=stop_cmd
        )

        # write config into file
        with cd('/lib/systemd/system'):
            if not exists(service_name):
                sudo('touch {0}'.format(service_name))
            put(StringIO(service_content), service_name, use_sudo=True)

        # make service auto-start
        sudo('systemctl daemon-reload')
        sudo('systemctl disable {0}'.format(service_name))
        sudo('systemctl stop {0}'.format(service_name))
        sudo('systemctl enable {0}'.format(service_name))
        sudo('systemctl start {0}'.format(service_name))
361144
def postActivate_(self):
        
        self.tmpfile = os.path.join(constant.tmpdir,"valkka-"+str(os.getpid())) # e.g. "/tmp/valkka-10968" 
        self.analyzer = ExternalDetector(
            executable = self.executable,
            image_dimensions = self.image_dimensions,
            tmpfile = self.tmpfile
            )
482604
def load_key_bindings_for_prompt(**kw):
    
    kw.setdefault('enable_abort_and_exit_bindings', True)
    kw.setdefault('enable_search', True)
    kw.setdefault('enable_auto_suggest_bindings', True)

    return load_key_bindings(**kw)
836610
def startup_config_file(self):
        

        path = os.path.join(self.working_dir, 'startup-config.cfg')
        if os.path.exists(path):
            return path
        else:
            return None
781426
def onStart(self):
        
        curses.mousemask(0)
        self.paths.host_config()
        version = Version()

        # setup initial runtime stuff
        if self.first_time[0] and self.first_time[1] != 'exists':
            system = System()
            thr = Thread(target=system.start, args=(), kwargs={})
            thr.start()
            countdown = 60
            while thr.is_alive():
                npyscreen.notify_wait('Completing initialization:...' + str(countdown),
                                      title='Setting up things...')
                time.sleep(1)
                countdown -= 1
            thr.join()

        quit_s = '\t'*4 + '^Q to quit'
        tab_esc = '\t'*4 + 'ESC to close menu popup'
        self.addForm('MAIN',
                     MainForm,
                     name='Vent ' + version +
                     '\t\t\t\t\t^T for help' + quit_s + tab_esc,
                     color='IMPORTANT')
        self.addForm('HELP',
                     HelpForm,
                     name='Help\t\t\t\t\t\t\t\t^T to toggle previous' +
                     quit_s,
                     color='DANGER')
        self.addForm('TUTORIALINTRO',
                     TutorialIntroForm,
                     name='Vent Tutorial' + quit_s,
                     color='DANGER')
        self.addForm('TUTORIALBACKGROUND',
                     TutorialBackgroundForm,
                     name='About Vent' + quit_s,
                     color='DANGER')
        self.addForm('TUTORIALTERMINOLOGY',
                     TutorialTerminologyForm,
                     name='About Vent' + quit_s,
                     color='DANGER')
        self.addForm('TUTORIALGETTINGSETUP',
                     TutorialGettingSetupForm,
                     name='About Vent' + quit_s,
                     color='DANGER')
        self.addForm('TUTORIALSTARTINGCORES',
                     TutorialStartingCoresForm,
                     name='Working with Cores' + quit_s,
                     color='DANGER')
        self.addForm('TUTORIALADDINGPLUGINS',
                     TutorialAddingPluginsForm,
                     name='Working with Plugins' + quit_s,
                     color='DANGER')
        self.addForm('TUTORIALADDINGFILES',
                     TutorialAddingFilesForm,
                     name='Files' + quit_s,
                     color='DANGER')
        self.addForm('TUTORIALTROUBLESHOOTING',
                     TutorialTroubleshootingForm,
                     name='Troubleshooting' + quit_s,
                     color='DANGER')
255923
def on_toggle_autoplay_key(self):
        
        if self.autoplay_manager.is_running():
            self.autoplay_manager.stop_autoplay()
            self.view.set_autoplay(False)
        else:
            self.autoplay_manager.start_autoplay()
            self.view.set_autoplay(True)
412164
def activate!(*input)
      dispatch :activated
      component.resetExitType

      r = nil

      while [:EARLY_EXIT, :NEVER_ACTIVATED, :TIMEOUT].include?(component.exit_type) &&
            !shutdown?
        r = component.activate(input)
        run_sync! if sync_enabled?
      end

      dispatch :deactivated
      r
    end
288132
public function startup() {
		parent::startup();
		Cache::disable();
		$this->UserTable = TableRegistry::get($this->param('model'), [
			'connection' => ConnectionManager::get($this->param('connection'))
		]);
		if (!$this->UserTable->hasBehavior('Burzum/UserTools.User')) {
			$this->UserTable->addBehavior('Burzum/UserTools.User');
		}
		try {
			$this->UserTable->schema();
		} catch (\Exception $e) {
			$this->err($e->getMessage());
			$this->_stop(1);
		}
	}
967589
private void setInitializeAtStartup(Boolean flag) {
        this.initializeAtStartup = flag;
        setProperty(Constants.SSLPROP_KEY_STORE_INITIALIZE_AT_STARTUP, flag.toString());
    }
989571
private function __startAutoGC()
    {
        $gcInterval = $this->config->getGCInterval();
        if(null !== $gcInterval)
        {
            $this->timerID = \swoole_timer_tick($gcInterval * 1000, [$this, 'gc']);
        }
    }
790593
def init_editing_mode(self, e):  # (C-e)
        '''
        self._bind_exit_key(u'Control-d')
        self._bind_exit_key(u'Control-z')

        # I often accidentally hold the shift or control while typing space
        self._bind_key(u'space',       self.self_insert)
        self._bind_key(u'Shift-space',       self.self_insert)
        self._bind_key(u'Control-space',     self.self_insert)
        self._bind_key(u'Return',            self.accept_line)
        self._bind_key(u'Left',              self.backward_char)
        self._bind_key(u'Control-b',         self.backward_char)
        self._bind_key(u'Right',             self.forward_char)
        self._bind_key(u'Control-f',         self.forward_char)
        self._bind_key(u'Control-h',         self.backward_delete_char)
        self._bind_key(u'BackSpace',         self.backward_delete_char)
        self._bind_key(u'Control-BackSpace', self.backward_delete_word)

        self._bind_key(u'Home',              self.beginning_of_line)
        self._bind_key(u'End',               self.end_of_line)
        self._bind_key(u'Delete',            self.delete_char)
        self._bind_key(u'Control-d',         self.delete_char)
        self._bind_key(u'Clear',             self.clear_screen)
        self._bind_key(u'Alt-f',             self.forward_word)
        self._bind_key(u'Alt-b',             self.backward_word)
        self._bind_key(u'Control-l',         self.clear_screen)
        self._bind_key(u'Control-p',         self.previous_history)
        self._bind_key(u'Up',                self.history_search_backward)
        self._bind_key(u'Control-n',         self.next_history)
        self._bind_key(u'Down',              self.history_search_forward)
        self._bind_key(u'Control-a',         self.beginning_of_line)
        self._bind_key(u'Control-e',         self.end_of_line)
        self._bind_key(u'Alt-<',             self.beginning_of_history)
        self._bind_key(u'Alt->',             self.end_of_history)
        self._bind_key(u'Control-r',         self.reverse_search_history)
        self._bind_key(u'Control-s',         self.forward_search_history)
        self._bind_key(u'Control-Shift-r',         self.forward_search_history)
        self._bind_key(u'Alt-p',
                       self.non_incremental_reverse_search_history)
        self._bind_key(u'Alt-n',
                       self.non_incremental_forward_search_history)
        self._bind_key(u'Control-z',         self.undo)
        self._bind_key(u'Control-_',         self.undo)
        self._bind_key(u'Escape',            self.kill_whole_line)
        self._bind_key(u'Meta-d',            self.kill_word)
        self._bind_key(u'Control-Delete',       self.forward_delete_word)
        self._bind_key(u'Control-w',         self.unix_word_rubout)
        #self._bind_key('Control-Shift-v',   self.quoted_insert)
        self._bind_key(u'Control-v',         self.paste)
        self._bind_key(u'Alt-v',             self.ipython_paste)
        self._bind_key(u'Control-y',         self.yank)
        self._bind_key(u'Control-k',         self.kill_line)
        self._bind_key(u'Control-m',         self.set_mark)
        self._bind_key(u'Control-q',         self.copy_region_to_clipboard)
#        self._bind_key('Control-shift-k',  self.kill_whole_line)
        self._bind_key(u'Control-Shift-v',   self.paste_mulitline_code)
        self._bind_key(u"Control-Right",     self.forward_word_end)
        self._bind_key(u"Control-Left",      self.backward_word)
        self._bind_key(u"Shift-Right",
                       self.forward_char_extend_selection)
        self._bind_key(u"Shift-Left",
                       self.backward_char_extend_selection)
        self._bind_key(u"Shift-Control-Right",
                       self.forward_word_end_extend_selection)
        self._bind_key(u"Shift-Control-Left",
                       self.backward_word_extend_selection)
        self._bind_key(u"Shift-Home",
                       self.beginning_of_line_extend_selection)
        self._bind_key(u"Shift-End",
                       self.end_of_line_extend_selection)
        self._bind_key(u"numpad0",           self.self_insert)
        self._bind_key(u"numpad1",           self.self_insert)
        self._bind_key(u"numpad2",           self.self_insert)
        self._bind_key(u"numpad3",           self.self_insert)
        self._bind_key(u"numpad4",           self.self_insert)
        self._bind_key(u"numpad5",           self.self_insert)
        self._bind_key(u"numpad6",           self.self_insert)
        self._bind_key(u"numpad7",           self.self_insert)
        self._bind_key(u"numpad8",           self.self_insert)
        self._bind_key(u"numpad9",           self.self_insert)
        self._bind_key(u"add",               self.self_insert)
        self._bind_key(u"subtract",          self.self_insert)
        self._bind_key(u"multiply",          self.self_insert)
        self._bind_key(u"divide",            self.self_insert)
        self._bind_key(u"vk_decimal",        self.self_insert)
        log(u"RUNNING INIT EMACS")
        for i in range(0, 10):
            self._bind_key(u"alt-%d"%i,      self.digit_argument)
        self._bind_key(u"alt--",             self.digit_argument)
228193
public static boolean loginAtStart() {
		boolean loginAtStart = Application.getInstance().isLoginRequired() || Configuration.get("MjLoginAtStart", "false").equals("true");
		if (loginAtStart && !Backend.getInstance().isAuthenticationActive()) {
			throw new IllegalStateException("Login required but authorization is not configured!");
		}
		return loginAtStart;
	}
1254617
def OnInit(self):
        """"""

        # Get command line options and arguments
        cmdp = Commandlineparser()
        options, filename = cmdp.parse()

        kwargs = {
            "title": "pyspread",
            "S": self.S
        }

        # Store command line input in config if no file is provided
        if filename is None:
            kwargs["dimensions"] = options.dimensions

        # Main window creation
        from src.gui._main_window import MainWindow

        self.main_window = MainWindow(None, **kwargs)

        # Initialize file loading via event

        if gnupg is not None and options.new_gpgkey:
            # Create GPG key if not present

            try:
                from src.lib.gpg import genkey
                self.config["gpg_key_fingerprint"] = repr("")
                genkey()

            except ImportError:
                pass

            except ValueError:
                # python-gnupg is installed but gnupg is not installed
                pass

        # Show application window
        self.SetTopWindow(self.main_window)
        self.main_window.Show()

        # Load filename if provided
        if filename is not None:
            post_command_event(self.main_window, self.GridActionOpenMsg,
                               attr={"filepath": filename})
            self.main_window.filepath = filename

        return True