script to open terminal, run command and keep terminal open
The argument after -e
is taken as a command to be executed. So for xterm, this works:
xterm -hold -e ls
I don't have Konsole installed, but this should work:
konsole --noclose -e ls
From man xterm
The -ls flag and the loginShell resource are ignored if -e is
also given
That's why you got error in your first command.
This command worked for me.
xterm -hold ls