How to change default theme in Ubuntu MATE Focal 20.04 Live ISO

Asked by Jags Desai

I would like to change the default theme, wallpaper, desktop icon setup, and default menu in Ubuntu MATE Focal 20.04 ISO.

So when I boot the iso from a Live USB or inside a virtual machine:

(1) Default theme would be set to "Ambiant-MATE-Dark" instead of "Ambian-MATE",

(2) Default wallpaper would be set to Black.jpg (that I need to transfer through Cubic) instead of "Green Wall"

(3) No desktop icons like "Home" and "Install Ubuntu MATE".

(4) Use "Advanced MATE Menu" instead of "Brisk Menu Launcher".

(5) Disable filesystem check when the ISO boots, if possible.

Also, would all of these changes apply to the installed OS too? (when installed from this modified ISO)

Host OS: Ubuntu MATE Focal 20.04
Cubic version: 2020.7-29-release~202007142249~ubuntu20.04.1

Many thanks for the Cubic.

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
Jags Desai
Solved:
Last query:
Last reply:
Revision history for this message
Jags Desai (jagsdesai) said :
#1

I like to add that I have gone through this AskUbuntu answer:

https://askubuntu.com/a/1222349/928088

Which says to rename the default theme directory.

The issue I'm having with the above answer is, there is no "Ambiant-MATE-Dark" direcory inside "/usr/share/icons/". Which I would like to set as a default theme.

Though once you boot the ISO, there is an option to change the theme to "Ambiant-MATE-Dark".

I can see "Ambiant-MATE" directory inside "/usr/share/icons/" but not the dark theme.

Revision history for this message
Jags Desai (jagsdesai) said :
#2

Ok, I have just found the solution to my issue 1 and 2.

I was looking in wrong directories. The correct directories would be:

#1 /usr/share/backgrounds/

#2 /usr/share/themes/

Though I haven't found the solution to my issue 3,4 and 5.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#3

For #3, are you looking to remove all desktop icons, or just these two?

