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?
Asked
Active
Viewed 586 times
1 Answers
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
create the folder in your local directory
mkdir -p $HOME/.local/share/gnome-shell/extensions/hideLockScreenItem@user.extension.mail
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 hideLockScreenItem@user.extension.mail
it may once again be needed to refresh or re-login as in the above step.
PRATAP-PANABAKA
- 23,201



