First of all I believe that gnome-terminal is very similar to mate-terminal so a solution for either these 2 will work. The proglem is that I have created a desktop entry to connect with ssh to my server as shown below:
[Desktop Entry]
Name=SSH
Comment=Connect to server
Exec=mate-terminal -e "ssh -X [email protected]"
Terminal=false
Icon=utilities-terminal
Type=Application
But when I close the window I get no warning even if there is a command that is being executed. So I change the Exec
line as this:
Exec=mate-terminal -x bash -c "ssh -X [email protected]"
But I still get no warning when I close the terminal window. How can I get a warning like this:
bash -c
is clever enough to replace itself with the single command as its argument, hence your two examples are essentially the same. Try to trickbash -c
into not being able to exit prior to ssh's completion, e.g.bash -c "ssh -X user@host; true"
. Not sure if it works, but worth a try.;
character waits the command to exit before the next command is executed, sotrue
will be executed after I exit the ssh connection.