If I execute a program using the -e option for xterm and close this program, then xterm closed as well, e.g.xterm -hold -e nanoThe window (i3wm) is still there but it's empty and I'm not able to do any inputs. How to run xterm like in the example above with a additional requirement, a callback for xterm if I closed nano?What I can do is:xterm -hold -e nano;bashBut I don't understand, why I have to start a shell like bash again. I thought xterm already should run a shell.
XTerm -e option with callback
xterm;i3
xterm -hold -e cmd will run cmd in a new xterm window and then keep the window displayed after the command has exited (it would normally close the window).If you want an interactive shell in the window after running an initial command, thenxterm -e 'cmd; bash'will do this.  There's no need for -hold as the window doesn't close until the shell session exits.xterm can be used to run any program. By default it runs a shell, but with -e you change this default behaviour. xterm -e mutt, for example, would run the email reader mutt instead of a shell.