Bug 27699

Summary: Cannot add a object to the Cinnamon panel due to missing file in /usr/share/cinnamon/applets/panel-launchers@cinnamon.org/
Product: Mageia Reporter: Kristoffer Grundström <lovaren>
Component: RPM PackagesAssignee: Joseph Wang <joequant>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: ouaurelien
Version: 8   
Target Milestone: ---   
Hardware: All   
OS: Linux   
URL: https://askubuntu.com/questions/232053/how-to-add-a-shortcut-to-a-command-to-the-cinnamon-menu#comment1308386_348855
Whiteboard:
Source RPM: cinnamon-4.8.3-1.mga8.src.rpm CVE:
Status comment:

Description Kristoffer Grundström 2020-12-01 22:53:23 CET
Description of problem: I have been trying to make a new panel launcher for the Nightly version of Firefox and I have tried to use the cinnamon-menu-editor (which for the record looks a lot like alacarte), but clicking the button to add a new object to the panel fails to give me a new window to start adding the properties of the new launcher. Instead I get this in the terminal window:

Traceback (most recent call last):
  File "/usr/share/cinnamon/cinnamon-desktop-editor/cinnamon-desktop-editor.py", line 423, in <module>
    Main()
  File "/usr/share/cinnamon/cinnamon-desktop-editor/cinnamon-desktop-editor.py", line 351, in __init__
    editor = LauncherEditor(self.orig_file, self.launcher_cb)
  File "/usr/share/cinnamon/cinnamon-desktop-editor/cinnamon-desktop-editor.py", line 61, in __init__
    self.builder.add_from_file(self.ui_file)
gi.repository.GLib.Error: gtk-builder-error-quark: /usr/share/cinnamon/cinnamon-desktop-editor/launcher-editor.ui:70:1 Invalid object type 'XAppIconChooserButton' (6)

Version-Release number of selected component (if applicable): 4.0.10-2

How reproducible: All the time.

Steps to Reproduce:
1. Open a terminal.
2. Type cinnamon-menu-editor and hit Enter/Return button.
3. Click on the Internet category and then click the Add new object button on the right. Nothing happens.
Comment 1 Kristoffer Grundström 2020-12-01 22:54:08 CET
The problem is described here as well:

https://askubuntu.com/questions/232053/how-to-add-a-shortcut-to-a-command-to-the-cinnamon-menu
Comment 2 Kristoffer Grundström 2020-12-01 22:55:03 CET
https://askubuntu.com/questions/232053/how-to-add-a-shortcut-to-a-command-to-the-cinnamon-menu#comment1308386_348855

tells you that cinnamon-add-panel-launcher.py is missing in /usr/share/cinnamon/applets/panel-launchers@cinnamon.org/
Comment 3 Kristoffer Grundström 2020-12-01 22:56:21 CET
I see that we have 4.6.7 in Cauldron.
Can we push it?
Comment 4 Aurelien Oudelet 2020-12-02 17:57:45 CET
Hi, thanks for reporting this bug.

A missing file in a package, this should be resolved in M7.

Cinnamon 4.6 has prerequisite that are beyond the scope of updating M7. It can be a candidate to a backport but this will be to far from our resources.
Also, note that upstream has pushed 4.8 version to his git repository, this can be landed to Cauldron for M8.

Assigned to the package maintainer.

(Please set the status to 'assigned' if you are working on it)

CC: (none) => ouaurelien
Source RPM: cinnamon => cinnamon-4.0.10-2.mga7.src.rpm
Assignee: bugsquad => joequant
Component: Backports => RPM Packages

Comment 5 Aurelien Oudelet 2021-07-06 13:14:19 CEST
Mageia 7 is EOL since July 1st 2021.
There will not have any further bugfix for this release.

You are encouraged to upgrade to Mageia 8 as soon as possible.

@reporter, if this bug still apply with Mageia 8, please let us know it.

@packager, if you work on the Mageia 7 version of your package, please check the Mageia 8 package if issue is also present. In this case, please fix the Mageia 8 version instead.

