Comments (6)
Select a theme that supports Gnome Shell
The theme you chose must meet one of the following requirements:
-
Your theme file must contain a
gnome-shell-theme.gresource.xml
file and agnome-shell.css
file. -
If your theme already comes with a pre-compiled
gnome-shell-theme.gresource
file, it may work with Gnome Shell.
If the theme you selected does not meet at least one of the above requirements, it can not be used with Gnome Shell.
Execute the following in Cubic's Terminal page
(a) Install the theme
-
Install your selected theme. For this example, we will use the Materia theme.
apt-add-repository universe apt install materia-gtk-theme
The theme files should be installed to
/usr/share/themes
.Note, the installation instructions for your theme may be different. In this example, Materia theme has a package available for Ubuntu.
(b) Apply the Desktop theme (Window Decorations & Widgets)
-
Create a
gschema
override file.cd /usr/share/glib-2.0/schemas nano 90_ubuntu-settings.gschema.override
-
Add the following to this file.
[org.gnome.desktop.interface:ubuntu] gtk-theme = "Materia"
(You may include other
gsettings
schemas, keys, and values in this file as as necessary for your customizations). -
Save the file and exit
nano
.Ctrl+X, Y, Enter
-
Compile the
gschema
override file.glib-compile-schemas /usr/share/glib-2.0/schemas/
(c) Create a gresource file for Gnome Shell (Top Bar, Dock, Lock Screen) & GDM (Login Screen)
- If the theme contains a
gnome-shell-theme.gresource.xml
file and agnome-shell.css
file, proceed with this step. - If the theme already contains
gnome-shell-theme.gresource
file, skip to step (d).
-
Change to your selected theme's
gnome-shell
directory (i.e. the directory that contains thegnome-shell-theme.gresource.xml
file).cd /usr/share/themes/Materia/gnome-shell
-
Check if the GDM
*.css
file is already specified by your theme.cat gnome-shell-theme.gresource.xml | grep "gdm[3]*.css"
(Note, Ubuntu 20.04 or 21.04 require
gdm3.css
, and Ubuntu 21.10+ requiresgdm.css
). -
If you do not see a result from the above command, edit
gnome-shell-theme.gresource.xml
.nano gnome-shell-theme.gresource.xml
Below the line
<file>gnome-shell.css</file>
, add the two lines forgdm3.css
andgdm.css
as shown.<file>gnome-shell.css</file> <file alias="gdm3.css">gnome-shell.css</file> <file alias="gdm.css">gnome-shell.css</file>
(Note, Ubuntu 20.04 or 21.04 require
gdm3.css
, and Ubuntu 21.10+ requiresgdm.css
). -
Make a backup of the current
gresource
file.cd /usr/share/gnome-shell mv gnome-shell-theme.gresource gnome-shell-theme.gresource.original
-
Install the following package, required for the
glib-compile-resources
command.apt install libglib2.0-dev-bin
-
Compile the
gresource
file.cd /usr/share/themes/Materia/gnome-shell glib-compile-resources --target="/usr/share/gnome-shell/gnome-shell-theme.gresource" gnome-shell-theme.gresource.xml
(d) Verify the compiled theme file is available
-
Verify that the
gnome-shell-theme.gresource
file exists.cd /usr/share/gnome-shell ls -la
- If your theme already contained a
gnome-shell-theme.gresource
file, make sure it was placed in/usr/share/gnome-shell
during installation. - If you generated this file in step (c), check its timestamp to make sure it is a new file.
- If your theme already contained a
(e) Apply the Gnome Shell theme (Top Bar, Dock, Lock Screen)
-
Edit
modes/ubuntu.json
.This applies the theme in the Live Session and the installed user sessions.
cd /usr/share/gnome-shell nano modes/ubuntu.json
-
Set the values of
stylesheetName
andthemeResourceName
as shown.{ "parentMode": "user", "stylesheetName": "gnome-shell.css", "themeResourceName": "gnome-shell-theme.gresource", "debugFlags": ["backtrace-crashes-all"], "enabledExtensions": ["[email protected]", "[email protected]", "desktop-icons@csoriano"] }
-
Save the file and exit
nano
.Ctrl+X, Y, Enter
-
Edit
modes/ubiquity.json
.This applies the theme in the Live Session when the "Try Ubuntu / Install Ubuntu" dialog is displayed.
cd /usr/share/gnome-shell nano modes/ubiquity.json
-
Set the values of
stylesheetName
andthemeResourceName
as shown.{ "hasWindows": true, "components": ["polkitAgent", "networkAgent"], "stylesheetName": "gnome-shell.css", "themeResourceName": "gnome-shell-theme.gresource", "panel": { "left": [], "center": ["dateMenu"], "right": ["a11y", "keyboard", "aggregateMenu"] } }
-
Save the file and exit
nano
.Ctrl+X, Y, Enter
(f) Apply the GDM theme (Login Screen)
-
If you are using Ubuntu 20.04 or 21.04, use the following command to set the GDM theme.
update-alternatives --set gdm3-theme.gresource /usr/share/gnome-shell/gnome-shell-theme.gresource
-
You can verify the current setting using the following command.
update-alternatives --query gdm3-theme.gresource
-
The output will look like this. Note the
Value
line in the output.Name: gdm3-theme.gresource Link: /usr/share/gnome-shell/gdm3-theme.gresource Status: manual Best: /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource Value: /usr/share/gnome-shell/gnome-shell-theme.gresource Alternative: /usr/share/gnome-shell/gnome-shell-theme.gresource Priority: 10 Alternative: /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource Priority: 15
-
-
If you are using Ubuntu 21.10+, use the following command to set the GDM theme.
update-alternatives --set gdm-theme.gresource /usr/share/gnome-shell/gnome-shell-theme.gresource
-
You can verify the current setting using the following command.
update-alternatives --query gdm-theme.gresource
-
The output will look like this. Note the
Value
line in the output.Name: gdm-theme.gresource Link: /usr/share/gnome-shell/gdm-theme.gresource Status: manual Best: /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource Value: /usr/share/gnome-shell/gnome-shell-theme.gresource Alternative: /usr/share/gnome-shell/gnome-shell-theme.gresource Priority: 10 Alternative: /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource Priority: 15
-
Generate the customized ISO and test
- Navigate through the pages in Cubic until you reach the Finish page.
- Test the generated ISO using the Test button in Cubic, a virtual machine, or USB stick.
from cubic.
Will give it a try when I get a chance. Thanks for the help.
from cubic.
From your other question, I see that you are customizing Ubuntu 20.04.
Are you creating your own theme, or are you installing an existing theme that you want to use as your Gnome Shell theme? If existing theme, which theme and what is the download link or apt package you are using (so I can try with the same theme)?
from cubic.
I use a combination of different parts of themes. Right now I'm using Gnome-professional-40-dark for the shell theme and WhiteSur-dark-solid for applications. The icons are Mkos-Big-Sur-Night. I want to make my own but haven't found any good instructions on how to make themes for gnome.
from cubic.
I was wondering how to get a custom gnome-shell theme active on live iso file?
I wanted to know the same?
from cubic.
One way to do it is to use the User Themes extension, and enable it as I have described in issue #10.
However, there is a nicer way to do this, that does not rely on an extension. It will take me a few days to write it up, and I'll share it as soon as I can.
from cubic.
Related Issues (20)
- multi-user mode broken on 24.04 variants
- generated .iso doesn't boot once burnt to USB stick
- Cubic doesn't work together with autoinstall identity. HOT 1
- 24.04 Custom ISOs not reflecting snap removals / some installed app icons not displayed HOT 2
- Errors when install cubic on ubuntu 24.04 HOT 2
- i have error while mount Ubuntu 18.04 on cubic HOT 1
- cubic project folder selection page HOT 2
- Change Kernel version in Virtual Environment HOT 2
- Cubic can be exploited to allow an unprivileged user to elevate their privileges to root on the host system HOT 3
- How to prevent single user mode from GRUB in debian? HOT 5
- After booting created ISO it looks like broken installed OS HOT 2
- PopOs 22.04 custom iso works like a charm but the install fails. HOT 4
- Can a custom iso be used as a starting point for another custom iso HOT 1
- Can a custom iso be used as a starting point for another custom iso HOT 2
- Project fails to build when host machine has changed its kernel HOT 3
- Penguins' Eggs
- No root device specified, after try update kernel in iso. HOT 7
- random user login issue on iso boot HOT 4
- filesystem.manifest-minimal-remove should not contain system-wide language packages from filesystem.manifest-remove HOT 3
- how to load an existing project folder HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cubic.