Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run some WIndows games via Wine in new x-window on tt8. Here is what I use

Exec=xinit '/home/deckoff/.PlayOnLinux/wineprefix/HOMM3/drive_c/Program Files/ of Might and Magic 3 Complete/Heroes3' -- :1 -ac -depth 16

This will invoke script, which reads

!# /bin/bash

# sleep 4 
xrandr -s 640x480
# xrandr -s 1024x768 
/usr/share/playonlinux/playonlinux --run "ZumasRevenge.exe"

As you can see, I open a new x-windw and change resolution on the go. Sometimes, thoug, some of the games will freeze, and the x-window wont die, even if the game is closed. Usually, I can kill x with ctr-alt-bkspace, but this will work in tt7(default) only. In tty8the command will not work.

So, I want to know, is there a way to restrat or kil the x-window process taking place in tty8

share|improve this question
I think you can kill x-window with Alt + sys-rq + K . – desgua Feb 9 '12 at 10:43
What is sys-rq button? – deckoff Feb 9 '12 at 16:48
It is a keyboard key. See an example: – desgua Feb 9 '12 at 17:09
Alt+PrintScreen+K - got it. This works. Anyway, I wrote a script, which can be used to kill Xorg at tty8. With some effort, it can be easily modified to kill anything at any tty :) Here it is<br /> #! /bin/bash JOB=$(ps -A | grep -w 'tty8' | grep -w 'Xorg') JOBNUMBER=$(echo $JOB | awk 'BEGIN { } ; {print $1}') kill -9 $JOBNUMBER – deckoff Feb 9 '12 at 18:44
Glad it works. So I will post as an answer if someone come here with the same problem. – desgua Feb 9 '12 at 21:41
up vote 4 down vote accepted

You can use the key combination Alt + SysRq + K.

SysRq is often the Print Screen key.

share|improve this answer
That killed all the windows and logged out of the window manager...thanks :P – Limited Atonement May 15 '13 at 18:22
1 intended. – desgua May 16 '13 at 13:54
Doesn't work in 14.04. PrtScr is a Fn key on my laptop if that matters. – NoBugs Jun 28 '14 at 16:12
Yes it matters. You probably have to add the Fn key to the combination above. – desgua Jun 30 '14 at 11:17

alt+f2 gksu xkill you click on the window you want to close.

Also you could try with terminal lets say banshee is stuck when you tried to listen an online radio station.. sudo ps -A|grep bans

10304 bla bla bla ^ the result of the command sudo kill 10304

you could try sudo kill -s kill 10304.

a more easy way gksu gnome-system-monitor

this is all you need to know

share|improve this answer
This will work most of the time, this is why I accept this answer. In this current case the app is working on its on in the new X window, so alt+f2 cannot bring command line :) – deckoff Feb 9 '12 at 23:30

Try the following in a terminal:

echo "setxkbmap -option terminate:ctrl_alt_bksp" >> ~/.xinitrc

The file .xinitrc in your home folder should be read every time X is started either via startxor xinit, and the option we just added should enable "zapping" the server.

For more info:

share|improve this answer
No, nothing happens, I added it, checked the file, the was correctly changed, restarted, but still this key combination will not work. I think I can write a simple bash script to find xorg process running at tty8 and kill it. kill -9 some number will kill it – deckoff Feb 9 '12 at 16:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.