Window is hidden but process is running [closed]

Unfortunately, no — there is generally no way to get an X Windows application to reconnect to the windowing system if it loses its connection and its window is destroyed. And windows will generally only disappear if there is a bug in the program itself — in which case the process is probably in a hung state without knowing it, waiting on I/O that will never occur because it does not realize its window has gone away.

Unless the application is of a very rare design and lets you send it a special signal or message to reconnect to the X server, or rebuild a new window, or unless it is still present on the screen somewhere as an icon or docked icon and you can interact with it that way, the program's process must simply be killed and you have to restart it.

The behavior of closing its last window without exiting the process is generally a bug that you can report upstream about the application.

(Note: there are rare exceptions, like web browsers that keep a running process even once their last window is closed — but in those cases, re-clicking the browser's icon or re-running it from the command line simply tells the already-running process to open a new window. Again, an app has to be specially written to handle temporary windowlessness if this is to work.)


As Brandon Rhodes explained, if the window is destroyed/hidden by its parent process, no way to recover/recreate/show it from outside the process or application itself.

You can confirm from window manager, try: wmctrl -l -p, no window related to its PID is listed.

So, It possible that hexchat is still responsive, try:

hexchat -e --command="gui show"

-e Open URL or execute command in an existing HexChat

References:

  • man hexchat
  • HexChat 2.9.6.1 documentation: Controlling the GUI
  • man wmctrl

If the process is simply in the background, perhaps this answer fits here too:

Use fg to bring the process back to foreground.

See the full answer for more instructions.