Im trying to run a command in screen, but prevent it from ending the session once i kill the child process with Ctrl-C while in screen, much like this: https://unix.stackexchange.com/a/47279/79125, but in my case the command is run as different user, and i would like to get back a shell when i Ctrl-C the child process. Here are my unsuccessful attempts
$ screen -S mySession -X screen -t tab3 sh -c ' su - appuser -c "cd /appdir/bin; ./app start; bash"'
$ screen -S mySession -X screen -t tab6 su - appuser -c "sh -c 'cd /appdir/bin; ./app start; exec bash'"
$ screen -S mySession -X screen -t tab6 sh -c "su - appuser -c 'cd /appdir/bin; ./app start; exec bash'"
$ screen -S mySession -X screen -t tab6 sh -c "su - appuser -c 'cd /appdir/bin; ./app start; exec bash'; su - someuser -c 'exec bash'"
nohup
help here? – George Udosen Aug 05 '17 at 18:39su - appuser -c "sh -c 'cd /appdir/bin;........
, i would like this session as appuser to not disappear when i Ctr-C the app thats running. – mike-m Aug 05 '17 at 19:40