Gsettings change budgie panel question

I am creating a post-install bash script to run right after I have installed UB Budgie on any pc. The script contains mostly gsettings set commands and pulls another script to install the Office fonts.

To find the right gsettings, I do the following, for example:

Goal
Move top-panel to left side and set size to 53 (treshold for bigger app icons)

How to figure this out?
Check what settings are modified in the dconf database, then find the right scheme/key/value in gsettings.

~$ dconf watch /
.com.solus-project.budgie-panel.panels.{646c1a06-70da-11ea-b086-ffb616e1ec64}.size
  53

.com.solus-project.budgie-panel.panels.{646c1a06-70da-11ea-b086-ffb616e1ec64}.location
  'left'

.com.solus-project.budgie-panel.panels.{646c1a06-70da-11ea-b086-ffb616e1ec64}.size
  53

Now I can use that information to check what the exact gsettings set command should look like:

~$ gsettings list-recursively com.solus-project.budgie-panel
(...)
com.solus-project.budgie-panel panels ['646c1a06-70da-11ea-b086-ffb616e1ec64']
(...)

For this particular case I have a question:

Is there a uniquely generated string for each panel?
If so, how can I reach my goal via a CLI command that should work on any PC?

yes

This example python code iterates through each panel and sets the key in each panel - for example “size”

The easiest way to customise your panel is to use a layout file - look at https://github.com/UbuntuBudgie/budgie-extras/tree/master/budgie-extras-daemon/data for examples

Save your .layout file in /usr/share/budgie-desktop/layouts

To apply - set the layout name (layout filename without the .layout extension) in gsettings key “layout” com.solus-project.budgie-panel and then reset your panel

hi,
how can I get current layout from a running panel? If I dump /com/solus-project/budgie-panel/ I get the same thing I’m using in my customization script, just there isn’t any reference to a layout

Sil

You can’t get a “layout text file” from the current panel - well not easily without some-sort of in-depth bash scraping and fiddling.

easier dumping the whole panel and loading it in freshly installed machines via script, then!
I don’t fear scripting but if I can do something with a not-so-great effort, why trying to doing it with a horrible effort? :smile:

Sil

Given that all eventually needed applets are already installed on the destination system, this is what I had tried here : Export Budgie Desktop settings to another session?

So you « dump » these from a working system and « load » them on the one to configure.

dconf dump /com/solus-project/ > /your_path/of_choice_to/dconf-dump-solus-project
dconf dump /org/ubuntubudgie/ > /your_path/of_choice_to/dconf-dump-ubuntubudgie

What’s missing here :
⋅ themes, icons, fonts ( but these don’t need so much time to set as panels and applets )
⋅ maybe sometimes some applets config’ are not passed ( things like custom string format for time in calendar, or the font size in show-time )

Well I made my layout file, it wasn’t that difficult only issue: some applets seem to have completely different names!

For example, Workspace Switcher is called Visual Space in the examples on Github.

Mine can be found here, I haven’t tested it yet (afraid to mess up my current panel, although it should be 1:1 identical). Unsure also if Seperators should be numbered just like Spacers.

The ID= field is the name of the applet - look at the .plugin file in /usr/lib/budgie-desktop/applets and the .plugin files in the subfolders.

The […] field is the name in the children= part - so it can be anything e.g.
"children=flintstone

[flintstone]

"

So the string is whatever you want e.g. “separator 1” so that you can easily understand what that part refers to.

1 Like

2 posts were split to a new topic: Where is the calendar applet?

I successfully created the layout file widescreen.layout and placed it in /usr/share/budgie-desktop/layouts.
I changed the gsettings value and checked it:

asterix@Idefix:~$ gsettings get com.solus-project.budgie-panel layout
'widescreen'

Logged out and logged in again, but no change. I checked the Budgie Desktop settings, still only see the default Top Panel shown. How can I reset this?

budgie-panel --reset --replace &

That didn’t help…

asterix@Idefix:~/Downloads$ sudo budgie-panel --reset --replace &
[2] 7310
asterix@Idefix:~/Downloads$ ** Message: 22:16:00.459: manager.vala:562: Resetting budgie-panel configuration to defaults
** Message: 22:16:00.460: manager.vala:451: Resetting dconf path: /com/solus-project/budgie-panel/
** Message: 22:16:00.612: manager.vala:625: Creating default panel layout

(budgie-panel:7311): GLib-CRITICAL **: 22:16:00.640: g_file_test: assertion 'filename != NULL' failed

(budgie-panel:7311): GLib-GObject-WARNING **: 22:16:00.735: ../../../gobject/gsignal.c:1763: parameter 1 of type 'SynapseResultSet' for signal "SynapseDataSink::search-done" is not a value type

(budgie-panel:7311): GLib-CRITICAL **: 22:16:00.744: g_file_test: assertion 'filename != NULL' failed

** (budgie-panel:7311): CRITICAL **: 22:16:00.809: Client.vala:88: Initializing client failed

(budgie-panel:7311): Indicator-Applet-WARNING **: 22:16:00.883: unable to open indicator service file directory: Error opening directory “/usr/share/unity/indicators”: No such file or directory

