- This topic has 11 replies, 5 voices, and was last updated Jun 26-5:02 am by Xecure.
-
AuthorPosts
-
June 12, 2020 at 12:06 pm #37288Member
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-globaland 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:

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-applicationsFor jwm
sudo chmod -R 777 /usr/share/desktop-menu//.jwm/menu-applications sudo chown -R $ USER: $ USER /usr/share/desktop-menu//.jwm/menu-applicationsFor Fluxbox
sudo chmod -R 777 /usr/share/desktop-menu//.fluxbox/menu-applications sudo chown -R $ USER: $ USER /usr/share/desktop-menu//.fluxbox/menu-applicationsbut 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/145772How 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.
June 12, 2020 at 12:18 pm #37291Member
Xecure
::[Errno 13] Permiso denegado:
Meaning, you need to execute
sudo desktop-menu --write-out-globalThen, 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.June 12, 2020 at 7:22 pm #37319Forum Admin
Dave
::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 ofpre-invoke=/usr/local/lib/desktop-menu/desktop-menu-apt-update set post-invoke=/usr/local/lib/desktop-menu/desktop-menu-apt-update checkSimilar 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
June 17, 2020 at 8:44 am #37566Member
wachin
::Thanks Dave for you answers, now I understant the reason because when I use:
sudo desktop-menu –write-out-global
the Wine menu appear:

But when I install an application example:
sudo apt-get install kate
the Wine menu disappear:

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
June 17, 2020 at 9:37 am #37570Forum Admin
anticapitalista
::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.
June 18, 2020 at 3:59 am #37614Member
Xecure
::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.June 18, 2020 at 7:21 am #37628Member
wachin
::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
June 18, 2020 at 11:17 am #37644Forum Admin
Dave
::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
June 26, 2020 at 3:09 am #38047MemberPPC
::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.
June 26, 2020 at 4:25 am #38055Member
Xecure
::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.June 26, 2020 at 4:36 am #38057MemberPPC
::@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.
June 26, 2020 at 5:02 am #38067Member
Xecure
::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-globalas 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. -
AuthorPosts
- You must be logged in to reply to this topic.