Well, you can right-click the menu button, go to preferences, go to the system tab, and disable quit. This will remove the quit button from the menu, but only for one user.
As a quick hack alternative, if you trust nobody, edit the file /usr/lib/linuxmint/mintMenu/plugins/system_management.py as root. Almost at the end of the file you will find this block of code:
- Code: Select all
if ( self.showQuit == True ):
Button7 = easyButton( "system-shutdown", self.iconsize, [_("Quit")], -1, -1 )
Button7.connect( "clicked", self.ButtonClicked, "mate-session-save --shutdown-dialog" )
Button7.show()
self.systemBtnHolder.pack_start( Button7, False, False )
self.mintMenuWin.setTooltip( Button7, _("Shutdown, restart, suspend or hibernate") )
all you need to do is replace that first line with a false statement (make sure the indentation remains the same, as that is how Python works). For example, change it to:
- Code: Select all
#if ( self.showQuit == True ):
if ( false ):
Button7 = easyButton( "system-shutdown", self.iconsize, [_("Quit")], -1, -1 )
Button7.connect( "clicked", self.ButtonClicked, "mate-session-save --shutdown-dialog" )
Button7.show()
self.systemBtnHolder.pack_start( Button7, False, False )
self.mintMenuWin.setTooltip( Button7, _("Shutdown, restart, suspend or hibernate") )
Now, no matter the personal preference of a user, their quit button won't be shown on their menu. After making the above change, either log out and in again to activate, or do "killall mintmenu".
Note that you can not easily stop a determined person from shutting down your system. You can also do that at the login screen. You can do it with the mate-session-save command shown in above. You can do it by sending a DBus message. You can do it with the Magic SysRq key. And so on, and so on all as a normal unprivileged user. So depends on your users how far you should take this...