** (budgie-panel:7311): CRITICAL **: 22:16:01.364: string_to_string: assertion 'self != NULL' failed

** (budgie-panel:7311): CRITICAL **: 22:16:01.365: string_to_string: assertion 'self != NULL' failed

** (budgie-panel:7311): CRITICAL **: 22:16:01.365: string_to_string: assertion 'self != NULL' failed

** (budgie-panel:7311): CRITICAL **: 22:16:01.365: string_to_string: assertion 'self != NULL' failed

** (budgie-panel:7311): CRITICAL **: 22:16:01.365: string_to_string: assertion 'self != NULL' failed
** Message: 22:16:01.534: libsession.vala:50: DESKTOP_AUTOSTART_ID not set, session registration may be broken (not running budgie-desktop?)
** Message: 22:16:01.550: DBusService.vala:64: Service registration succeeded

** (budgie-panel:7311): WARNING **: 22:16:01.553: relevancy-backend-zg.vala:56: Unable to check Zeitgeist data sources: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.zeitgeist.Engine was not provided by any .service files

** (budgie-panel:7311): WARNING **: 22:16:01.556: libsession.vala:67: Error registering with session manager: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
sys:1: Warning: invalid (NULL) pointer instance
sys:1: Warning: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (budgie-panel:7311): WARNING **: 22:16:01.654: relevancy-backend-zg.vala:113: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.zeitgeist.Engine was not provided by any .service files

** (budgie-panel:7311): WARNING **: 22:16:01.654: relevancy-backend-zg.vala:197: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.zeitgeist.Engine was not provided by any .service files
asterix@Idefix:~/Downloads$ 

Sudo isn’t needed, that’d do it for root.

duh, that was stupid of me. I’m trying to do this for the current user. It works but I still see all those error messages. Worse, it seems something goes wrong when the Network applet is used.

If I don’t have Network applet, my applets are correctly positioned at the start (topside of the Left Panel) and end as stated in my layout file.
However if I only add Network applet start to it and reset, all my start applets are shown in the middle of the Panel.
When I remove Network applet and reset again, all start applets are back at the top of the panel.

Why does this happen? This is the layout file I am testing with.

[Panels]
Panels=Left Panel

[Left Panel]
Children=Spacer 1;Calendar;Separator 1;DropBy;AppIndicator;QuickNote;Spacer 2;Night;Spacer 3;Network;Separator 3;AppMenu;

Position=Left
Size=53

[Spacer 1]
ID=Spacer
Alignment=start

[Calendar]
ID=Calendar
Alignment=start

[Separator 1]
ID=Separator
Alignment=start

[DropBy]
ID=DropBy

[AppIndicator]
ID=AppIndicator Applet
Alignment=start

[QuickNote]
ID=QuickNote
Alignment=start

[Spacer 2]
ID=Spacer
Alignment=start

[Night]
ID=Night Light
Alignment=start

[Spacer 3]
ID=Spacer
Alignment=start

[Network]
ID=Network
Alignment=start

[Separator 3]
ID=Separator
Alignment=end

[AppMenu]
ID=AppMenu
Alignment=end

Is this a bug? Because when I use my layout file without Network and add Network manually via Budgie Settings > Left Panel, it appears in Center. When I move it up, everything at Start comes down, in between top and center.

It makes absolutely no sense what is happening here.

When I remove Network from my layout file and reset, it looks like expected:

Now I add Network via Budgie Desktop Settings, it automatically appears in Center:

Now I try to move it up, to make it sit below Night Light, what happens is unexpected:

In Budgie Desktop Settings it is shown under Start but on the panel itself, everything has shifted to Center. This is not suppose to happen and I can’t solve it.

This is 20.04. I don’t seem to have this issue on 19.10.

That’s a bug with the network applet that is fixed in v1.0.2 - this version I am waiting on Canonical to approve before its uploaded to 20.04

2 Likes

Thanks so much… I have spend over an hour trying to figure out the cause and finding out the culprit. Happy to know a solution will be available soonish.

Also, all those errors are warnings from Vala code that seems to make a lot of string == string assertions, it seems? You can ignore them, that always happens.

1 Like

I discovered the System Tray applet, perhaps it will be removed in future versions, but for now it shows the WiFi icon :slight_smile:

The only thing left to configure now are the Applications shown by default on IconTaskList. When I remove the Store, I see this happening:

$ dconf watch /
/com/solus-project/budgie-panel/instance/icon-tasklist/{e6ba9d6f-be17-11ea-a8ba-fdfd965e1ba5}/pinned-launchers
  ['firefox.desktop', 'nemo.desktop', 'libreoffice-writer.desktop', 'ubuntu-budgie-welcome_budgie-welcome.desktop']

Unfortunately that string is probably different for every device/install, how can I change this via command line for a post install script? I checked the plugin folder, but it does not contain an editable file other than the .plugin file.

Just fyi, when you run this command budgie-panel --reset --replace & to reset the panel , some Budgie Desktop settings are reset to their default value. The one I found is dark mode. Enable it, run this command and notice how it is disabled.