Edit Ubuntu 20.04 Power off/Logout menu

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?

1
задан 8 June 2020 в 12:48

1 ответ

1. Отключение экрана блокировки

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

enter image description here

2. Снятие / скрытие текста «Выключение / Выход из системы» и пункт «Выключение питания»

Установите расширение Внесите расширение подменю Gnome и скомпилируйте gschemas. Затем включите кнопку удаления питания из dconf-editor или через gsettings

enter image description here

3. Подключения / Сетевые настройки

отредактируйте файл extensions extension.js .

gedit $HOME/.local/share/gnome-shell/extensions/BringOutSubmenuOfPowerOffLogoutButton@pratap.fastmail.fm/extensions.js

добавьте две строки в разные позиции без // , как показано ниже

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)
}

, вам может потребоваться изменить значение позиции 5 в строке № 119 Если оно находится в другом положении при отключении расширения. Не имеет значения, выполняете ли вы обновление оболочки gnome после отключения расширения.

enter image description here

enter image description here

0
ответ дан 19 June 2020 в 21:29

Другие вопросы по тегам:

Похожие вопросы: