is there a way to disable the eye icon in the login screen to prevent from someone "accidentally" turning it on and thus showing their password in plain sight? Thank you!
-
The problem with that is that every time I upgrade Ubuntu I will have to modify it and recompile it again. Not very practical. – Leandro Jul 26 '20 at 19:56
-
It is perfectly OK if all of that goes away – Leandro Jul 27 '20 at 16:03
-
It's OK just avoiding the "eye" icon. – Leandro Jul 27 '20 at 19:47
-
It worked like a charm. Somehow the regular loading screen got screwed (now it says "MATE"), but I don't care, the eye disappeared. Thank you very much! – Leandro Jul 27 '20 at 22:39
-
It worked in the login screen, however, in the lock screen it's still there :( – Leandro Jul 27 '20 at 23:27
-
Yes, sure, there's no hurry. – Leandro Jul 28 '20 at 09:54
1 Answers
Assuming you have a fresh install of Ubuntu 20.04, The workaround is to set the eye-icon size to 1px so that it is not visible and not reactive..
To use the workaround
Download the script from github with below command..
wget -qO - https://github.com/PRATAP-KUMAR/focalgdm3/archive/remove-eye-icon.tar.gz | tar zx --strip-components=1 focalgdm3-remove-eye-icon/focalgdm3
Run the command
sudo ./focalgdm3 \#4f194c
Optionally you may change the color #4f194c in above command with any color or you may replace the color \#4f194c with an absolute path of the Image if you wish an Image as background.
For reverting back to normal
Run the command
sudo ./focalgdm3 --reset
The above works only for login screen.. and not for lock screen, to use the same theme file for lock screen, we need to configure it separately.
Configuring the same file for lockscreen
copy the gresource file used for login screen with below command to system default folder
sudo cp /usr/local/share/gnome-shell/theme/custom/custom-gnome-shell-theme.gresource /usr/share/gnome-shell/theme/Yaru/
$ ls /usr/share/gnome-shell/theme/Yaru/
custom-gnome-shell-theme.gresource gnome-shell-theme.gresource
$
Now to get away the changes we are doing from system upgrades.. make a local copy of the file /usr/share/gnome-shell/modes/ubuntu.json
sudo mkdir -p /usr/local/share/gnome-shell/modes
cp /usr/share/gnome-shell/modes/ubuntu.json /usr/local/share/gnome-shell/modes
Open the file ubuntu.json
sudo -H gedit /usr/local/share/gnome-shell/modes/ubuntu.json
Now edit the ubuntu.json file to use our login screen gdm3.css file with below content..
{
"parentMode": "user",
"stylesheetName": "gdm3.css",
"themeResourceName": "theme/Yaru/custom-gnome-shell-theme.gresource",
"debugFlags": ["backtrace-crashes-all"],
"enabledExtensions": ["ubuntu-dock@ubuntu.com", "ubuntu-appindicators@ubuntu.com", "desktop-icons@csoriano"]
}
Now reboot to see the changes..
To revert back to normal, remove the two files we created for lock screen purpose..
sudo rm /usr/local/share/gnome-shell/modes/ubuntu.json /usr/share/gnome-shell/theme/Yaru/custom-gnome-shell-theme.gresource
References:
How do I change login screen theme or background in Ubuntu 20.04?
How to customize Lock Screen theme in Ubuntu 20.04
- 22,460
-
Thank you for this answer. It tackles the problem, though, it's a very weird workaround. Isn't there a better way? – Pedro Rolo Feb 18 '21 at 13:56
-
Better way would be to compile the gnome-shell which may require programming language or atleast a grip on java scripts.. In that way programmer can remove the concept of eye icon. – PRATAP Feb 18 '21 at 14:34


