xterm with screen and trap command

151 Views Asked by At

I am trying to create a xterm window and I don't want the user to close the window using 'X' button which led me to use the trap command.

xterm -e zsh -c "trap '' HUP INT TERM XFSZ; python"

The above will create a zsh and will start python process and the user can't close this xterm window.

I need to log the contents of the terminal. So, I have used script command.

xterm -e script mypgms.log  -c "trap '' HUP INT TERM XFSZ;python"

But, the window can still be closed with 'X' button.

What should I do to have zsh started with python process and logging done via script command in xterm where user can't close it?

0

There are 0 best solutions below