How to xkill an application by its id?
- by Hanynowsky
I need to simulate the behavior of the keyboard shortcut (ALT+F4) using Terminal for a given application.
If I open for example gedit and click ALT + F4 , then GEDIT will be xkilled.
If I want to achieve same thing using Terminal, how should I proceed?
The command
export PIDTOKILL=pidof gedit | grep [^*]; xkill -id $PIDTOKILL
does not work and gives the following error:
xkill: killing creator of resource 0x3f38
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 113 (X_KillClient)
Value in failed request: 0x3f38
Serial number of failed request: 8
Current serial number in output stream: 9
I think I am confusing application id and process id here