3

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 lich@192.168.2.222"
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 lich@192.168.2.222"

But I still get no warning when I close the terminal window. How can I get a warning like this: enter image description here

2 Answers2

0

I try this command to solved the issue.

Exec=mate-terminal -e "bash -i  -c 'ssh -X lich@192.168.2.222';bash"
0

I found the solution. I added the -i option after bash as this:

Exec=mate-terminal -x bash -i -c "ssh -X lich@192.168.2.222"

and the problem solved.