/usr/bin/cinnamon-launcher is in cinnamon 2.2.16-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #! /usr/bin/python
# -*- coding=utf-8 -*-
FALLBACK_COMMAND = "metacity"
FALLBACK_ARGS = ("--replace",)
import os, sys, gettext
from gi.repository import Gtk
gettext.install("cinnamon", "/usr/share/locale")
def confirm_restart():
d = Gtk.MessageDialog(None, 0, Gtk.MessageType.WARNING, Gtk.ButtonsType.YES_NO)
d.set_keep_above(True)
d.set_markup("<span size='large'><b>%s</b></span>\n\n%s" % (_("Do you want to restart Cinnamon?"), _("Cinnamon just crashed. You are currently running in Fallback Mode.")))
d.show_all()
resp = d.run()
d.destroy()
return (resp == Gtk.ResponseType.YES)
if __name__ == "__main__":
cinnamon_pid = os.fork()
if cinnamon_pid == 0:
os.execvp("cinnamon", ("cinnamon", "--replace", ) + tuple(sys.argv[1:]))
else:
exit_status = os.waitpid(cinnamon_pid, 0)[1]
if exit_status != 0:
if os.fork() == 0:
if os.path.exists("/usr/bin/gnome-panel"):
os.system("gnome-panel --replace &")
elif os.path.exists("/usr/bin/tint2"):
os.system("killall tint2")
os.system("tint2 &")
os.execvp(FALLBACK_COMMAND, (FALLBACK_COMMAND,) + FALLBACK_ARGS)
else:
if confirm_restart():
os.execvp(sys.argv[0], (sys.argv[0], "--replace"))
|