I have a customized "mytheme.css" that used to be able to show the loginscreen and unlockscreen wallpapers or any other icons using the url command. Their paths used were specified relative to the "mytheme" directory, i.e. /usr/share/gnome-shell/theme/mytheme
. For example,
/*login & unlock screens wallpaper*/
#lockDialogGroup {
background: #2c001e url("assets/lockDialogGroup.jpg");
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
/* switch colors */
.toggle-switch-us:checked {
background-image: url("assets/toggle-on.svg");
}
However, recently somehow that syntax for the url command does not work for the loginscreen but works for the unlockscreen in Ubuntu 18.04. Meaning, I would be able to see my wallpaper in the unlockscreen but not in the loginscreen.
To fix this issue, I currently have to use the file
command. However, doing so requires the full path of the wallpaper to be stated which is quite long. For example, the above lines with url command have to be revised to:
background: #2c001e url(file:///usr/share/gnome-shell/theme/mytheme/assets/lockDialogGroup.jpg);
and
background-image: url(file:///usr/share/gnome-shell/theme/mytheme/assets/toggle-on.svg);
What I don't understand is that according to css, given that my theme's css file full path is /usr/share/gnome-shell/theme/mytheme/mytheme.css
, the reference directory should be /usr/share/gnome-shell/theme/mytheme/
, and if the full path of the wallpaper is /usr/share/gnome-shell/theme/mytheme/assets/lockDialogGroup.jpg
, I should simply only need to declare a relative path like so to show the wallpaper:
background: #2c001e url("assets/lockDialogGroup.jpg");
It is strange that this command works for the unlockscreen but does not work for the loginscreen. Bear in mind I had earlier set /usr/share/gnome-shell/modes/ubuntu.json
to show:
{
"parentMode": "user",
"stylesheetName": "mytheme/mytheme.css",
"enabledExtensions": [
"[email protected]",
"[email protected]"
]
}
So what gives?