Missing Icon Apps in menu antiX when I install new software

Forum Forums General Software Missing Icon Apps in menu antiX when I install new software

Tagged: , ,

  • This topic has 11 replies, 5 voices, and was last updated Jun 26-5:02 am by Xecure.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #37288
    Member
    wachin

      Hello antiX support, many times I have had the problem that the applications menu when I install a new program the icons do not appear

      I made this tutorial in antiX 19 x386 default iceWM environment

      I write in terminal:

      desktop-menu --write-out-global

      and appear:

      Writing Menu: jwm
      Traceback (most recent call last):
        File "/usr/local/bin/desktop-menu", line 313, in <module>
          build_menu()
        File "/usr/local/bin/desktop-menu", line 277, in build_menu
          text = file((USER_HOME+"/"+Var.Conf_Dir+"/"+Var.App_File), "w")
      IOError: [Errno 13] Permiso denegado: '/usr/share/desktop-menu//.jwm/menu-applications'

      Here a picture:

      menu error in antiX

      and I looked for the solution and found it, is this:

      For icewm

      sudo chmod -R 777 /usr/share/desktop-menu//.icewm/menu-applications
      sudo chown -R $ USER: $ USER /usr/share/desktop-menu//.icewm/menu-applications

      For jwm

      sudo chmod -R 777 /usr/share/desktop-menu//.jwm/menu-applications
      sudo chown -R $ USER: $ USER /usr/share/desktop-menu//.jwm/menu-applications

      For Fluxbox

      sudo chmod -R 777 /usr/share/desktop-menu//.fluxbox/menu-applications
      sudo chown -R $ USER: $ USER /usr/share/desktop-menu//.fluxbox/menu-applications

      but i think this error should not be present, and it is present since version 17.1

      Based in:

      How can I become the owner of a file/folder that root owns?
      https://askubuntu.com/a/40854/145772

      How to change permissions from root user to all users?
      https://unix.stackexchange.com/a/307914/312968

      • This topic was modified 2 years, 10 months ago by wachin.
      #37291
      Member
      Xecure
        Helpful
        Up
        0
        ::

        [Errno 13] Permiso denegado:

        Meaning, you need to execute
        sudo desktop-menu --write-out-global

        Then, you could see what errors this has.

        I am not sure, but I believe the menu already runs that “Refresh menu” as root, but I may be mistaken, and it is us, users, when executing it from terminal, that need root permissions.
        After all, the script modifies files owned by root.

        antiX Live system enthusiast.
        General Live Boot Parameters for antiX.

        #37319
        Forum Admin
        Dave
          Helpful
          Up
          0
          ::

          but i think this error should not be present, and it is present since version 17.1

          Correct, and Xecure is also correct about running sudo desktop-menu –write-out-global.
          It is to allow the menus for all window managers and all users to be automatically updated when installing an application via apt.
          The menu files in the users home folder (example: ~/.icewm/menu-applications) are a symlink to the automatically updated root file. It was done this way so that the users home folders / custom menu files are not touched yet the apt hook could update them. As the menu does not update on every click, keeping them updated is a bit troublesome. The menu entry was originally to update the users menu for that particular desktop only. Where you would install an application then click the update menu button on each desktop (before that I think it was manually edit / run the a script > file in terminal). This can still be done by removing the menu-applications file and running desktop-menu –write-out but you would loose the automatic update function with the apt hook. At one point the menu had –write-out but now has –write-out-global; I think to allow the user to update the menu but keep the automatic update. This is essentially doing the same job as the apt hook, but as Xecure says the menu should probably have sudo desktop-menu –write-out-global and a line in sudoers if it were to function this way.

          This has been a source of confusion a number of times in the past. In particular when dpkg was used to install a program so the automatic function is missed.
          Maybe there is a better way to keep the menus updated automatically that does not alter the users home but still allows the user to override without loosing the automatic update…. I am not sure what it is though. Changing the permissions of the current files to allow user edits seems like a bad idea (or at least against the read only aspect for /usr) as is enabling sudo to make the menu button work.

          /usr is shareable, read-only data. That means that /usr should
          be shareable between various FHS-compliant hosts and must not be written to.
          Any information that is host-specific or varies with time is stored elsewhere.

          Large software packages must not use a direct subdirectory under the /usr
          hierarchy.

          Maybe a better place would be to use /var/lib/desktop-menu/ and make the files user read / write there?

          Maybe it would help to add a hook to dpkg?
          However doing so by adding a file in /etc/dpkg/dpkg.conf.d/ like 99-update-menus with the contents of

          pre-invoke=/usr/local/lib/desktop-menu/desktop-menu-apt-update set
          post-invoke=/usr/local/lib/desktop-menu/desktop-menu-apt-update check

          Similar to the apt hook would result in a check for the menu needing an update with every file apt handles and an update of the menu every time there is a new file seen in the check. Obviously less than ideal.

          Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

          #37566
          Member
          wachin
            Helpful
            Up
            0
            ::

            Thanks Dave for you answers, now I understant the reason because when I use:

            sudo desktop-menu –write-out-global

            the Wine menu appear:

            Wine menu appear when set write global

            But when I install an application example:

            sudo apt-get install kate

            the Wine menu disappear:

            Wine menu dissapear

            but when I execute in the terminal:

            sudo desktop-menu –write-out-global

            the Wine menu appear again

            But this is very bad for a Linux Distro, all person that download and install it will have this problem

            #37570
            Forum Admin
            anticapitalista
              Helpful
              Up
              0
              ::

              That doesn’t look like the default menu setup under Applications. Have you edited it?

              Philosophers have interpreted the world in many ways; the point is to change it.

              antiX with runit - leaner and meaner.

              #37614
              Member
              Xecure
                Helpful
                Up
                0
                ::

                First check to see if Menu Manager is hiding your folder (you can search for “Menu Manager” in App Select)

                There is definitely something wrong with the command running on your system.
                When you execute it, the icons for the different folders change (see Educación, for example. It turns into a white icon). If you do
                desktop-menu --write-out-global
                do the icons also change? Could it be that you haven’t reverted the recommended changes you posted in your initial post before using the sudo option?

                I decided to test this on my system. I installed manuskript from a deb file, then executed sudo desktop-menu –write-out-global, and manuskript appeared in the menus (under Office). I then installed from the antiX package Installer Libreoffice main Latest, and I have both (Libreoffice stuff and Manuskript) in my menu. So this is not

                But this is very bad for a Linux Distro, all person that download and install it will have this problem

                at least not in my case.

                antiX Live system enthusiast.
                General Live Boot Parameters for antiX.

                #37628
                Member
                wachin
                  Helpful
                  Up
                  0
                  ::

                  From antix 17 to antiX 19 the wine applications and other applications like Jdownloader that not are installed with root right example:

                  sudo apt install libreoffice

                  where you see “sudo” is root right, but with wine applications like applications installed with PlayOnLinux this apps not appear in the menu antix, this is the problem. The New linux users will never know how to fix this, and I wish antiX could be within reach/available for many people that not know much about Linux terminal and all knowledge that only advanced user know. At the moment I go to try MX Linux because I want to help people that use 32 bit machines

                  Sorry my english I am spanish parlant

                  #37644
                  Forum Admin
                  Dave
                    Helpful
                    Up
                    0
                    ::

                    Thanks Dave for you answers, now I understant the reason because when I use:

                    sudo desktop-menu –write-out-global

                    the Wine menu appear:

                    **image here**

                    But when I install an application example:

                    sudo apt-get install kate

                    the Wine menu disappear:

                    **image here**

                    But this is very bad for a Linux Distro, all person that download and install it will have this problem

                    Yes it would do, when you use sudo it uses your user environment. The apt hook uses a root/system environment. Imaging if all users used sudo and therefor their user environment to update the menu. Bob would see Cindy’s menu until Pete updates because he is not seeing his menu…. You may also notice that your user’s gtk theme is used when you update the menu with sudo. Really this is where the custom user menu comes into play… you would have a similar issue when, for example, you used a custom .desktop file and put it in ~/.local/share/applications (firefox with dark theme?). From this point you should be deleting the symlink in ~/.icewm/menu-applications and making a menu with desktop-menu –write-out (maybe change the menu item back to this again). Going back into the history of things… this is what the update menu button in the root menu was for. This is because we are not (were not?) letting the system in our apps modify the users folder; especially with updates. (can you imaging the menu automatically updating but it being blank….) The unfortunate downside is that if you have custom items in the applications menu (~/.local, wine apps, etc) you will need to update the menu manually. But that already what you are needing to do no?

                    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

                    #38047
                    Member
                    PPC
                      Helpful
                      Up
                      0
                      ::

                      I recently, after taking the chance of installing the official Debian Foliate .deb file from their site, noticed that it did not appear in my menu not even after Menu > refresh menu.
                      I read this thread, took a look at my menu file and figured it out the reason: the update menu entry should be something like “gksudo desktop-menu –write-out-global”… I changed that menu entry and it worked perfectly, foliate appeared in the “Office” sub-menu.

                      P.

                      • This reply was modified 2 years, 10 months ago by PPC.
                      #38055
                      Member
                      Xecure
                        Helpful
                        Up
                        0
                        ::

                        update menu entry should be something like “gksudo desktop-menu –write-out-global”

                        I am just asking to know. Doesn’t gksudo work exactly the same as sudo? At least for me changing and adding sudo works for me. And I thought gksudo was for graphica programs. Do you get different results?

                        antiX Live system enthusiast.
                        General Live Boot Parameters for antiX.

                        #38057
                        Member
                        PPC
                          Helpful
                          Up
                          0
                          ::

                          @Xecure- as far as I know gksudo is only a GUI for entering the sudo password and then run sudo on the next command. I choose to add gksudo to the menu entry because, if I’m not already sudo (during the minutes the system saves the sudo password, so the user doesn’t need to keep entering it), and I click a menu entry that runs “sudo [command]” there won’t be a way to enter the needed password. I didn’t even test that, just assumed it…

                          P.

                          #38067
                          Member
                          Xecure
                            Helpful
                            Up
                            0
                            ::

                            Ok. I understand. You are right. probably for most users gksudo is beter alternative than having a terminal come up.

                            I would ask the dev team if they can consider changing the menu entries to do gksudo desktop-menu --write-out-global as PPC sugests, in the future.
                            I know the non-sudo version works in live for demo user (tested), but it will not work for installed (or for any other user not demo). The other solution, the one Dave proposes, to add a sudoer entry automatically after each user is created may be a bit complicated, so changing the menu may be easier.

                            antiX Live system enthusiast.
                            General Live Boot Parameters for antiX.

                          Viewing 12 posts - 1 through 12 (of 12 total)
                          • You must be logged in to reply to this topic.