The 4.2 menu system is now erasing underscores and all in the menus

Continuing the discussion from a silenced thread and a suspended user, paraphrased to remove the insults an civilized conversation can take place:

Can you describe your issue in more details? Maybe give an example of what did you do, what was the expected outcome and what was the actual outcome?

Problem is…

  1. In the menu, everything isn’t separated as the words.
  2. Scripts that worked in 4.1 don’t work in 4.2 because of this stupid addition of letters and all.
  3. Addition of letter for NO REASON is just stupid and makes things more confusing to change things when there is NO REASON to change things when it’s NOT BROKEN.
  4. Underscores are removed in the menu system.
  5. Changing things when they aren’t broken is ridiculous.
  6. Doing these sorts of changes that have no reason just makes most peoples life harder.

What I would like to know is how to I stop this issue from happenning and put it back to being correct the way that it was and should be, like it was in 4.1 ?

I still don’t understand the issue.
Can you give a specific example?
Like you have a .desktop file in your qube with Name=My_App and it shows up in Qubes OS menu as “MyApp” instead of “My_App”?

I’m not sure how is it implemented in Qubes OS menu source code but I guess they escape the characters in this way like changing - to _d and _ to _u.
But I don’t know why. Only underscores seem to be accepted for some reason.

This seems to be the reason:

You can read the comments to the code, the reason is avoid collisions:

why starting with _? is it trying to prefix with delimited in this function itself? then it doesn’t look to be working as expected, as you get double delimiters in some places (like org.qubes-os.vm._vmname)

If I recall correctly, it is to avoid collisions with old-syntax desktop files. VM names cannot start with _, so old-syntax desktop files never had _ in that position. The purpose of the escaping is entirely to prevent name collisions.

At this point I think you’ll have to edit your scripts to support this change instead of trying to revert this change because there could be more and more Qubes OS code in the future that will be based on this change and you’ll have to fix the new Qubes OS code to support your old reverted menu behavior each time.

You could submit a pull request to improve the code for everyone and solve this for good :+1:

1 Like

This was very aggravating…I have a script to build my KDE menu the way I like it and it broke. I was able to fix the script.

The change basically hosed all dashes in names, which means if you follow the QubesOS naming convention (e.g., sys-net not SysNet and not sys_net), you got burned. Every menu entry and shortcut became invalid.

Worse, every single existing desktop shortcut broke, and I have about a hundred of them and no automated way to generate them.

At least now I have some notion why it happened.

1 Like