Some similar posts did not clear up this question:
How do I create a terminal from inside a bash script,
giving initial commands (e.g. df
, pwd
etc) and
allowing me to keep working on it after the script ended?
Normally the terminal is killed after an optional command
(gnome-terminal -x ...
).
gnome-terminal --working-directory="$HOME/Documents"
is not working for some reason.
Specifically I want to mount a partition via script and work on its files afterwards.
I use Ubu 20.04, Gnome 3.36.8. Thanks!
Something like:
may do what you want. For me, the option
--working-directory
works as expected, but if it does not for you, you can include acd
command aftersh -c
.