36

I'm using Emacs GUI in Gnome. After pressing Ctrl+z, the Emacs window is minimized. However, if I bring the window to the front, it doesn't respond to any key press or mouse event. I searched the web and only found how to bring it back from the command line.

How do I reactivate Emacs when using it in GUI mode?

zx485
  • 2,337
Ning Sun
  • 627

6 Answers6

31

If you press C-z by mistake then you can add this to your .emacs to make C-z do nothing:

(global-unset-key (kbd "C-z"))

I did that after pressing C-z many times by accident.

Tom
  • 2,113
20

Type

fg 

or

fg %emacs

to get Emacs back.

slhck
  • 235,242
sRack
  • 317
8

You may have to send the process a SIGCONT signal. You normally do this in the console by running kill -CONT $emacs_pid or killall -CONT emacs. If you insist on a GUI solution, you can try the task manager shipped with your distro.

billc.cn
  • 7,139
8

Send it a CONT signal:

killall -CONT emacs

A WINCH signal also seems to work, so you can just resize the Emacs window.

Clicking on any menu items seems to work as well.

If you were running Emacs from a terminal, fg ("foreground") or %emacs would work.

Zaz
  • 2,716
2

C-s resumes a GUI Emacs after C-z

imix
  • 141
0

Try using a window resize command. I was using X11 forwarding to forward the Emacs GUI from a Linux server to my computer (Windows). Hitting C-z minimized the window, and when I brought it back up Emacs had frozen, but resizing it using the Windows key (e.g., Win + Left arrow) unfroze it and it started responding again.