For #4, have you tried removing the packages for "Brisk Menu Launcher" and adding packages for "Advanced MATE Menu" ?
(I'm not a MATE user, so if you can describe how you would do that manually on your non-customized desktop, I can suggest a direction for you to take; usually, you need to do the same thing via the command line in Cubic and configure appropriate settings).

For #5, I'll look into that.

Yes, changes apply to installed system.

Revision history for this message
Jags Desai (jagsdesai) said :
#4

#3 Yes, I would like to remove ALL desktop icons please.

#4 Brisk Menu Launcher and "Advanced MATE Menu" both are included in the ISO already.

I just searched for Brisk in Synaptic and there is a package named "mate-applet-brisk-menu" in there.

And there is a package named "mate-menu" there whose description says, "Advanced MATE Menu".

This is how I would modify on the live desktop (which is same as installed version):

1, Right-click on the taskbar on menu (by default it's Brisk menu) and un-check "Lock to panel" and then "Remove from Panel".

2, Then right-click on the taskbar and "Add to panel" and select "Advanced MATE Menu" and slide it in to the upper left corner.

Brisk menu imgur link: https://i.imgur.com/ivJ9O3n.jpg

Advanced MATE menu imgur link: https://i.imgur.com/aayNuH6.jpg

#6 When you boot the ISO / Live CD, "Window List" is on the taskbar at the bottom. Which you can drag to the taskbar on the top.

Is this can be done inside Cubic too?

Many thanks for all the help.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#5

The link you used above is one way to configure your icons or theme. However, there is a better way...

Revision history for this message
Cubic PPA (cubic-wizard) said :
#6

---------------------------------------------------------------------
[1] SETUP THEME
---------------------------------------------------------------------

[1a]

Note: In your specific case, you can skip this step, since Ambiant-MATE-Dark is already in /usr/share/themes.

On Cubic's Terminal page:

$ cd /usr/share/themes

Drag your new theme directory onto Cubic's Terminal page to copy it.

$ chown -R root:root <your new theme directory>

[1b]

This theme will be configure as default in Step #5 below.

---------------------------------------------------------------------
[2] SETUP WALL PAPER
---------------------------------------------------------------------

[2a]

On your host machine, create a file named "ubuntu-mate-custom.xml" with the following contents:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE wallpapers SYSTEM "mate-wp-list.dtd">
    <wallpapers>
        <wallpaper deleted="false">
            <name>Black</name>
            <filename>/usr/share/backgrounds/Black.jpg</filename>
            <options>zoom</options>
            <artist>Jags Desai</artist>
        </wallpaper>
    </wallpapers>
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[2b]

On Cubic's Terminal page:

$ cd /usr/share/mate-background-properties

Drag this file onto Cubic's Terminal page to copy it.

$ chown root:root ubuntu-mate-custom.xml

[2c]

On Cubic's Terminal page:

$ cd /usr/share/backgrounds

Drag the "Black.jpg" file onto Cubic's Terminal page to copy it.

$ chown root:root Black.jpg

[2d]

This background will be configure as default in Step #5 below.

---------------------------------------------------------------------
[3] NO DESKTOP ICONS
---------------------------------------------------------------------

[3a]

There are no setup steps.
"No desktop icons" will be configure as default in Step #5 below.

---------------------------------------------------------------------
[4] SETUP ADVANCED MATE MENU
---------------------------------------------------------------------

[4a]

On Cubic's Terminal page:

$ cd /usr/share/mate-panel/layouts/

$ cp familiar.layout custom-mate.layout

$ nano custom-mate.layout

Replace:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [Object briskmenu]
    object-type=applet
    applet-iid=BriskMenuFactory::BriskMenu
    toplevel-id=top
    position=0
    locked=true
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

With*:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [Object matemenu]
    object-type=applet
    applet-iid=MateMenuAppletFactory::MateMenuApplet
    toplevel-id=top
    position=0
    locked=true
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(* Note the applet-iid changed, and the object name changed from "briskmenu" "matemenu").

Replace:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [Object window-list]
    object-type=applet
    applet-iid=WnckletFactory::WindowListApplet
    toplevel-id=bottom
    position=20
    locked=true
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

With*:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [Object window-list]
    object-type=applet
    applet-iid=WnckletFactory::WindowListApplet
    toplevel-id=top
    position=15
    locked=true
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(* Note the toplevel-id and position changed).

Type <CTRL><X>, <Y>. <Enter> to save the file.

[4b]

This menu will be configure as default in Step #5 below.

---------------------------------------------------------------------
[5] CONFIGURE DEFAULTS
---------------------------------------------------------------------

On your host machine, create a file called "90_ubuntu-mate-custom.gschema.override".

Add the following to the file:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [org.mate.panel]
    default-layout='custom-mate'
    object-id-list=['matemenu', 'firefox', 'notification-area', 'indicatorappletcomplete', 'show-desktop', 'window-list', 'workspace-switcher', 'trashapplet']

    [org.mate.interface]
    gtk-theme='Ambiant-MATE-Dark'
    # icon-theme='Ambiant-MATE'

    [org.mate.Marco.general]
    theme='Ambiant-MATE-Dark'

    [org.mate.background]
    picture-filename='/usr/share/backgrounds/Black.jpg'
    show-desktop-icons=false
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

On Cubic's Terminal page:

$ cd /usr/share/glib-2.0/schemas

Drag this file onto Cubic's Terminal page to copy it.

$ chown root:root 90_ubuntu-mate-custom.gschema.override

$ glib-compile-schemas /usr/share/glib-2.0/schemas

---------------------------------------------------------------------
[6] LIVE ENVIRONMENT
---------------------------------------------------------------------

When you are done making your customizations, genetate the custom ISO, and boot into it.

There is one minor thing I couldn't figure out...

When you enter the customized Live Environment, you will not see any widgets in the top and bottom panels.
Just right click on the top panel, and select "Reset Panel" and the widgets will re-appear, along with the Advanced MATE Menu.
If I come across a solution to why the widgets do not show up upon initial login to the Live Environment, I will let you know.
However, I ~believe~ the panels will look OK, once you install the OS from the Live Environment.

Revision history for this message
Jags Desai (jagsdesai) said :
#7

It worked peferct. Here's how the live environment looks like in a virtual machine:

https://i.imgur.com/2VihQMi.jpg

Now where should I look for (1) increase the fonts size, and (2) set screen resolution to "1920x973_60.00" inside Cubic chroot.

Or should I create a new question?

Thank you so much of the detailed steps.

Revision history for this message
Jags Desai (jagsdesai) said :
#8

Well to add to my previous comment:

(1) I was able to set the cutom screen resolution by creating the file /home/.xprofile.

nano /home/.xprofile

and added:

#!/bin/sh

xrandr --newmode "1920x973_60.00" 155.00 1920 2040 2240 2560 973 976 986 1010 -hsync +vsync;
xrandr --addmode VGA-1 1920x973_60.00;
xrandr --output VGA1 --mode 1920x973_60.00;

(2) But couldn't increase font sizes. So far I have tried:

nano /usr/share/glib-2.0/schemas/90_ubuntu-mate-custom.gschema.override

and added:

[org.gnome.desktop.interface]
document-font-name='Ubuntu 16'
font-name='Ubuntu 16'
monospace-font-name='Ubuntu Mono 16'

[org.mate.caja.desktop]
font='Ubuntu 16'

[org.gnome.desktop.wm.preferences]
titlebar-font='Ubuntu Bold 14'

Then:

glib-compile-schemas /usr/share/glib-2.0/schemas

But it did not work. Only one font got increased:

[org.mate.caja.desktop]
font='Ubuntu 16'

So then I tried:

(a)
$ gsettings set org.gnome.desktop.interface document-font-name 'Ubuntu 16'

Got this error:
(process:10): dconf-WARNING **: 10:09:12.476: failed to commit changes to dconf: Cannot autolaunch D-Bus without X11 $DISPLAY
root@cubic:~#

(b)
root@cubic:~# dbus-launch

Error:
D-Bus library appears to be incorrectly set up: see the manual page for dbus-uuidgen to correct this issue. (Failed to open "/var/lib/dbus/machine-id": No such file or directory; UUID file '/etc/machine-id' should contain a hex string of length 32, not length 0, with no other text)
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-RGy6gj0mh3,guid=ce30b3ac1df4a598498573d15f488b51
DBUS_SESSION_BUS_PID=36
root@cubic:~#

(c)
root@cubic:~# dbus-launch gsettings set org.gnome.desktop.interface document-font-name 'Ubuntu 16'

Error:
D-Bus library appears to be incorrectly set up: see the manual page for dbus-uuidgen to correct this issue. (Failed to open "/var/lib/dbus/machine-id": No such file or directory; UUID file '/etc/machine-id' should contain a hex string of length 32, not length 0, with no other text)

(d)
root@cubic:~# dbus-launch dconf write /org/gnome/desktop/interface/document-font-name "'Ubuntu 16'"

Error:
D-Bus library appears to be incorrectly set up: see the manual page for dbus-uuidgen to correct this issue. (Failed to open "/var/lib/dbus/machine-id": No such file or directory; UUID file '/etc/machine-id' should contain a hex string of length 32, not length 0, with no other text)
root@cubic:~#

Revision history for this message
Cubic PPA (cubic-wizard) said :
#9

I'm glad it worked.
Please mark this question ad "Solved" and open new question(s).

Revision history for this message
Jags Desai (jagsdesai) said :
#10

Thank you so much.

Revision history for this message
Gabriele Foddis (ilovethis) said :
#11

Hi, I tried to run your guide using another theme, namely that of windows 10.
Unfortunately the new system is not applied.
Could you please provide me with support?
The theme I'm talking about is https://www.gnome-look.org/p/1013482

I copied the theme to the themes directory, edit the file override, but I can't use it. Some idea?
Thank you all.