Page 1 of 1
dmenu openbox keybindings syntax problem?
Posted: 2. Jan 2012, 19:38
by globetrotterdk
I have just installed Salix OS LXDE 13.37 and am trying to get dmenu to work with the openbox keybindings in /home/user/.config/openbox/lxde-rc.xml I have set some keybindings to open programs that work, but dmenu doesn't want to cooperate for some reason. When I run alt-f2
Code: Select all
dmenu_run -i -nb '#000000' -nf '#FFFFFF'
I have no problem getting dmenu to appear. However, the following doesn't work when included in the file:
Code: Select all
<!-- Keybindings for dmenu-->
<keybind key="A-F3">
<action name="Execute">
<command>dmenu_run -i -nb '#000000' -nf '#FFFFFF'</command>
</action>
</keybind>
I assume there is some problem with the syntax, but I can't find where the problem is. Any ideas?
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 03:51
by kinslayer
Could it be that you have the keybinding set to Alt-F3 and not Alt-F2. Not sure if this could be the problem, but you say dmenu doesn't open when you press Alt-F2 yet the code you posted shows it is bound to A-F3.
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 09:15
by globetrotterdk
kinslayer wrote:Could it be that you have the keybinding set to Alt-F3 and not Alt-F2. Not sure if this could be the problem, but you say dmenu doesn't open when you press Alt-F2 yet the code you posted shows it is bound to A-F3.
Thanks for the reply. No, that is a typo. I'll change that right now.
I have been doing more research and it seems that dmenu performs differently from distro to distro, despite the same base. Crunchbang, Zenix and Lubuntu are all distros based on Debian, but Crunchbang links from the key binding in openbox, to a dmenu script, while Zenix and Lubuntu appear to only use a key binding in openbox. This suggests to me that dmenu was compiled differently in the individual distros or that patches were applied.
My next step is to try to link the key binding in Salix to the Crunchbang script and see what happens. BTW here is what the script looks like:
Code: Select all
#!/bin/bash
exe=`dmenu_path | dmenu -b -nb '#151617' -nf '#d8d8d8' -sb '#d8d8d8' -sf '#151617'` && eval "exec $exe"
and here is the key binding used in Crunchbang to call the script:
Code: Select all
<keybind key="A-F3">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>dmenu-bind</name>
</startupnotify>
<command>~/.config/dmenu/dmenu-bind.sh</command>
</action>
</keybind>
A work around for this whole issue would have been to use AutoKey
http://autokey.googlecode.com/, but it is unfortunately not available in Salix OS.
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 12:37
by globetrotterdk
kinslayer wrote:Could it be that you have the keybinding set to Alt-F3 and not Alt-F2. Not sure if this could be the problem, but you say dmenu doesn't open when you press Alt-F2 yet the code you posted shows it is bound to A-F3.
Sorry, that wasn't a typo after all. The point is that I can run the command inside the alt-F2 run command, so I know it works, but it doesn't work when included in an openbox key binding. I use alt-F3, which is the key binding usually used for dmenu on the distros that I have used.
I have just tried the Crunchbang solution with the bash script, and that doesn't work either, so this probably isn't an issue of compiling or patching dmenu. Very strange.
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 12:41
by Shador
Did you reload openbox settings (e.g. openbox --reconfigure)?
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 14:49
by globetrotterdk
Shador wrote:Did you reload openbox settings (e.g. openbox --reconfigure)?
Yes. No luck.
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 15:49
by Shador
I think there's some logfile in the user dir which your login manager creates. This should contain output from openbox. Not sure though cause I'm using no login manager and thus in my setup I get that output by starting with startx.
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 18:57
by globetrotterdk
Shador wrote:I think there's some logfile in the user dir which your login manager creates. This should contain output from openbox. Not sure though cause I'm using no login manager and thus in my setup I get that output by starting with startx.
I found this in .xsession-errors:
Code: Select all
Openbox-Message: Failed to execute child process "/home/user/.config/dmenu/dmenu-bind.sh" (Permission denied)
dmenu: warning: no locale support
I also found this at the beginning of the file:
Code: Select all
/etc/gdm/Xsession: Beginning session setup...
/etc/gdm/Xsession: Setup done, will execute: /usr/bin/ssh-agent -- /usr/bin/startlxde
cp: cannot stat `/usr/share/lxde/pcmanfm/pcmanfm.conf': No such file or directory
Openbox-Message: X server does not support locale.
Openbox-Message: Cannot set locale modifiers for the X server.
Any ideas how to solve this problem?
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 22:03
by Shador
Is the script you created executable? Or whatever may be wrong with them?
The second extract doesn't seem to matter. Nothing seems to go wrong there and if you don't notice any problem. So it probably doesn't indicate any problem.
Re: dmenu openbox keybindings syntax problem?
Posted: 4. Jan 2012, 22:21
by globetrotterdk
Shador wrote:Is the script you created executable? Or whatever may be wrong with them?
The second extract doesn't seem to matter. Nothing seems to go wrong there and if you don't notice any problem. So it probably doesn't indicate any problem.
OK, it looks like I solved the problem. It was obvious considering the error message, but I still don't understand the connection with dmenu. The system apparently doesn't like being set to "English locale for Denmark". As soon as I changed the locale and ran
I was able to get the original key binding running without the script.