2

GNOME 3.36

I am trying to remove the "Poweroff/logout" button from System Menu.

enter image description here

enter image description here

For removing this button, I am using the below command in Terminal

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.panel.statusArea.aggregateMenu._system.menu.box.remove_actor(Main.panel.statusArea.aggregateMenu._system._sessionSubMenu)'

This works fine.

enter image description here

The problem is that when am adding it back with the below command, and when I select this PowerOff/Logout button.. This button is going down while popping up the sub menu of it.

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.panel.statusArea.aggregateMenu._system.menu.box.add_actor(Main.panel.statusArea.aggregateMenu._system._sessionSubMenu)'

enter image description here

How can I make it work like the 2nd Image with out restarting the gnome-shell?

PRATAP
  • 121
  • 1
  • 13

0 Answers0