I have recently been trying to use xkill approach to navigate my way round frozen apps on my Linux PC. But when I click the window, it would pop up an error message, “permission denied”. I always have to resort to
sudo killall <app_name>
I am not really comfortable with it like the xkill. I would like to know why xkill is not working for me to kill frozen apps. Which permission does the error message imply and how would I work around it?
@Don11 - I tested this as xkill, and a red skull-and-crossbones cursor appears. I was able to click on a running app and all instances of the app were immediately killed.
From the xkill man page: man xkill
If no resource identifier is given with ‐id, xkill
will display a special cursor as a prompt for the user to select a window to be killed
xkill by nature of it’s operation would require permission to because it has to send signals to the process that you want to force stop.
If it showed that the permission is denied, it simply means that the system is set to deny a user the ability to send signals to processes. It is a security measure.
It is either those restrictions are removed or you consider using “pkill <app_name>”.
It sounds like you have an infection of 'zombie' orphaned child processes. The zombie killer is "kill -9 'PID'". Unless you clean up the child processes before the parent is dead, it will happen again.
@superuser1955@hydn sorry for the late reply have been extremly busy with the other code projects. The best way to do is to use the kill and if that doesnt work on the ps | grep aux then use the systemctl start application or systemctl stop application
kill -9 is a dangerous process. Application may not work as expected because it will crash especially it doesn’t close naturally or may you need to reinstall application later. It is better to try to less application some time when frozen and try to close it naturally instead of kill -9.