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.
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. Отключение экрана блокировки
gsettings set org.gnome.desktop.lockdown disable-lock-screen true
2. Снятие / скрытие текста «Выключение / Выход из системы» и пункт «Выключение питания»
Установите расширение Внесите расширение подменю Gnome и скомпилируйте gschemas. Затем включите кнопку удаления питания
из dconf-editor или через gsettings
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 после отключения расширения.