Guake: Ctrl+D in the terminal does not close the tab anymore, but freezes the current tab

Created on 18 Feb 2018  ·  42Comments  ·  Source: Guake/guake

Version information

Guake version: 3.0.4
Linux version: Debian buster
Gnome version: GNOME Shell 3.26.2

Expected behavior

When in a terminal, using Ctrl+D on an empty prompt exits the current terminal.
In previous versions of Guake, this would act as if the tab was closed: if it's not the last tab, only this tab is closed, if it's the last tab, the full Guake window would hide until the next F12 key press.

Current bug

When using Ctrl+D on an empty prompt, the current tab freezes after printing "exit" on the terminal. The context menu can be opened on a right click, but selecting any option does not do anything. If another tab is opened, it can be used to right click but not all options work: 'New tab' works, 'Quit' does not work (probably blocked by the other tabs). Only solution to get back full control of Guake is to killall guake.

High Defect

Most helpful comment

This bug was affecting me as well, running on a pretty clean Ubuntu 18.04 install. I haven't tried installing it from source, as I prefer to get my packages from the apt repos when I can, though I'm sure it'd work just fine. But another way to fix this, after reading the patch, is to install libutempter0.

sudo apt-get install libutempter0 and the problem should go right away.

All 42 comments

The same also happens in Ubuntu 18.04

I do not have this behavior. Ctrl+d on a gnome tab close nicely this tab. Can you start guake from a terminal and dump me the logs if you see error message? Can you try with HEAD? (cannot reproduce on Guake 3.0.5)

I am using guake 3.0.4-1 coming from ubuntu repo.
Below are the logs printed once I typed "exit" in my guake shell. But the tab hangs like in the attached screenshot.

screenshot from 2018-03-20 12-50-15

Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Terminal exited: <terminal.GuakeTerminal object at 0x7f0ab03e4ee8 (guake+terminal+GuakeTerminal at 0x186b440)>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>

can you try with HEAD?

sure. it was stuck as well. Attaching stderr output
1.txt

I run it using ./run-local.sh 2> 1.err

I do not seem to have the problem anymore. However, versions of my packages changed:

Guake version: 3.0.4 (debian package 3.0.4-1)
Linux version: Debian buster
Gnome version: GNOME Shell 3.28.0

I am getting the following error, when I press ctrl+d, followed by ctrl+shift+t.


Console output

$ guake -v
Logging configuration complete
DBus not running, starting it
[WARN] Unable to load the library libutempter !
[WARN] The <wall> command will not work in guake !
[WARN] libutempter.so.0: cannot open shared object file: No such file or directory
Wanted GTK theme: ''
Prefer dark theme: False
reload_global: 'F12'
can't bind show-focus key
set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
is unity: False
Correcteed monitor size:
  total_width: 1920
  total_height: 1080
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=0, root_y=0)
set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
is unity: False
Correcteed monitor size:
  total_width: 1920
  total_height: 1080
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=0, root_y=0)

(guake:16901): Vte-WARNING **: 16:50:46.417: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:16901): Vte-WARNING **: 16:50:46.419: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:16901): Vte-WARNING **: 16:50:46.419: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:16901): Vte-WARNING **: 16:50:46.419: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:16901): Vte-WARNING **: 16:50:46.419: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)
set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
is unity: False
Correcteed monitor size:
  total_width: 1920
  total_height: 1080
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=0, root_y=0)
set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
is unity: False
Correcteed monitor size:
  total_width: 1920
  total_height: 1080
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=0, root_y=0)
Guake initialized
Running main gtk loop

================================================================================
Window display
gtk.gdk.WindowState = 0
GDK_WINDOW_STATE_STICKY? False
GDK_WINDOW_STATE_WITHDRAWN? False
GDK_WINDOW_STATE_ABOVE? False
GDK_WINDOW_STATE_ICONIFIED? False
Showing the terminal
set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
is unity: False
Correcteed monitor size:
  total_width: 1920
  total_height: 1080
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=0, root_y=0)
Moving window to: <Gdk.Rectangle object at 0x7fe0ca79ec48 (GdkRectangle at 0x2ca8080)>
set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
is unity: False
Correcteed monitor size:
  total_width: 1920
  total_height: 1080
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=0, root_y=27)
order to present and deiconify
Current window position: (root_x=0, root_y=27)
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Terminal exited: <terminal.GuakeTerminal object at 0x7fe0bf46f510 (guake+terminal+GuakeTerminal at 0x2bc3140)>

