linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.54k stars 740 forks source link

How to remove or detect fallback mode #10862

Closed DarianAnjuhal closed 2 years ago

DarianAnjuhal commented 2 years ago
 * Linux Mint 19.3 Tricia
 * Cinnamon version 4.4.8
 * Intel i915 (i915 is the needed kernel module)
 * 64 bit

Issue We are using linux mint in kiosk mode starting a application showing images and videos. Sometimes cinnamon crashed (we don't know why) and the fallback mode is shown. So the dialog "You are currently running in fallback mode." is shown and we have to restart the system manually.

Question Is it possible to remove this windows or detect a cinnamon crash using dbus? Or are there a option disabling the fallback mode or restart automatically? Maybe an option?

Thank you for informations and help Bye Darian

mtwebster commented 2 years ago

Unfortunately there's no 'official' way for now, but there's an easy hack:

The dialog and fallback panel is provided by cinnamon-launcher - https://github.com/linuxmint/cinnamon/blob/4.4.8/files/usr/bin/cinnamon-launcher

Assuming your info you provided is accurate and you're on 4.4.8, you can edit your /usr/bin/cinnamon-launcher by inserting two lines (make a backup of it first!!):

diff --git a/files/usr/bin/cinnamon-launcher b/files/usr/bin/cinnamon-launcher
index 14aaf65c3..ba7e75db7 100755
--- a/files/usr/bin/cinnamon-launcher
+++ b/files/usr/bin/cinnamon-launcher
@@ -64,6 +64,10 @@ if __name__ == "__main__":
     else:
         exit_status = os.waitpid(cinnamon_pid, 0)[1]
         if exit_status != 0:
+
+            os.execvp(sys.argv[0], (sys.argv[0], "--replace"))
+            return
+
             if os.fork() == 0:
                 # Start the fallback panel
                 if panel_cmd is not None:

NOTE: I can't test this, but I did test it in the current cinnamon version, with an equivalent patch.

If you update or reinstall cinnamon you'd have to do this again, but as you're on an obsolete version of cinnamon, not a big chance of that.

DarianAnjuhal commented 2 years ago

Thanks a lot for your info. If there is no official way or an option, I really have to change the cinnamon itself.

I tried to avoid this. :-)

Any other ideas?

Greetings and have a nice day Darian

JosephMcc commented 2 years ago

I'm closing this since you were given probably the best answer you're going to get.