I would like to start 'xfce4-terminal' and then run a command but finish with a prompt to repeat the command.
I use the software 'todo.txt' and like to have it open in a small window which I can refer to and add entries, etc.
At the moment, I have the following command line which works…
xfce4-terminal --title=todo &
…I then have to switch to that terminal window and type…
/usr/local/bin/todo.sh -t ls
I have the tried all these but on each try it 'finishes' the window and will not let me type in the window:-
xfce4-terminal --execute '/usr/local/bin/todo.sh -t ls' --title=todo --hold &
xfce4-terminal --command '/usr/local/bin/todo.sh -t ls' --title=todo --hold &
xfce4-terminal --command='/usr/local/bin/todo.sh -t ls' --title=todo &
Can anyone help please?
I would like to open the terminal window, run the command, then leave me with a working prompt.
Thanks.
Best Answer
Use
-c
option for bash command to wrap multiple commands, like this:Then, use that bash command in
xfce4-terminal
command, like this:whereby the options:
-e
to run the commands,-T
to set the title.As a result, the terminal does not close and ready with a new prompt.