(guake:16901): Vte-WARNING **: 16:50:55.820: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:16901): Vte-WARNING **: 16:50:55.820: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:16901): Vte-WARNING **: 16:50:55.820: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:16901): Vte-WARNING **: 16:50:55.820: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:16901): Vte-WARNING **: 16:50:55.820: (vtegtk.cc:1925):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)
Traceback (most recent call last):
  File "/nix/store/dd969rflg0diy0z8chivjwd64d1ynzwd-guake-3.0.5/lib/python3.6/site-packages/guake/guake_app.py", line 1306, in accel_add
    self.add_tab()
  File "/nix/store/dd969rflg0diy0z8chivjwd64d1ynzwd-guake-3.0.5/lib/python3.6/site-packages/guake/guake_app.py", line 1771, in add_tab
    pid = self.spawn_sync_pid(directory, box.terminal)
  File "/nix/store/dd969rflg0diy0z8chivjwd64d1ynzwd-guake-3.0.5/lib/python3.6/site-packages/guake/guake_app.py", line 1686, in spawn_sync_pid
    wd = self.get_current_dir()
  File "/nix/store/dd969rflg0diy0z8chivjwd64d1ynzwd-guake-3.0.5/lib/python3.6/site-packages/guake/guake_app.py", line 1662, in get_current_dir
    return active_terminal.get_current_directory()
  File "/nix/store/dd969rflg0diy0z8chivjwd64d1ynzwd-guake-3.0.5/lib/python3.6/site-packages/guake/terminal.py", line 208, in get_current_directory
    cwd = os.readlink("/proc/{}/cwd".format(self.pid))
FileNotFoundError: [Errno 2] No such file or directory: '/proc/16909/cwd'
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>

Running 5251d6aef28afaa4db32bccb27b6b160db41aa20 on NixOS.

look like the pid returned by vte's spawn function does not exist in /proc/ :(

Right, ctrl-d should kill the process, removing it from /proc

Moreover, i do not reproduce. Works great on my system :(

Any debugging tips?

Print + make reinstall

Could you point us to potential places in the code where the shell should
be closed?

On Mon, Apr 9, 2018, 20:22 Gaetan Semet notifications@github.com wrote:

Print + make reinstall


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Guake/guake/issues/1198#issuecomment-379828555, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADgSiEjd_8ASlDKlZT5mu4KRrc8jnzddks5tm5jcgaJpZM4SJiPb
.

What do you mean by print?

good catch.

i mean I usually do this debug session with log of log.debug/log.info or print statements and use make reinstall everytime

What's the correct way to pull this fix in after installing via the Ubuntu PPA? I tried sudo make install for the latest build and received errors so I opted for the PPA version instead.

This is a brand new install of Ubuntu 18.04. Typing exit when done with a shell instance causes this hang.

@seantcanavan You can find the correct way here: http://guake.readthedocs.io/en/stable/user/installing.html#install-from-source make sure you installed all dependencies first (have a look at https://github.com/Guake/guake/tree/master/scripts ).

git clone https://github.com/Guake/guake
cd guake
./scripts/bootstrap-dev-debian.sh # this line installs all things needed to develop 
# guake, you may not want to install all of them but the first apt command installs 
# all dependencies needed to run guake, so you want to  pull at least them! 
make 
sudo make install

no make is still failing I'll open a ticket

This bug was affecting me as well, running on a pretty clean Ubuntu 18.04 install. I haven't tried installing it from source, as I prefer to get my packages from the apt repos when I can, though I'm sure it'd work just fine. But another way to fix this, after reading the patch, is to install libutempter0.

sudo apt-get install libutempter0 and the problem should go right away.

I can confirm that installing libutempter0 fixed the problem for me, thanks!

that was already selected for me @dibgit - are you sure this is related to Guake and not the ubuntu terminal?

It also happens to me (on Ubuntu 18.04 LTS clean install).
@seantcanavan I can't say if this is related to Guake, but it doesn't happen on gnome-terminal.
Installing libutempter0 as proposed by @Aaronik solves the problem.
Thanks, @Aaronik - It was really annoying

Ubuntu 18.04 LTS. With the AMD Ryzen 7 2700X.
APT Installed guake and fails sometimes when press Ctrl+D

@imanolbarberia thanks alot. It fixed the problem for me on Ubuntu 18.04 mini iso

@imanolbarberia thanks alot. fixed my Linux Mint 19 Tara... Thanks!

Confirmed, @Aaronik solution (installing libutempter0) works for me too (Mint 19, Cinnamon 3.8.8, linux kernel 4.15.0-20)

Note that libutempter0 is installed for me too, might be why the issue disappeared :)

