Forum › Forums › antiX-development › Development › bug in script desktop-menu? antiX 19.x 32bit/64bit
- This topic has 55 replies, 6 voices, and was last updated May 13-10:53 pm by Robin.
-
AuthorPosts
-
April 29, 2022 at 10:45 am #82262Member
Robin
::Here comes a first functioning testing sample of the two scripts. It’ll work fine with antiX 19 and antiX 21 both, on 64bit as well as 32bit.
No language files for the UI still. Install instructions inside the attached archive file. Should work out of the box.See screenshot from some postings above to find out what this GUI script is meant for.
The inversed text sort order options for the entries (starting with comment) were added to enable the menu get set correctly for languages which read from right to left. Thanks, Marcelo, for this suggestion.Would be glad if some people could extensively test this to find out whether it works reliable on other types of hardware than mine (I have checked everything already on my devices)
Additional remark:
desktop-menu is crafted now to handle all possibly needed word orders of the menu entries. But this slows down the script execution remarkably, so it’s not that nice by now. Possibly there are python programming techniques I don’t know of, to speed up these simple but multiple logical operations for building up the desired menu entry strings. But if this task actually can’t get accelerated, we have to think about separate script versions for different language groups. At least in our region nobody ever will use e.g. the menu order »Comment — Name — GenericName«. So we could comment out all the unneeded conditional branches simply, which will bring back speed on execution immediately. As said before, maybe somebody more familiar with python than me might be able to speed up this processing by using advanced programming techniques, without need to reduce the variety. But for a test run it’s enough, it works as expected, and on a machine with not too much users it doesn’t make much difference, whether this script runs some additional split seconds or not.- This reply was modified 1 year ago by Robin. Reason: tgz File type not accepted. Trying tar.gz
- This reply was modified 1 year ago by Robin. Reason: gz file type not accepted, trying zip
Attachments:
Windows is like a submarine. Open a window and serious problems will start.
April 30, 2022 at 8:39 am #82357MemberRobin
::Bugfix update:
During testing performed by marcelocripe (many thanks!) it turned out that on his 64bit machines yad swapped the output strings of the two paned yad windows, so the desktop-menu script was invoked with wrong values, which has never happened on my 32bit testing device. The update to ver 0.91 fixes this issue, I solved it by using two temp files in /dev/shm instead of a single variable to catch the yad output.
New version is present for download now at gitlab:
https://gitlab.com/Robin-antiX/antix-menu-configInstall instructions see readme file at this site.
Also the translation resources are present at transifex now:
https://www.transifex.com/antix-linux-community-contributions/antix-contribs/antix-menu-config/Windows is like a submarine. Open a window and serious problems will start.
April 30, 2022 at 9:07 am #82358Forum Admin
anticapitalista
::Nice work Robin.
It is best to package antiX-menu-config without the desktop-menu python script since that is already present in desktop-menu-antix (I know it needs to be updated).
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 30, 2022 at 9:10 am #82359MemberPPC
::Hi Robin – I’ve been localizing this to pt-pt –
I found a “bug” on your text:
On the options related to displaying, in the menu, only Icons or only Text, the entry “Icons only, no Text” is ok, but the next entry is not- “Names only, no Icons”- it should refer to “Text”, not particularly to “Name” (because you have options in which the Name is not part of the Text displayed in the menu).This, script, using the localized .desktop files will probably improve a lot the usability of antiX, probably to new users! Nicely done!
P.
April 30, 2022 at 4:18 pm #82378MemberRobin
::@anticapitalista : I’m glad you like it. The part taking care of the handling of setting flags for processing other users menu files, depending on the chosen update mode setting, determining the behaviour of desktop-menu invoked by an apt-hook has to get designed still in detail, but maybe I can try to package it already nevertheless, allowing to use what is present already. Sure, without the patched desktop-menu script.
Additional thought: Maybe the easiest way to handle it is actually to use flags and let the other users files get processed always on user logon when an update flagfile (trigger) for this user is present. This way we can avoid the need to read other users config files, to allow their stored settings get applied, and also we don’t need to care for the additional split seconds the desktop-menu script takes now longer in processing: It will not get executed for all users the same time by a specific user, so the amount of time doesn’t cumulate on him.
Once you have decided how the fix in antiX for the multiuser-different-locales problem will look in detail, I can start with crocheting the missing counter part in the GUI script then.@PPC : Many thanks for your hint (and also for starting with the localisation)! My choice of “name” here instead of “text” was intentionally (actually it read “text” originally), since the way it is organised by now the name entry only will get displayed with this option. I noticed this command line option being present in desktop-menu script last minute only, so it was added “as is” to the GUI, whithout recognising that it would be actually possible to combine it with all the other display options. I’ve checked already, this behaviour can be changed, so your proposal will fit then.
Windows is like a submarine. Open a window and serious problems will start.
April 30, 2022 at 9:12 pm #82381Forum Admin
Dave
::@Robin, please see here for gitlab https://gitlab.com/antiX-Dave/desktop-menu-antix. For the main antiX version https://gitlab.com/antiX-Linux/desktop-menu-antix
My gitlab has an updated version of desktop-menu that includes the changes you tested from BobC (–comments) as well as a slightly different way to changing the text order (–order=ngc). Hopefully this has a faster execution time for you. It also defaults to using the program names, but if you specify –generic-names or –comments it will switch to either or both. However if you want to keep the program names then you will need to also add the –names option. When using multiple options it is best to specify an order otherwise the default output would be messy.As to setting the menu-applications file on a per user basis.
Using a symlink specific to each user (which should probably reside in /var/cache/desktop-menu/?) would not really be any different than editing the user ~/.*/menu-applications files directly. Other than the user can “ignore” the automatic updates by removing the symlink. Idealistically for a per user symlink setup, desktop-menu would check for files that it could update in a specific location and update them using the apt hook. Then the user (via manually removing the symlink and target or through an app) could enable and disable automatic updates on a per user per window manager basis.Maybe, does this work?
su mkdir -p /var/cache/desktop-menu/ chown root:users /var/cache/desktop-menu/ chmod 770 /var/cache/desktop-menu/ exit mkdir -p /var/cache/desktop-menu/<code>whoami</code>/.fluxbox/ touch /var/cache/desktop-menu/<code>whoami</code>/.fluxbox/menu-applications ln -s /var/cache/desktop-menu/<code>whoami</code>/.fluxbox/menu-applications ~/.fluxbox/menu-applications. desktop-menu --write-outThen if it does, does it follow the user’s translation?
If so the apt hook can crawl /var/cache/desktop-menu/ for valid users (assumed by name in the base desktop-menu dir) and executesu username -c desktop-menu --write-out.
Then simply removing the user’s folder from /var/cache/desktop-menu/ would stop the update for that user without needing a config file.Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
May 1, 2022 at 9:27 am #82422MemberPPC
::Hi folks – this recent thread is probably related to messing with the menu entries – https://www.antixforum.com/forums/topic/fluxbox-menu-problem-after-update/
I noticed that, in my antiX 19.X, in the fluxbox menu, the only entry with the “)” does not work – probably that is compatible with fluxbox’s menu structure or the script that generates the menu (it has “))”…
The menu line that refuses to work is this:
[exec] (Centro de Controlo (em consola)) {x-terminal-emulator -e antiX-cli-cc} </usr/share/icons/papirus-antix/48x48/apps/command-line-control-centre.png>If I remove the “)” it then works fine, it displays it’s icon and summons the correct executable
P.
May 1, 2022 at 11:53 am #82432Forum Admin
Dave
::Thanks PPC. Yes noticed this a bit back.
Does the newer version in my gitlab work better?
It should be using “-” instead of “()” to separate the texts.I think this newer version may also be coming in an update already.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
May 1, 2022 at 7:24 pm #82458Member
marcelocripe
::I noticed that, in my antiX 19.X, in the fluxbox menu, the only entry with the “)” does not work – probably that is compatible with fluxbox’s menu structure or the script that generates the menu (it has “))”…
We tests that we did yesterday, Robin and I, IceWM and JWM worked perfectly. Fluxbox had problems with parentheses.
The separation by a dash ” – ” of the Name, GenericName and Comment is good in the Brazilian Portuguese language, I don’t know if the parentheses is necessary in other languages.The next step is to use the .desktop files with various translations that are in GitLab contribs and create a .desktop file for the antix-menu-config program?
Thank you so much for making antiX much more understandable in any language.
– – – – –
I noticed that, in my antiX 19.X, in the fluxbox menu, the only entry with the “)” does not work – probably that is compatible with fluxbox’s menu structure or the script that generates the menu (it has “))”…
Nós testes que fizemos ontem, o Robin e eu, o IceWM e JWM funcionaram perfeitamente. Já o Fluxbox apresentou problemas com o parenteses.
A separação por um traço ” – ” do Name, GenericName e Comentário ficam bons no idioma Português do Brasil, eu não sei se o parenteses é necessário em outros idiomas.O próximo passo ser feito é utilizar os arquivos .desktop com várias traduções que estão no GitLab contribs e criar um arquivo .desktop para o programa antix-menu-config?
Muito obrigado por tornarem o antiX muito mais compreensível em qualquer idioma.
May 1, 2022 at 9:41 pm #82473MemberRobin
::Many thanks @Dave for your updated version of the desktop-menu script. Great!
It’s really better to use the dictionary method to lookup all the different sort orders. It runs way faster than my laborious conditional branches tree, and incorporates all possible sort order, no need to comment out anything anymore for gaining speed back. I have tried it in antiX 19 (32bit full, recently full apt upgraded). I really like the new command line option –order you’ve added instead of all my separate options, one for each order. I’ll adapt my GUI script accordingly, this is no problem.But I noticed some real problems still and have some additional suggestions.
1.) The icons are still displayed as missing icon on 19.x , while they are actually present on the system and used when either modifying the line containing the missing icon entry, or when using the old 1.0 version of the script. The icons are only removed (replaced by “missing”) by your new version from the menus, and this includes the antiX icon itself also.
2.) The slash “-” instead of braces “(…)” looks ridiculous in some languages, when a name is combined to the generic name with a slash. It’s kind of children’s speach then. Since there is a bug in one of the window managers present, not allowing closing braces being used by default, and also Marcelo told me it is understood the opposite way in his language, I believe best would be to add an extra option to either use braces, slash, or blank to have the second displayed string separated. I believe this could be done by simply putting the separators and the respectively needed blanks into two variables, set by a command line option right at startup, This won’t slow down the execution and also not make things complicated.
3.) Differently to the test version I’ve seen before, now the second level of menu is included to the changes. This is a bit problematically, since the program category entries present there wouldn’t need any kind of generic name or comment added the same way the program names need. I believe it should get excluded again from applying the generic names and comments to this menu level. In case somebody wants to have it this way actually, a command line option like e.g. –categories could be added to allow him to activate it.
4.) Differently from the testing version now the generic names and comments are added, even in case they are empty or the very same string is part of the name string already, which happens quite commonly in some languages. This was sorted out by the test version, so the menus looked fine even when a .desktop file did not follow strictly the rules. This function needs to be error tolerant in this concern, since users will probably install software packages not fit for this. Moreover Marcelo told me about a specifically brasilian problem: Many people in his country can’t make anything of the English style names entries, when by default the name only is present. So in this language the generic name entries are part of the name already. Example
Name:Email Client Thunderbird Generic Name: Email ClientOn the one hand this makes it impossible to switch off the generic name for somebody who really don’t want it to have it present, on the other hand the entry gets doubled now in case the script doesn’t sort it out. The visible result in menu would be something like
Email Client - Email Client Thunderbird
Also some program authors put the very same string in name and generic name. Example:Name:Thunderbird Email Client Generic Name: Thunderbird Email ClientNow the line in menu would read
Thunderbird Email Client - Thunderbird Email Client
Also this kind of nonsense was suppressed by the testing version.
Compare the visible result in menu when trying my slightly slower testing version of the script I have linked to some posts above with your recent version, then you’ll understand what is needed. I believe this kind of operation also could profit from accelerated advanced python functions instead of my conditional branches structure only.5.) The option –no-icons fails for me constantly. The applications menu doesn’t appear at all when used. Possibly we need to add kind of place holder image (either 1x1px or a transparent 16x16px) to make IceWM accept it.
6.) Could you please check whether you can keep the –no-text option from my testing version? Some people like it that way, they are used to this style from their smartphones (And no, I don’t like it this way either.)
7.) The –icon-size option doesn’t change the size of icons in menu (noticed in IceWM, maybe other WM are concerned also)
Would be great if you could check and if possible improve these points in your script version before it goes to main antiX repo.
P.S.: All the intense testings Marcelo mentions in the posting above were all done with my slower test version of the script, since when we did it your new recent version was not present still.
Windows is like a submarine. Open a window and serious problems will start.
May 1, 2022 at 10:21 pm #82475Member
marcelocripe
::I had forgotten to mention a JWM issue, when Name, GenericName and Comment are displayed at the same time, the text is quite long and the submenu of the categories is always displayed to the left and it is not possible to see the text of these menus .
The first image “ver-0.91ver.3.0-4-test-antiX-menu-config 2022-04-30 (8).png”, the menu is correctly positioned to the right.
The second image “ver-0.91ver.3.0-4-test-antiX-menu-config 2022-04-30 (9).png”, the menu is incorrectly positioned to the left.
– – – – –
Eu havia me esquecido de mencionar um problema do JWM, quando a opção Name, GenericName and Comment são exibidas ao mesmo tempo, o texto fica bastante longo e o submenu das categorias sempre é exibida para a esquerda e não é possível ver o texto destes menus.
A primeira imagem “ver-0.91ver.3.0-4-test-antiX-menu-config 30-04-2022 (8).png”, o menu foi posicionado corretamente para a direita.
A segunda imagem “ver-0.91ver.3.0-4-test-antiX-menu-config 30-04-2022 (9).png”, o menu foi posicionado incorretamente para a esquerda.
May 1, 2022 at 11:05 pm #82480Member
marcelocripe
May 2, 2022 at 1:47 am #82487Member
iznit
::there is a bug in one of the window managers present, not allowing closing braces being used by default
To suit allmenus and languages, would a unicode symbol serve as a good separator character?
≡
∎
☀
➤
►
➽
➼
➺
╰┈➤
✿
☆
★
❖
◈
◉May 2, 2022 at 2:58 am #82489Forum Admin
Dave
::@ Robin,
for #1, what theme are you using and do you have the name of a specific .desktop file that demostrates the problem. As the fix you had in your testing script was already accessed a few lines prior in the original and all the icons seem to appear for me.for #2, asside from looking ridiculous is it functionally a problem at the moment. If it is not functionally a problem are we able to address this issue when the main core functionality is working? Otherwise I second guess myself if the script is working or if the text is incorrectly missing.
for #3, ok will need to think this over to find the best method of implementation.
for #4, this I know but I wanted to make sure the other portions were functioning correctly before adding this function back in (also trying to speed up the functions).
for #5, OK I see icewm needs the icon field present. I only tested in fluxbox. This should be possible to fix by adding a set of quotations “” around the icon field in the template file (/usr/share/desktop-menu/templates/icewm.template)
Menu_Start = menu "%s" "%s" { Menu_Program = menufile "%s" "%s" Program = prog "%s" "%s" %sfor #6, Will look at the no text option. This I had missed while comparing the scripts.
@ Marcello
I noticed this as well when BobC had sent me a copy of his edits to add the –comments option. It also affected me in icewm as well if I recall correctly, but the menu went off the screen to the right side. Another issue I noticed is that it was very difficult to navigate through the full menu with only the mouse as the submenu would overlap the root menu and I would then need to use the arrow keys to collapse the submenu to move to the next item in the root menu. I am not certain there is a way to handle this aside from shortening / limiting the amount of text; which will always cut the longer text in an inconvenient spot.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
May 2, 2022 at 6:47 am #82490MemberRobin
::@Dave #1
antiX 19 (full) 4.19.0-222-antix.1-686-smp-pae most recently apt-upgraded running on Live USB non persistent Rox-IceWM(Same on frugal with persistence or static)
Theme is set to
"Clearview blue medium"
Changed theme for testing to"Ice Clear looks medium" "Blue day medium" "Truth Ice 1.0 medium" "Truth Ice 1.0 large" "Sunny Day small"No difference, always the same icons fail when using the new script version 3.2.
Running 1.0 fixes the icons again.The strange thing is: Yes, I noticed, exactly the call entry.getIcon() is present already some lines above in the very beginning of your find_icon function.
But the icons originally found must get lost by one of the tests performed in the following lines, so in the end the missing-icon image is displayed for some of the entries (always the same ones, it doesn’t arbitrarily switch)
All I could find out is: simply calling entry.getIcon() a second time instead of statically link to the missing icon image brings them all back immediately, which means to me: they must have been there before the code on the lines in between was executed.(see screenshots)
It is quite difficult to guess the true name of the application file, I see them translated only, So I list the back to English re-translated names from my menu here instead. But using grep I caught the paths/filenames containing the translated strings so I added these.
The following icons are missing:From the categories menu: -------------------------- -The antiX category icon (can't find desktop file for this entry) -The wine category icon (can't find desktop file for this entry) From the antiX category: ------------------------ -Change Wifi Program /usr/share/applications/antix/antix-wifi-switch.desktop -Save persistence /usr/share/applications/antix/persist_save.desktop -antiX updater /usr/share/applications/antix/updater.desktop -Chroot rescue scan /usr/share/applications/antix/chroot-rescue-scan.desktop -Date and time /usr/share/applications/antix/set_time-and_date.desktop -Setup Live persistence /usr/share/applications/antix/persist_setup.desktop -configure persistence /usr/share/applications/antix/persist-config.desktop -remaster /usr/share/applications/antix/remaster.desktop -yad-color /usr/share/applications/antix/yad-color.desktop From the settings category -------------------------- -ArandR /usr/share/applications/arandr.desktop -Font DPI /usr/share/applications/antix/set-dpi.desktop -Keyboard layouts /usr/share/applications/fskbsetting.desktop -Menu-Manager /usr/share/applications/antix/menu_manager.desktop -Qt5 settings /usr/share/applications/qt5ct.desktop From the development category ----------------------------- -Texteditor vim tiny /usr/share/applications/vim.tiny.desktop From Graphics category ---------------------- -Screenshot /usr/share/applications/antix/screenshot.desktop From Internet category ---------------------- -GPRS-EDGE-UMTS Panel /usr/share/applications/umts-panel.desktop -Search Bar /usr/share/applications/antix/search-bar.desktop From System category: --------------------- -App select /usr/share/applications/antix/app-select.desktop -Autostart of services /usr/share/applications/antix/sysv-rc-conf.desktop -GDebi Packet installer /usr/share/applications/gdebi.desktop -Control Center /usr/share/applications/antix/antiX-cli-cc.desktop -RoxFiler as root /usr/share/applications/antix/rox-as-root.desktop From Multimedia category: ------------------------- -GUVCView /usr/share/applications/guvcview.desktop -Speaker test /usr/share/applications/antix/speaker-test.desktop -MPS-youtube /usr/share/applications/mps-youtube.desktop -Poor Mans radio player /usr/share/applications/antix/pmrp.desktop From the acessoirs category: ---------------------------- -calcurse /usr/share/applications/antix/calcurse.desktop -unhide/start updater Two files with identical name and gname entries, can't tell which is actually in use /usr/share/applications/updater-menu-non-kde.desktop /usr/share/applications/updater-menu-kde.desktopWindows is like a submarine. Open a window and serious problems will start.
-
AuthorPosts
- You must be logged in to reply to this topic.

