tsites
tsites computer tuition, website design, network security
articles
Mate Linux, remove "Switch User" and "Leave Message" buttons.

If you are using a Linux distribution with a mate desktop interface, here's how to remove some of the buttons on the screen-lock dialog.

This is the default lock-screen you'd see when pressing alt-L (or windows key and L if you use a PC keyboard):

I want to remove the 'Leave Message' option, and also the 'Switch User' option. (The entire 'Switch User' concept is a very bad idea anyway).

To remove these buttons, we need to edit a file. As you need root permissions, open a terminal and type

sudo pluma /usr/share/mate-screensaver/lock-dialog-default.ui

(Substutute 'pluma' above with the name of your text editor).

A new window should open, and you'll be able to edit the file.

Scroll down (to about line 116). You are looking for the following:

<child>
<object class="GtkButton" id="auth-note-button">
<property name="label" translatable="yes">_Leave Message</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="auth-switch-button">
<property name="label" translatable="yes">_Switch User</property>
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="focus_on_click">False</property>
<property name="can_default">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>

Scroll until you find the part mentioning 'Leave Message'. Make sure you also select the lines above, starting with <child>
Select all the lines, making sure your last selected line ends with </child>

You can now just delete all these lines, and save over the original.

Changes you make are immediate, so press alt-L to activate the lock screen.

Your lock screen should now have changed and no longer show the 'Leave Message' and 'Switch User' options.

If you made a mistake editing the file, you can unlock and return to your still open document in your text editor. Press ctrl-z (or edit menu, undo) and save over the original file again. This will restore the file to before you made any edits.

 

Back to Forum Listing