If I start a terminal (any terminal, for example urxvt) like urxvt -e sleep 5
, then a new terminal is launched but after 5 seconds the terminal closes, because the sleep
program has ended. How can I start a terminal with a program on the command line, but have the terminal stay alive after that process has ended?
In practice, what I'd actually like to do is urxvt -e tmux new-session top
, which opens urxvt with a tmux session that is running top
. But when I press q
, top
ends which also causes tmux and urxvt to end as well. I'd like when I exit top
for me to be taken to a shell within tmux.
urxvt -e sleep 5 and a shell please
would be better implemented as( sleep 5 && urxvt ) &
– Chris Davies Sep 23 '16 at 18:20