Closed ghost closed 10 years ago
Thank you very much for this! I don't run anything debian-like myself so I was not aware of the alternatives options. Unfortunately I cannot accept it as it is...
'cd path && command' works only in fluxbox and breaks the menu in both windowmaker and icewm. I'm not against having it for fluxbox alone though, so I'll look into making it a fluxbox-only thing. Also, even in fluxbox I think it would be better if it was 'cd path ; command'. That way even if the path is not there, the command is executed.
The x-terminal-emulator thing I think I can take. One question though: is it better to look for /etc/alternatives/x-terminal-emulator or for /usr/bin/x-terminal-emulator (or maybe both)?
I just added support for path only for fluxbox in this commit: https://github.com/gapan/xdgmenumaker/commit/576e4465d45da321c26b4ca0339e542e18fc2ccf
Feel free to test it out.
Hello,
I was not aware of the windowmaker/icewm issue. What exactly do you mean by "breaking the menu"? Maybe this is because the working directory is not changed back, so putting the whole command in a subshell via () or using a pushd/popd-combination might help.
I attached the appropriate patches, at least neither of them breaks fluxbox compability (I tested).
As for the alternatives: The /usr/bin-version is supposed to be a symlink to the /etc/alternatives one, so it doesn't matter.
Best regards & happy hacking Gregor Bollerhey
Edit: It seems like github ignores attachments by mail, so I uploaded them here
http://grebo.bplaced.net/0001-Run-command-in-subshell.patch http://grebo.bplaced.net/0001-Use-pushd-popd-instead.patch
On Thu, 16 Jan 2014 09:28:52 -0800 George Vlahavas notifications@github.com wrote:
Thank you very much for this! I don't run anything debian-like myself so I was not aware of the alternatives options. Unfortunately I cannot accept it as it is...
'cd path && command' works only in fluxbox and breaks the menu in both windowmaker and icewm. I'm not against having it for fluxbox alone though, so I'll look into making it a fluxbox-only thing. Also, even in fluxbox I think it would be better if it was 'cd path ; command'. That way even if the path is not there, the command is executed.
The x-terminal-emulator thing I think I can take. One question though: is it better to look for /etc/alternatives/x-terminal-emulator or for /usr/bin/x-terminal-emulator (or maybe both)?
Reply to this email directly or view it on GitHub: https://github.com/gapan/xdgmenumaker/pull/1#issuecomment-32491049
No, unfortunately neither subshell nor pushd/popd work in windowmaker or icewm either.
In windowmaker with 'cd path && command' or 'cd path ; command' or the pushd/popd equivalents you get an error message window that the command cannot be executed. With the subshell simply nothing happens, nothing is launched.
In icewm the menu item dissappears altogether, however you do it.
About the alternatives issue, I think I'll check for both. Another thing that I'm concerned about is that maybe not every terminal emulator has an -e option. Right now I cannot think of one that doesn't and the ones I checked all do though, so I think I'll just go with it.
I just made this commit that adds support for the debian alternatives system: https://github.com/gapan/xdgmenumaker/commit/ead9e8839854567fdbb45774ba35925d13371e52
I think I'll also add support for reading the preferred terminal emulator from a ~/.config/xdgmenumaker file that will override anything, so each user can specify his preferred terminal emulator app.
So, I think I'll close this now, as both the fluxbox path issue and debian alternatives issue are resolved. Feel free to comment further. Thank you very much for your suggestions!
Tested with Fluxbox - I don't use windowmaker, though.