I’m looking for a way to add a new shortcut (lets say “kill this window”) into the window menu:

Is it possible, under gnome/ubuntu?
Thanks!
PS. Edited to avoid confusion.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The menu which is being displayed (what can be seen from the screen shot) is the part of the Window Manager decorations. The menu options which you see depends on the window manager which is being run. Generally it is possible to add custom key bindings (key combinations like Alt+F4 etc. Please note key bindings are not the same as short cuts on your desktop panel) for the window (again depends on the window manager), but to add any new option/item into the menu you will have to modify the source code of the window manager, build it & use the customized window manager. So far I have not come across any window manager which allows adding custom menu options without rebuilding the source
If you are using Gnome session on Ubuntu, it is highly likely that you are running metacity window manager (not sure about KDE session as I do not use it)
In case of metacity, key bindings can be checked in gconf entries under /app/metacity (using either gconftool-2 –dump options or gconf-editor). You can refer the following link http://www.howtogeek.com/howto/ubuntu/assign-custom-shortcut-keys-on-ubuntu-linux/
If you want to add new menu options then you will have to rebuild metacity from the source as far as I know. In the source code of metacity, files under src/ui can be particularly useful for your need.