Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl+D in the terminal does not close the tab anymore, but freezes the current tab #1198

Closed
XaF opened this issue Feb 18, 2018 · 42 comments
Closed

Comments

@XaF
Copy link

XaF commented Feb 18, 2018

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.

@romange
Copy link

romange commented Mar 16, 2018

The same also happens in Ubuntu 18.04

@gsemet
Copy link
Member

gsemet commented Mar 20, 2018

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)

@romange
Copy link

romange commented Mar 20, 2018

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>

@gsemet
Copy link
Member

gsemet commented Mar 20, 2018

can you try with HEAD?

@romange
Copy link

romange commented Mar 20, 2018

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

@romange
Copy link

romange commented Mar 20, 2018

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

@gsemet gsemet modified the milestones: 3.0.5, 3.0.6 Mar 26, 2018
@XaF
Copy link
Author

XaF commented Mar 29, 2018

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

@romange
Copy link

romange commented Apr 5, 2018

FYI: It's also reported here: https://bugs.launchpad.net/ubuntu/+source/guake/+bug/1760621

@gsemet gsemet modified the milestones: 3.0.6, 3.1.0 Apr 9, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Apr 9, 2018

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 5251d6a on NixOS.

@gsemet
Copy link
Member

gsemet commented Apr 9, 2018

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

gsemet added a commit to gsemet/guake that referenced this issue Apr 9, 2018
reference Guake#1198

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
gsemet added a commit that referenced this issue Apr 9, 2018
reference #1198

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
@jtojnar
Copy link
Contributor

jtojnar commented Apr 9, 2018

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

@gsemet
Copy link
Member

gsemet commented Apr 9, 2018

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

@jtojnar
Copy link
Contributor

jtojnar commented Apr 9, 2018

Any debugging tips?

@gsemet
Copy link
Member

gsemet commented Apr 9, 2018

Print + make reinstall

@romange
Copy link

romange commented Apr 9, 2018 via email

@jtojnar
Copy link
Contributor

jtojnar commented Apr 9, 2018

What do you mean by print?

@jtojnar
Copy link
Contributor

jtojnar commented Apr 9, 2018

I think this line should not be indented:

self.delete_tab(self.notebook.page_num(widget), kill=False, prompt=False)

@gsemet
Copy link
Member

gsemet commented Apr 9, 2018

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

gsemet added a commit that referenced this issue Apr 9, 2018
fix #1198

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
gsemet added a commit that referenced this issue Apr 9, 2018
fix #1198

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
@gsemet gsemet closed this as completed in 3dd342c Apr 9, 2018
@seantcanavan
Copy link

seantcanavan commented Apr 27, 2018

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.

@aichingm
Copy link
Collaborator

@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

@seantcanavan
Copy link

no make is still failing I'll open a ticket

@aaronik
Copy link

aaronik commented May 23, 2018

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.

@imanolbarberia
Copy link

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

@seantcanavan
Copy link

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

@inm-certi
Copy link

inm-certi commented Jul 17, 2018

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

@maximpap
Copy link

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

@abd3lraouf
Copy link

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

@pmrivas
Copy link

pmrivas commented Aug 1, 2018

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

@FilipMalczak
Copy link

FilipMalczak commented Aug 30, 2018

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

@XaF
Copy link
Author

XaF commented Aug 31, 2018

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

@melmi
Copy link

melmi commented Sep 1, 2018

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

@anx-ckreuzberger
Copy link

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

@gsemet
Copy link
Member

gsemet commented Sep 5, 2018

Next version will makes libutempter0 a mandatory dependency

@jpass
Copy link

jpass commented Sep 12, 2018

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.

@emarcelcom
Copy link

emarcelcom commented Sep 17, 2018

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

@diekotto
Copy link

diekotto commented Mar 7, 2019

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

ulidtko added a commit that referenced this issue Apr 3, 2019
This makes a hotfix for https://bugs.launchpad.net/ubuntu/+source/guake/+bug/1760621
in Ubuntu 18.04 LTS (and possibly others).

GitHub PR #1490
@gsupp
Copy link

gsupp commented Apr 30, 2019

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

@mlouielu
Copy link
Collaborator

mlouielu commented Apr 30, 2019 via email

@gsupp
Copy link

gsupp commented May 2, 2019

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.

@fantomas3239
Copy link

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!

@tafulop
Copy link

tafulop commented Dec 2, 2019

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.

@ghost
Copy link

ghost commented Apr 14, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests