Exemple #1
0
        public static void RegisterSessionManagerRestart(string path, string[] args)
        {
            if (path == null)
            {
                return;
            }

            // If the session ends or the application crashes - restart
            Gnome.Client client = Gnome.Global.MasterClient();
            client.RestartStyle =
                Gnome.RestartStyle.IfRunning | Gnome.RestartStyle.Immediately;
            client.Die += OnSessionManagerDie;

            // Get the args for session restart...
            string [] restart_args = new string [args.Length + 1];
            restart_args [0] = path;
            args.CopyTo(restart_args, 1);
            client.SetRestartCommand(restart_args.Length, restart_args);
        }
Exemple #2
0
 public static void CancelSessionManagerRestart()
 {
     Gnome.Client client = Gnome.Global.MasterClient();
     client.RestartStyle = Gnome.RestartStyle.IfRunning;
     client.Flush();
 }