2

I'm trying to remove the shortcut to "Lock Screen" from the start menu, but I can't seem to find the .desktop file that would be associated with it. Whenever I go to take a screenshot, I type in screen and then enter, with 22.04 there's a new entry on the start menu for lock screen which is apparently a closer match to screen than screenshot. To compensate for this design failure, I would like to remove the shortcut, where would it be located?

menu list

Blakethepatton
  • 298
  • 3
  • 10
  • Does this answer your question? [Remove Lock Option from Top Panel](https://askubuntu.com/questions/1412990/remove-lock-option-from-top-panel) – Esther Jun 17 '22 at 17:41
  • That's how to disable the lock screen, which is not what I'm looking for. I'm looking to remove a link from the app menu. – Blakethepatton Jun 17 '22 at 17:43

1 Answers1

2

It is not from a desktop file, it is hardcoded.

The workaround for this would be to tweak the gnome-shell's core files which is by creating the gnome-shell extension to tweak it.

the workaround seems a little overkill but it works.

Here is the Github link for extension files https://github.com/PRATAP-KUMAR/hide-lock-screen-item-from-show-apps-menu

enter image description here

create the folder in your local directory

mkdir -p $HOME/.local/share/gnome-shell/extensions/[email protected]

put the two downloaded files (extension.js and metadata.json) in the above directory.

refresh the gnome-shell if you are using X or logout and login if Wayland.

to enable the extension, run the below command

gnome-extensions enable [email protected]

it may once again be needed to refresh or re-login as in the above step.

enter image description here

enter image description here

PRATAP
  • 21,989
  • 8
  • 59
  • 121