I am running GNOME 42(22.04 LTS) on my lenovo ideapad D330 convertable tablet(only one which works out of the box with orientation of touch and screen giving least issues). However one of the main issue is whenever the screen goes to sleep it doesn't turn back on and needs complete restart by holding down power button. So I disabled the suspend and hibertnate option using systemctl and also turned off automatic screen off. However whenever I lock the device the screen goes off unless there is a mouse input atleast. I disabled super+L shortcut for screen lock. Is there any way to disable lock option that we click from top panel?
Asked
Active
Viewed 422 times
1
-
100% sure there was an almost identical question a little while ago. Can't find it though; may have been deleted. – Esther Jun 08 '22 at 18:16
-
[here](https://askubuntu.com/questions/1410411/remove-lock-button-icon-from-system-tray-ubuntu-18-04-with-gnome-3-28) is the similar question, but it's using older versions of Ubuntu and Gnome. – Esther Jun 08 '22 at 18:37
-
@Esther checked the solution from that question. As far as what I'm understanding they're suggesting creating a button on the panel by writing an extension which doesn't seem to be of much use in my case since I want the 'lock screen' option to be removed from tray and not really create a custom button. I'm sorry if I came out a little rude, I guess I'm just frustrated since I'm fairly a noob when it comes to messing with linux although I've been casually using it on other systems.I thought this would be a simple task. Especially since I removed suspend option easily using systemctl command. – Hipster Monkey Jun 08 '22 at 20:34
-
Messing with built-in buttons (especially in Gnome, which isn't *that* customizable) isn't that simple. From what it seemed in the linked questions there are existing extensions that do this for newer versions of Gnome, but I couldn't find one. – Esther Jun 08 '22 at 20:36
-
Found couple of fix finally. Putting it here for someone who might face similar issues. Either run this command "gsettings set org.gnome.desktop.lockdown disable-lock-screen true" in terminal. That should do the trick. And one can re-ebable it using reset instead of set in the same command in case if you ever need to. – Hipster Monkey Jun 09 '22 at 08:02
-
Alternatively you can install dconf editor from GNOME softwares. And open it and navigate to /org/gnome/desktop/lockdown and enable disable-lock-screen toggle. Fair warning - Do not mess around with random options using dconf editor as it can mess up serious internal system settings. – Hipster Monkey Jun 09 '22 at 08:07
-
why don't you put that as an answer? That way people looking for this in the future will be able to find the solution. – Esther Jun 09 '22 at 12:33
-
@Esther Sure. Will do. – Hipster Monkey Jun 09 '22 at 14:09
1 Answers
2
Found couple of ways finally.
First method : is to
run in terminal the command
gsettings set org.gnome.desktop.lockdown disable-lock-screen true
That should remove the lock option from the tray. And it can be re-ebabled using reset instead of set in the same command and removing true attribute
gsettings reset org.gnome.desktop.lockdown disable-lock-screen
Second Method : is to install Dconf Editor from GNOME software (available as deb,rpm or flatpak) and open it and navigate into /org/gnome/desktop/lockdown and toggle disable-lock-screen option accordingly.
Note:
- The following tricks worked on GNOME42 on 22.04 LTS for removing the lock text in tray, but theoretically it should also work on previous versions which has lock icon instead since it is messing with gsettings/dconf.
- Proceed with caution and proper understanding when it comes to trying other things with Dconf Editor since it messes up internal system settings and may break serious functionalities.
Hipster Monkey
- 31
- 4