Peculiar difference in starting an application

Greetings all,

I am posting in this sub-forum because I do not know, which entity, xterm, shell, or Openbox, is responsible for the behavior described below.

I have mail/aerc correctly configured, judging by the fact that when I start xterm (via an Openbox menu), and then invoke mail/aerc from the xterm, it follows the configuration file in that upon attempting checking mail, invokes security/pinentry-curses, which presents a screen to type a passphrase into, which unlocks security/pass and downloads e-mail.

Having that working, I created an item in Openbox menu <command>xterm -e aerc /<command>, but in this case the mail/aerc starts, its system bg mail, but no screen to type a passphrase into appears, and no e-mail is downloaded.

Is there some difference how the Openbox XML parser processes the command, or how the shell executes the mail/aerc behaves?

Any help what might be the culprit so that I can even understand in which direction to search would be appreciated.

Kindest regards,

M
 
I think there are too much possible wrong directions. You have to exclude as much as possible things that can't cause it.
What I know is that you can use x11/xdotool to send simulated keyboard actions to program windows. I can log in to my Hotmail using only a script with key-sequences to the browser. This is relevant to security,though. Don't have this info readable for anything.
 
I had a problem with command substitution (bold highlighted in the first code box) in a execute action keybind.

Perhaps your problem is related.

Here the issue:
Rich (BB code):
  <keybind key="S-W-Print">
    <action name="Execute">
      <command>maim ~/Pictures/Screenshots/Screenshot-`date '+%F-%T'`.png</command>
     </action>
  </keybind>
This produces Screenshot-`date instead of Screenshot-2026-08-15-00:05:37.png

I found in the Openbox documentation following:
Description
<command> "" A string which is the command to be executed, along with any arguments to be passed to it. The "~" tilde character will be expanded to your home directory, but no other shell expansions or scripting syntax may be used in the command unless they are passed to the sh command. Also, the & character must be written as &amp; in order to be parsed correctly. <execute> is a deprecated name for <command>.

Here a working execute action, passed to the sh(1) command, in which the command substitution is executed:
Rich (BB code):
  <keybind key="S-W-Print">
    <action name="Execute">
      <command>sh -c "maim ~/Pictures/Screenshots/Screenshot-`date '+%F-%T'`.png"</command>
     </action>
  </keybind>


In your case try
Rich (BB code):
<command>sh -c "xterm -e aerc"</command>

EDIT: I just noticed:
<command>xterm -e aerc /<command>
The slash in </command> you posted is in a incorrect position, I assume it's a typo.
 
The big thing to keep in mind with openbox is that its clients do NOT inherit the default console session environment. Sometimes it's a real PITA, but I do understand why they do it that way. I end up having create startup scripts for most of my openbox menu items so that the clients get the correct environment when they execute...and trying to properly nest, quote, and escape -e command line options for xterm can drive a person crazy.
 
Back
Top