The solution is to use the gnome-shell-theme.gresource
file from the Adapta-Nokto theme.
EDIT: I updated this solution to create a link to the Adapta-Nokto gnome-shell-theme.gresource
theme file, instead of copying it. This way, the Lock screen will always use the most recent version of the Adapta-Nokto theme, whenever it is updated.
Open a terminal, and change to the gnome-shell
directory.
cd /usr/share/gnome-shell/
Backup the original gnome-shell-theme.gresource
file. The following command will only create the backup, if the current file is not a link (created using step 3).
if ! [[ -h gnome-shell-theme.gresource ]]; then sudo mv gnome-shell-theme.gresource gnome-shell-theme.gresource.original; fi
Link to the Adapta-Nokto theme's gnome-shell-theme.gresource
file.
sudo ln -frs /usr/share/themes/Adapta-Nokto/gnome-shell/gnome-shell-theme.gresource gnome-shell-theme.gresource
Reboot to enable the new Lock screen. (Just loging-out and logging-back-in is not sufficient to enable the new Lock screen, because you are repeatedly taken back to the Login screen after you enter your password).
Note: if the gnome-shell-common
package is updated at a future time, you may need to execute steps 1 thru 3 again to re-enable the Adapta-Nokto Lock screen theme.
Reference: Materia GDM Theme
Edit the file /usr/share/xsessions/ubuntu-communitheme-snap.desktop
and change the "ubuntu-communitheme" text to "myct" (change anything, not necessarily "myct") in the line starting with Exec=
sudo -H gedit /usr/share/xsessions/ubuntu-communitheme-snap.desktop
[Desktop Entry]
Name=Ubuntu with communitheme snap
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=myct /snap/communitheme/current/session
TryExec=/snap/communitheme/current/session
Type=Application
DesktopNames=communitheme:ubuntu:GNOME
X-Ubuntu-Gettext-Domain=gnome-session-3.0
create a file named myct.json in the directory /usr/share/gnome-shell/modes/
with below content.
{
"parentMode": "user",
"stylesheetName": "myct.css",
"enabledExtensions": ["ubuntu-dock@ubuntu.com", "ubuntu-appindicators@ubuntu.com"]
}
Create a text file named myct.css
in the directory /usr/share/gnome-shell/theme/
sudo touch /usr/share/gnome-shell/theme/myct.css
Open the file and paste the below content
sudo -H gedit /usr/share/gnome-shell/theme/myct.css
Content:
@import url("/snap/communitheme/current/share/gnome-shell/theme/Communitheme/gnome-shell.css");
#lockDialogGroup {
background-color: magenta; }
Reboot and then lock the screen to see your preferred color.
Best Answer
Disclaimer: playing with gdm3 files is very dangerous, small mistakes will stop access to gnome desktop session. Only tty will work. i have several times reinstalled Ubuntu in such cases. although i have successfully applied User Shell Theme to Login Screen & Lock Screen. Do this on your own risk.
I am going to apply
User Shell
ThemeAdapta-Nokto
to Login Screen and Lock Screenfor Ubuntu 18.04 only
files or folders to know:
1.
/etc/alternatives/gdm3.css
2.
/usr/share/gnome-shell/theme/ubuntu.css
3.
/usr/share/themes/Adapta-Nokto
take backups (mandatory):
1.
/usr/share/gnome-shell/theme/ubuntu.css
file. (say ubuntu.css backup)2.
/usr/share/gnome-shell/theme
folder. (say theme backup)https://we.tl/t-iDLEPaXoI0 5MB .gif file showing default lock screen theme.
Concept:
nothing below i wrote is official, based on several trail and errors i found this. proceed with your own risk.
*after several trails i found that
/etc/alternatives/gdm3.css
is playing a very big role. this file is controlling the log in screen beauty and not lock screen.*
/usr/share/gnome-shell/theme/ubuntu.css
is controlling the lock screen beauty.by default, the content in
/etc/alternatives/gdm3.css
file and/usr/share/gnome-shell/theme/ubuntu.css
file are same because/etc/alternatives/gdm3.css
file is a linked file to/usr/share/gnome-shell/theme/ubuntu.css
we need to break this link. and create a link to our
User Shell
Theme.to break the link and tell log in screen to use
User Shell
theme,run the below command:
Example:
we need to copy the
assets
folder and some more image files from/usr/share/themes/Adapta-Nokto/gnome-shell/
folder to/usr/share/gnome-shell/theme/
now log in screen will use this theme. to test it, shutdown the system. fresh start.
https://we.tl/t-uVLyw8mVga 5MB .mp4 file showing log in screen changed.
https://we.tl/t-jFZINc18q7 5MB .gif file showing lock screen unchanged.
note that, lock screen will not use this theme. as of now we changed only log in screen theme.
to change the lock screen theme, copy paste all the content from
/usr/share/themes/Adapta-Nokto/gnome-shell/gnome-shell.css
to/usr/share/gnome-shell/theme/ubuntu.css
file replacing the data in ubuntu.css file.reboot to see the change.
https://we.tl/t-8oi9JRTRpM 5MB .gif file showing lock screen changed.
want to go back to default?
copy paste all the content from backed up (say ubuntu.css backup) file into
/usr/share/gnome-shell/theme/ubuntu.css
file replacing the data in ubuntu.css file.run the below command:
copy the images from backed up folder (say theme backup) and make the folder look like this
Reboot to see default look.