Here I am using ubuntu 18.04. Problem solved after installing libutempter0 and re-running guake.

Confirming, problem existed on a fresh install of Ubuntu 18.04, and it was resolved by installing libutempter0 (and a reboot).

Next version will makes libutempter0 a mandatory dependency

Ubuntu 18.04 fresh install, same problem.
For me libutempter0 was already installed but sudo apt install --reinstall libutempter0 fixed the issue.

Also i noticed that open tabs look differently now.

Same problem here. Fresh install of Linux Mint 19 Cinnamon.
EDIT: resolved by installing libutempter0 (and a reboot).

Ey, nice answers, installing libutempter0 from a fresh ubuntu18lts fixed the problem for me as well.

Installing libutempter0 fixed this on elementary OS 5.0 Juno for me. Maybe this should be a dependency?

Which version of Guake are you testing at?

Can you test it with master HEAD and remove libutempter0 when test?

Grant notifications@github.com 於 2019年4月30日 週二 22:34 寫道:

Installing libutempter0 fixed this on elementary OS 5.0 Juno for me.
Maybe this should be a dependency?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Guake/guake/issues/1198#issuecomment-487976714, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AG3QA2BNIGNLHKKAN7FHC5TPTBKH5ANCNFSM4ERGEPNQ
.

Platform:
$ lsb_release -a
No LSB modules are available.
Distributor ID: elementary
Description: elementary OS 5.0 Juno
Release: 5.0
Codename: juno

Guake version with issue:
guake/bionic,bionic,now 3.0.5-1

I removed libutempter0 and compiled from HEAD:
Guake Terminal 3.6.3
VTE 0.52.2
Gtk 3.22.30

Issue is resolved, I was able to Ctrl-D to close tabs without an issue and without libutempter0 installed.

This bug was affecting me as well, running on a pretty clean Ubuntu 18.04 install. I haven't tried installing it from source, as I prefer to get my packages from the apt repos when I can, though I'm sure it'd work just fine. But another way to fix this, after reading the patch, is to install libutempter0.

sudo apt-get install libutempter0 and the problem should go right away.

It helped for me as well. Thanks!

This bug was affecting me as well, running on a pretty clean Ubuntu 18.04 install. I haven't tried installing it from source, as I prefer to get my packages from the apt repos when I can, though I'm sure it'd work just fine. But another way to fix this, after reading the patch, is to install libutempter0.

sudo apt-get install libutempter0 and the problem should go right away.

Worked for me as well with version 3.0.5-1 on ubuntu 1804.

great

This bug was affecting me as well, running on a pretty clean Ubuntu 18.04 install. I haven't tried installing it from source, as I prefer to get my packages from the apt repos when I can, though I'm sure it'd work just fine. But another way to fix this, after reading the patch, is to install libutempter0.

sudo apt-get install libutempter0 and the problem should go right away.

works like a charm. remember to restart by killing the guake process

Was this page helpful?
0 / 5 - 0 ratings