Preinstall dash-to-dock extension in cubic custom distro.

Asked by saini

I want to get rid of default ubuntu-dock from my custom distro. I want to replace ubuntu-dock with dash-to-dock extension, i have get ridden of ubuntu-dock but dash-to-dock is not there in my distro. Can you please tell me how can i pre enable dash-to-dock extension in my distro ? I had searched whole internet but did not find any solution.

Thanks in advance :)

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
Cubic PPA
Solved:
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

[1] DOWNLOAD THE EXTENSION
---------------------------------------

[1a]

On your host machine...

Open a web browser and go to https://extensions.gnome.org/extension/307/dash-to-dock/

Next to "Download", select the gnome shell version (ex. 3.36) and extension version (ex. 68).

(You can check the gnome version using `gnome-shell --version` in Cubic on the Terminal page).

Save the *.zip file (ex. dash-to-dockmicxgx.gmail.com.v68.shell-extension.zip).

ALTERNATIVE DOWNLOAD METHOD
---------------------------------------

[1b]

If you want to download the extension from the command line in Cubic, you can use the following command. Note that the "version_tag" value will be different for different versions of the extension.

$ wget https://<email address hidden>?version_tag=15925

[2] INSTALL THE EXTENSION
---------------------------------------

[2a]

On Cubic's Terminal page...

Remove Ubuntu Dock:

$ apt purge gnome-shell-extension-ubuntu-dock

[2b]

On your host machine...

Drag the downloaded *.zip file onto Cubic's Terminal page to copy it.

[2c]

On Cubic's Terminal page...

Create the extension directory:

$ mkdir /<email address hidden>

[2d]

On Cubic's Terminal page...

Extract the extension:

$ unzip -qo dash-to-dockmicxgx.gmail.com.v68.shell-extension.zip -d /<email address hidden>

[3] CONFIGURE THE EXTENSION
---------------------------------------

[3a]

On Cubic's Terminal page...

Get the original value for "favorite-apps":