This bug report will be closed OLD if there is no further notice within 1st September 2021.
Comment 6 Kristoffer Grundström 2021-07-27 00:34:29 CEST
This is also now seen in a fresh installation of Mageia 8.

Any chance that it's fixed in Cauldron already?

Version: 7 => 8

Comment 7 Kristoffer Grundström 2021-07-27 01:12:04 CEST
https://github.com/linuxmint/cinnamon/issues/9207 mentions a similar issue regarding adding an applet and I see a comment claiming that xapp needs to be installed.

Which of these hits am I supposed to install then?

[kristoffer@localhost applications]$ urpmq -y xapp
lib64xapp-devel
lib64xapp-gir1.0
lib64xapp1
lib64xapp1-debuginfo
libxapp-devel
libxapp-gir1.0
libxapp1
lxappearance
lxappearance-debuginfo
lxappearance-debugsource
lxappearance-devel
lxappearance-obconf
lxappearance-obconf-debuginfo
lxappearance-obconf-debugsource
python3-xapp
python3-xapps-overrides
task-xapps
xapps
xapps-debuginfo
xapps-debugsource
xapps-mate
xapps-mate-debuginfo
Comment 8 Kristoffer Grundström 2021-08-26 04:52:55 CEST
This problem still exists even thou I've performed a fresh installation of Mageia 8 again.
Comment 9 Kristoffer Grundström 2021-12-24 02:56:22 CET
This is still valid in Mageia 8.
Comment 10 Kristoffer Grundström 2021-12-25 04:01:06 CET
I reported the issue upstream here: https://github.com/linuxmint/cinnamon/issues/10556
Comment 11 Kristoffer Grundström 2022-01-09 20:50:31 CET
Ping! I still see it and I can't add an object in the editor. Nothing happens when I press the button.
Lewis Smith 2022-01-14 19:49:39 CET

CC: (none) => lewyssmith

Comment 12 Lewis Smith 2022-01-14 20:05:39 CET
Sorry for leaving you.
First, can you clarify what package you are talking about. I find nothing like cinnamon-menu-editor, nor 'applets' for Cinnamon.

To add a taskbar shortcut for any menu entry, all that is neccessary is to right-click it and from the pop-up menu, choose 'add to panel'. I have just tried this on an installed application; it worked.

