1

For a multiuser, multisession RDP server I'd like to remove the 'Power Off' and 'Lock' options from the menu bar (in the top right hand corner), or at least hide them, so the user only has a Logout option and no other, superfluous and redundant, distractions.

Menu options to remove/hide

It would also be agreeable to remove (or hide) the Connections/Network Settings choice as well.

Does anyone have an idea how each of these might be achieved?

5
  • lock can be removed/hide with lockdown settings key via gsettings.. poweroff item can be removed with a gnome-shell extension installed..
    – PRATAP
    Jun 8, 2020 at 1:30
  • Thanks, but that only hides the I/O power symbol. The 'Power Off...' option is still present in the menu (as is the label 'Power Off/Log Out'.
    – MaxG
    Jun 8, 2020 at 8:27
  • did you install extension?? which is capable of hiding the power off button from menu??
    – PRATAP
    Jun 8, 2020 at 8:47
  • I presume you mean this extension? That only hides the I/O button, as I mentioned. It does not hide the 'Power Off' menu choice (see image linked in the original question for clarification). Is there an extension that does that?
    – MaxG
    Jun 8, 2020 at 9:25
  • no.. i dont mean that extension.. and that extension doesn't mention 20.04 too rite? so from the attached screenshot you mean to remove network settings too? are you 0K with "lock" via gsettings way?
    – PRATAP
    Jun 8, 2020 at 9:42

1 Answer 1

1

1. Disabling lock screen

gsettings set org.gnome.desktop.lockdown disable-lock-screen true

enter image description here

2. Removing/ Hiding the "Power Off/ Logout" Text and Power Off Item

Install the extension Bringout Submenu Gnome Extension and compile the gschemas.. Then turn on the remove-power-button from dconf-editor or via gsettings

enter image description here

3. Connections/Network Settings

edit the extensions extension.js file.

gedit $HOME/.local/share/gnome-shell/extensions/[email protected]/extensions.js

add the two lines in different positions without // as below

function enable() {
modifiedMenu = new _bringOut();
// Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(Main.panel.statusArea.aggregateMenu._network.menu.actor)
}

function disable() {
modifiedMenu.destroy();
// Main.panel.statusArea.aggregateMenu.menu.box.insert_child_at_index(Main.panel.statusArea.aggregateMenu._network.menu.actor, 5)
}

you may need to change the position value 5 in the line number 119 If it sits at different position while disabling the extension. It does not matter if you do the gnome-shell refresh once you disable the extension.

enter image description here

enter image description here

1
  • 1
    Thank you. Those all worked a treat. Might be an idea to add the link to the relevant github repository to help others get straight to the gschema code and compilation procedure?
    – MaxG
    Jun 8, 2020 at 18:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .