execute a script on shutdown before the Xserver is terminated
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite I asked this questions on Ubuntu Forums a couple of months ago but did not find a solution there, so I ask it again here. I am using Ubuntu 16.04. I am trying to solve the problem that Chromium tells me on every startup that it "didn't shut down correctly". There is a long thread about this issue on Ubuntu Forums. But the solution proposed there, which is to put the command kill -TERM $(pgrep chromium) in the script /sbin/shutdown does not work in my case. Another proposed solution, namely to put the said command in a script in /etc/rc0.d does not work either. I also tried in the meantime (i.e., after posting on Ubuntu Forums) to put the line session-cleanup-script=/link/to/script_with_kill_Chromium_command in /etc/lightdm/lightdm.conf (which is the solution proposed in this Ask Ubuntu post), but that does not work either. I guess that the reason why these proposed solutions don't work is th...