$ gsettings get org.gnome.shell favorite-apps

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
['ubiquity.desktop', 'firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'rhythmbox.desktop', 'libreoffice-writer.desktop', 'snap-store_ubuntu-software.desktop', 'yelp.desktop']
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[3b]

On your host machine...

Create a file called "90_ubuntu-custom.gschema.override".

Add the following to the file:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[org.gnome.shell]
enabled-extensions = ['<email address hidden>']
favorite-apps = ['ubiquity.desktop', 'firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'rhythmbox.desktop', 'libreoffice-writer.desktop', 'snap-store_ubuntu-software.desktop', 'yelp.desktop']

[org.gnome.shell.extensions.dash-to-dock]
click-action = 'minimize-or-overview'
custom-theme-customize-running-dots = true
custom-theme-running-dots-border-color = '#00bcd4'
custom-theme-running-dots-border-width = 0
custom-theme-running-dots-color = '#00bcd4'
custom-theme-shrink = false
dock-fixed = true
extend-height = true
icon-size-fixed = true
middle-click-action = 'launch'
# running-indicator-style = 'DOTS'
running-indicator-style = 'DEFAULT'
scroll-action = 'cycle-windows'
show-apps-at-top = true
transparency-mode = 'ADAPTIVE'

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Notes:

- List extensions you have installed and want to be *active* for the "enabled-extensions" value. Do not list extensions that are installed but should be inactive by default.

- Reuse the "favorite-apps" value from above. Add or remove items, listing them in the sequence you want them to appear in Dash-to-Dock. Keep 'ubiquity.desktop' in the list.

- Update the settings for Dash-to-Dock in the "org.gnome.shell.extensions.dash-to-dock" section per your preferences. (There may be other keys and values; these are just examples).

[3c]

On Cubic's Terminal page:

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

[3d]

On your host machine...

Drag the new "90_ubuntu-custom.gschema.override" file onto Cubic's Terminal page to copy it.

[3e]

On Cubic's Terminal page...

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

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

Revision history for this message
saini (theindian) said :
#2

Not working! I followed all the steps you suggested but when i booted in try now mode , there is no dash-to-dock.

Have any other solution ?

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

No. I do not have another solution.

Check if the extension got installed correctly...

Press <CTRL><ALT><T> to open a terminal window.

$ sudo apt -s install gnome-tweaks

Launch the "Tweaks" application

$ gnome-tweaks

Click on Extensions in the left pane.

Is Dash-to-Dock listed in the right pane?

Is it marked as active/inactive ?

Revision history for this message
saini (theindian) said :
#4

I had booted from my custom distro, now as you directed i installed gnome tweaks in try mode.

When i opened gnome tweaks application, there was not any dash-to-dock extension listed in extensions panel.

Maybe extensions did not installed correctly.

Any suggestion ?

Revision history for this message
saini (theindian) said :
#5

I also ran this command which i think lists all enabled extensions

$ gsettings get org.gnome.shell enabled-extensions

It listed ['<email address hidden>', '<email address hidden>']

So what do you think is it okay ?

I can't figure out whether extension installed correctly or not.

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

The good news is that your "90_ubuntu-custom.gschema.override" configuration is being loaded.

What is the output of:

$ ls -1 /usr/share/gnome-shell/extensions/

Revision history for this message
saini (theindian) said :
#7

When i ran this command

$ ls -1 /usr/share/gnome-shell/extensions/

It listed all the extensions including the <email address hidden> extension.

When i booted from my distro. I used dconf-editor to view some dconf configurations.

Inside it is showing <email address hidden> In enabled-extensions configuration.

But in the tweaks and extensions app, there is not any dash-to-dock extension is listed.

So, what do you think where is the problem ?

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

All of this is very promising.

I'll customize an ISO and install Dash-to-Dock to see if I missed something in the instructions above.

Just so I can recreate your situation, you are customizing Ubutu 20.04, correct?

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

I wanted to mention something (you may had already noticed this)...

If you remove the Ubuntu Dock, this also removes the ubuntu desktop packages.

$ apt remove gnome-shell-extension-ubuntu-dock
The following packages will be REMOVED:
  gnome-shell-extension-ubuntu-dock ubuntu-desktop ubuntu-desktop-minimal

(I didn't notice negative consequences of this in my testing).

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

[1] DOWNLOAD THE EXTENSION
------------------------------------------------------------

[1a]

On your host machine...

Open a web browser and go to https://extensions.gnome.org/extension/307/dash-to-dock/

Next to "Download", select the gnome shell version (ex. 3.36) and extension version (ex. 68).

(You can check the gnome version using `gnome-shell --version` in Cubic on the Terminal page).

Save the *.zip file (ex. dash-to-dockmicxgx.gmail.com.v68.shell-extension.zip).

ALTERNATIVE DOWNLOAD METHOD
------------------------------------------------------------

[1b]

If you want to download the extension from the command line in Cubic, you can use the following command. Note that the "version_tag" value will be different for different versions of the extension.

On Cubic's Terminal page...

$ wget https://<email address hidden>?version_tag=15925

[2] INSTALL THE EXTENSION
------------------------------------------------------------

[2a]

On Cubic's Terminal page...

Remove Ubuntu Dock:

$ apt remove gnome-shell-extension-ubuntu-dock

This will also remove ubuntu-desktop ubuntu-desktop-minimal

[2b]

On your host machine...

Drag the downloaded *.zip file onto Cubic's Terminal page to copy it.

[2c]

On Cubic's Terminal page...

Create the extension directory:

$ mkdir /<email address hidden>

[2d]

On Cubic's Terminal page...

Extract the extension:

$ unzip -qo dash-to-dockmicxgx.gmail.com.v68.shell-extension.zip -d /<email address hidden>

[2e]

Fix the bug in the file permissions.

On Cubic's Terminal page...

$ cd /<email address hidden>
$ ls -la metadata.json
$ chmod +r metadata.json
$ ls -la metadata.json

[3] CONFIGURE GNOME SHELL TO USE THE EXTENSION
------------------------------------------------------------

[3a]

On Cubic's Terminal page...

Get the original value for "favorite-apps":

$ gsettings get org.gnome.shell favorite-apps

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
['ubiquity.desktop', 'firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'rhythmbox.desktop', 'libreoffice-writer.desktop', 'snap-store_ubuntu-software.desktop', 'yelp.desktop']
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[3b]

On Cubic's Terminal page:

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

$ nano 90_ubuntu-custom.gschema.override

Add the following to the file:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[org.gnome.shell]
disable-user-extensions = false
enabled-extensions = ['<email address hidden>']
favorite-apps = ['ubiquity.desktop', 'firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'rhythmbox.desktop', 'libreoffice-writer.desktop', 'snap-store_ubuntu-software.desktop', 'yelp.desktop']
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

$ glib-compile-schemas ./

This will update the file named "gschemas.compiled" in this directory.

If you get the message, "This entire file has been ignored," then there is an error in your configuration file, and you must fix it before proceeding.

Notes:

- List extensions you have installed and want to be *active* for the "enabled-extensions" value. Do not list extensions that are installed but should be inactive by default.

- Reuse the "favorite-apps" value from above. Add or remove items, listing them in the sequence you want them to appear in Dash-to-Dock. Keep 'ubiquity.desktop' in the list.

- Be sure to include "disable-user-extensions = false"

- Do not include settings for dash-to-dock in this file; these will be configured below.

[4] CONFIGURE THE EXTENSION
------------------------------------------------------------

[4a]

On Cubic's Terminal page...

$ cd /<email address hidden>/schemas

$ nano org.gnome.shell.extensions.dash-to-dock.gschema.xml

- The XML file lists all available settings for Dash-to-Dock

- Valid values for various settings are listed at the top of the file.

- Change the settings for Dash-to-Dock per your preferences.

- You can edit this file on your host computer by extracting it from the original downloaded *.zip archive. After making your customizations, simply drag it onto Cubic's Terminal page to copy it. Remember to use the command "chown root:root <file name>" to change ownership of the copied file.

Hare some example settings...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <key type="b" name="dock-fixed">
      <default>true</default>
      <summary>Dock always visible</summary>
      <description>Dock is always visible</description>
    </key>

    <key type="b" name="show-apps-at-top">
      <default>true</default>
      <summary>Show application button at top</summary>
      <description>Show appplication button at top of the dash</description>
    </key>

    <key type="b" name="extend-height">
      <default>true</default>
      <summary>Extend the dock container to all the available height</summary>
    </key>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[4b]

$ cd /<email address hidden>/schemas

$ glib-compile-schemas ./

This will update the file named "gschemas.compiled" in this directory.

If you get the message, "This entire file has been ignored," then there is an error in your configuration file, and you must fix it before proceeding.

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

I discovered a few things:

(1)

There is a small "bug" in the extension. This is why you could not see the extension in the Tweaks or Extensions applications.

The extension's "metadata.json" file does not have the read permissions, preventing Ubuntu from "reading" information about the extension. As a result, the extension is not loaded by Ubuntu.

You might want to open an bug report at https://github.com/micheleg/dash-to-dock/issues to fix this. Indicate that the file "metadata.json" needs to have read permissions for all users, like the other files included in the extension.

Please share the link to the bug report, and I will confirm the bug so it gets fixed for other users.

In the mean time, you can set the correct permissions in step [2e] of Comment #10 above.

(2)

It seems that user extensions are disabled by default.

This can be fixed by adding "disable-user-extensions = false" in the "90_ubuntu-custom.gschema.override" file in step [3b] of Comment #10 above.

(3)

The extension can not be configured in "90_ubuntu-custom.gschema.override".

You must use the extension's *.xml file to configure it in step [4a] of Comment #10 above.

Revision history for this message
saini (theindian) said :
#13

Thanks CUBIC PPA Team for your support. The #10 Answer worked for me.

I really appreciate your work.

Thanks for helping me :)

Revision history for this message
saini (theindian) said :
#14

Thanks Cubic PPA, that solved my question.