#1043291 mate-tweak: can't change MATE panel layout by mate-tweak because of missed mate-volume-control-applet executable

#1043291#5
Date:
2023-08-08 16:19:14 UTC
From:
To:
Dear Maintainer,

please repeat the following steps to reproduce the issue:
1. Install task-mate-desktop with mate-tweak to get full MATE desktop
2. Launch mate-tweak from terminal
3. Go to Panel tab, then try to switch panel layouts using drop-down menu

Expected results:
* user is able to select any available MATE Panel layouts - one from Fedora,
GNOME, openSUSE

Actual results:
* user is unable to select needed panel layout, gets the following error
messages in the terminal:

```
$ mate-tweak
Window Manager is: marco-no-composite
System installed layouts:
['fedora', 'default', 'opensuse']
Current layout: opensuse
/usr/bin/mate-tweak:684: PyGTKDeprecationWarning: The "buttons" argument must
be a Gtk.ButtonsType enum value. Please use the "add_buttons" method for adding
buttons. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.Dialog(title, None, Gtk.DialogFlags.MODAL |
Gtk.DialogFlags.DESTROY_WITH_PARENT,
/usr/bin/mate-tweak:684: PyGTKDeprecationWarning: The "flags" argument for
dialog construction is deprecated. Please use initializer keywords: modal=True
and/or destroy_with_parent=True. See:
https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.Dialog(title, None, Gtk.DialogFlags.MODAL |
Gtk.DialogFlags.DESTROY_WITH_PARENT,
/usr/bin/mate-tweak:690: PyGTKDeprecationWarning: Using positional arguments
with the GObject constructor has been deprecated. Please specify keyword(s) for
"label" or use a class specific constructor. See:
https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label = Gtk.Label(text)
Switching to: fedora
Traceback (most recent call last):
  File "/usr/bin/mate-tweak", line 1047, in combo_fallback
    self.additional_tweaks(schema, key, value[1])
  File "/usr/bin/mate-tweak", line 1031, in additional_tweaks
    self.replace_panel_layout(panel_layout)
  File "/usr/bin/mate-tweak", line 768, in replace_panel_layout
    self.enable_applets()
  File "/usr/bin/mate-tweak", line 571, in enable_applets
    pid = subprocess.Popen(['mate-volume-control-applet'], stdout=DEVNULL,
stderr=DEVNULL).pid
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mate-volume-control-
applet'
/usr/bin/mate-tweak:684: PyGTKDeprecationWarning: The "buttons" argument must
be a Gtk.ButtonsType enum value. Please use the "add_buttons" method for adding
buttons. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.Dialog(title, None, Gtk.DialogFlags.MODAL |
Gtk.DialogFlags.DESTROY_WITH_PARENT,
/usr/bin/mate-tweak:684: PyGTKDeprecationWarning: The "flags" argument for
dialog construction is deprecated. Please use initializer keywords: modal=True
and/or destroy_with_parent=True. See:
https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.Dialog(title, None, Gtk.DialogFlags.MODAL |
Gtk.DialogFlags.DESTROY_WITH_PARENT,
/usr/bin/mate-tweak:690: PyGTKDeprecationWarning: Using positional arguments
with the GObject constructor has been deprecated. Please specify keyword(s) for
"label" or use a class specific constructor. See:
https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label = Gtk.Label(text)
Switching to: default
Traceback (most recent call last):
  File "/usr/bin/mate-tweak", line 1047, in combo_fallback
    self.additional_tweaks(schema, key, value[1])
  File "/usr/bin/mate-tweak", line 1031, in additional_tweaks
    self.replace_panel_layout(panel_layout)
  File "/usr/bin/mate-tweak", line 768, in replace_panel_layout
    self.enable_applets()
  File "/usr/bin/mate-tweak", line 571, in enable_applets
    pid = subprocess.Popen(['mate-volume-control-applet'], stdout=DEVNULL,
stderr=DEVNULL).pid
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mate-volume-control-
applet'
/usr/bin/mate-tweak:684: PyGTKDeprecationWarning: The "buttons" argument must
be a Gtk.ButtonsType enum value. Please use the "add_buttons" method for adding
buttons. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.Dialog(title, None, Gtk.DialogFlags.MODAL |
Gtk.DialogFlags.DESTROY_WITH_PARENT,
/usr/bin/mate-tweak:684: PyGTKDeprecationWarning: The "flags" argument for
dialog construction is deprecated. Please use initializer keywords: modal=True
and/or destroy_with_parent=True. See:
https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.Dialog(title, None, Gtk.DialogFlags.MODAL |
Gtk.DialogFlags.DESTROY_WITH_PARENT,
/usr/bin/mate-tweak:690: PyGTKDeprecationWarning: Using positional arguments
with the GObject constructor has been deprecated. Please specify keyword(s) for
"label" or use a class specific constructor. See:
https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label = Gtk.Label(text)
Switching to: opensuse
Traceback (most recent call last):
  File "/usr/bin/mate-tweak", line 1047, in combo_fallback
    self.additional_tweaks(schema, key, value[1])
  File "/usr/bin/mate-tweak", line 1031, in additional_tweaks
    self.replace_panel_layout(panel_layout)
  File "/usr/bin/mate-tweak", line 768, in replace_panel_layout
    self.enable_applets()
  File "/usr/bin/mate-tweak", line 571, in enable_applets
    pid = subprocess.Popen(['mate-volume-control-applet'], stdout=DEVNULL,
stderr=DEVNULL).pid
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mate-volume-control-
applet'
```