If this is not what you want to do, please explain again.
Comment 13 Kristoffer Grundström 2022-01-16 23:04:07 CET
(In reply to Lewis Smith from comment #12)
> Sorry for leaving you.
> First, can you clarify what package you are talking about. I find nothing
> like cinnamon-menu-editor, nor 'applets' for Cinnamon.
> 
> To add a taskbar shortcut for any menu entry, all that is neccessary is to
> right-click it and from the pop-up menu, choose 'add to panel'. I have just
> tried this on an installed application; it worked.
> 
> If this is not what you want to do, please explain again.

Yes, I absolutely know that you can do that with INSTALLED applications/programs, but if you as me like to try upcoming releases of Firefox through its Nightly tar archive I find it impossible to add the Firefox binary to the panel as a new starter.

According to my research using urpmf cinnamon-menu-editor it's either in

/usr/bin/cinnamon-menu-editor

or in

cinnamon:/usr/share/cinnamon/cinnamon-menu-editor

Right....

If I go to /usr/share/cinnamon/ and run cinnamon-menu-editor and then click the button to add a new object......no popup window appears and as console output I get this:

Traceback (most recent call last):
  File "/usr/share/cinnamon/cinnamon-desktop-editor/cinnamon-desktop-editor.py", line 424, in <module>
    Main()
  File "/usr/share/cinnamon/cinnamon-desktop-editor/cinnamon-desktop-editor.py", line 351, in __init__
    editor = LauncherEditor(self.orig_file, self.launcher_cb)
  File "/usr/share/cinnamon/cinnamon-desktop-editor/cinnamon-desktop-editor.py", line 61, in __init__
    self.builder.add_from_file(self.ui_file)
gi.repository.GLib.Error: gtk-builder-error-quark: /usr/share/cinnamon/cinnamon-desktop-editor/launcher-editor.ui:70:1 Invalid object type 'XAppIconChooserButton' (6)

Looking with ls in /usr/share/cinnamon/cinnamon-menu-editor I see that the mentioned file launcher-editor.ui isn't there, in fact there's a py file missing as well I think:

[kristoffer@localhost cinnamon-menu-editor]$ ls
cinnamon-menu-editor.ui  cme/

I compared the directories for desktop-editor and menu-editor and they seem to be different......

[kristoffer@localhost cinnamon-desktop-editor]$ ls
cinnamon-desktop-editor.py*  directory-editor.ui  launcher-editor.ui  __pycache__/

Is it meant to be that way?
Comment 14 Lewis Smith 2022-01-17 19:20:38 CET
Thank you for this fuller explanation. I forgot to try urpmf.
Certainly, the binary 'cinnamon-desktop-editor' is in package 'cinnamon'.
As is 'cinnamon-menu-editor'.

So you want to create a shortcut to a manually installed binary. Doing:
 $ /usr/bin/cinnamon-menu-editor
like you describe above, it displays a 'main menu' window with all the entries; similarly for the 'internet' sub-menu. Clicking the 'new item' button does nothing but (from terminal) outputs the Traceback errors you note above. So this is reproduceable.

Trying the other, I got:
 $ /usr/bin/cinnamon-desktop-editor
Usage: cinnamon-desktop-editor.py [options]
cinnamon-desktop-editor.py: error: You must select a mode to run in

This has no man entry, but
 $ cinnamon-desktop-editor -h
Usage: cinnamon-desktop-editor.py [options]
Options:
  -h, --help            show this help message and exit
  -o ORIG_FILE, --original=ORIG_FILE
                        Path of original .desktop file
  -d DEST_DIR, --directory=DEST_DIR
                        Destination directory of the new launcher
  -f DESKTOP_NAME, --file=DESKTOP_NAME
                        Name of desktop file (i.e. gnome-terminal.desktop)
  -m MODE, --mode=MODE  Mode to run in: launcher, directory, panel-launcher or
                        nemo-launcher
so usage is a mystery.

Shortcuts can be:
- in a menu
- on the panel
- on the desktop
I can find no way of adding one anywhere for a given [binary] file. Much is due to my ignorance of Cinnamon, which I never use normally. If there is a Cinnamon user forum (there must be), please ask ther how to achieve what you want. I suggest you express it along the lines of the start of this paragraph.
----------
In the meantime, ping Joseph, who nurses Cinnamon.
See especially comment 13.

Source RPM: cinnamon-4.0.10-2.mga7.src.rpm => cinnamon-4.8.3-1.mga8.src.rpm
CC: lewyssmith => (none)

Comment 15 Kristoffer Grundström 2022-03-27 22:28:55 CEST
Update: As I try to run cinnamon-menu-editor in Cauldron I get this error now:

Traceback (most recent call last):
  File "/usr/bin/cinnamon-menu-editor", line 12, in <module>
    from cme import MainWindow
  File "/usr/share/cinnamon/cinnamon-menu-editor/cme/MainWindow.py", line 34, in <module>
    from cme.MenuEditor import MenuEditor
  File "/usr/share/cinnamon/cinnamon-menu-editor/cme/MenuEditor.py", line 23, in <module>
    from cme import util
  File "/usr/share/cinnamon/cinnamon-menu-editor/cme/util.py", line 22, in <module>
    from collections import Sequence
ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)

No window appears so it seems like the menu editor is even more broken now.
Comment 16 Kristoffer Grundström 2022-05-27 22:17:46 CEST
Problem still exists.
Any fix coming before Mageia 9 is released as stable?
Comment 17 Kristoffer Grundström 2022-10-24 12:38:14 CEST
For some unknown reason this seems to be fixed in Cauldron now as I installed alacarte and ran it and clicked the button to add a new object and then I got an empty pop-up window so I'll therefore close this as RESOLVED FIXED.

Should anyone here find that it isn't fixed in their system, please feel free to reopen with additional valuable info.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 18 Kristoffer Grundström 2022-10-24 23:13:50 CEST
Can someone please push an update for cinnamon-menu-editor to Mageia 8? That would be great.