Is it possible to quit blender from the command line?
I think you could try with wmctrl instead of kill. However it's behavior may be application and windows manager dependant.

wmctrl -xc &lt;WIN&gt;


By default, &lt;WIN&gt; is treated as string to be searched in window title (wmctrl -c blender will close any window containing "blender" in the title). With -x, it will be interpreted as window class, so this invocation:

wmctrl -xc blender


... only closes any window having "blender" as its class name, which is usually Blender itself.