Please note that Ayatana indicators are not installed.
The same happens on Debian 11 (oldstable, bullseye).

#1043291#10
Date:
2023-08-09 06:02:12 UTC
From:
To:
Hi Norbert,

thanks for reporting this issue.

Would you suggest adding mate-media to Depends: field of mate-tweak?
Any alternative approach thinkable?

Mike

#1043291#15
Date:
2023-08-09 15:02:16 UTC
From:
To:
Thanks, Mike!

The problem here is caused by `mate-volume-control-applet` file location.
It came from `mate-media`, you are right about this package
Problem persists even with the installed `mate-media` package.
In Debian 10 (buster) it was located in PATH -
`/usr/bin/mate-volume-control-applet` (see
https://packages.debian.org/search?suite=buster&arch=any&mode=path&searchon=contents&keywords=mate-volume-control-applet
).
But in Debian 11 and newer it is located in non-PATH place -
`/usr/libexec/mate-volume-control-applet` (see
https://packages.debian.org/search?suite=bullseye&arch=any&mode=path&searchon=contents&keywords=mate-volume-control-applet).
So it can't be found by `mate-tweak` (see
https://sources.debian.org/src/mate-tweak/22.10.0-2/mate-tweak/?hl=78#L571
).

My local quick and dirty hack is the following:
```
sudo ln -sf /usr/libexec/mate-volume-control-applet
/usr/local/bin/mate-volume-control-applet
```

But I would suggest fixing this problem in the `mate-tweak` script - for
example you can call this applet by full path -
`/usr/libexec/mate-volume-control-applet`.
It is still applicable for default Debian installation without Ayatana
indicators.

#1043291#20
Date:
2023-08-10 07:03:05 UTC
From:
To:
Hi Norbert,
(Cc:ing Martin Wimpress)

Ah, now I see more clearly.

The correct fix for mate-tweak will probably be to check both
locations (/usr/bin/ and /usr/libexec/) and execute the
mate-volume-control-applet found (with preference to /usr/libexec,
maybe).

Can you propose such a patch to mate-tweak upstream?

Thanks + Greets,
Mike

#1043291#25
Date:
2023-08-10 07:25:33 UTC
From:
To:
I'm not too familiar with the internals of the mate-tweak.

So I have reported a bug to upstream
https://github.com/ubuntu-mate/mate-tweak/issues/94 .
I hope to see Martin's actions there.

Thanks, Mike!