Bug 185466 - konsole right click context menu disappears
Summary: konsole right click context menu disappears
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 190963 199874 218389 238342 248135 265706 267651 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-24 20:01 UTC by Unknown
Modified: 2015-09-16 14:19 UTC (History)
45 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch to fix the bug (3.85 KB, patch)
2010-06-05 22:26 UTC, Andreas Marschke
Details
Patch to enable context menu (3.59 KB, patch)
2010-06-07 14:49 UTC, Kurt Hindenburg
Details
Patch that appears to fix this issue. (2.65 KB, patch)
2011-01-23 00:59 UTC, Kurt Hindenburg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2009-02-24 20:01:05 UTC
Version:           2.2 (using KDE 4.2.0)
OS:                Linux
Installed from:    Ubuntu Packages

This happens after using konsole for an hour or two and doesn't work in all the tabs of the window !!
If a new konsole is opened it works fine.
Looks very strange though.

Thanks a lot...
Comment 1 Krenar Qehaja 2009-02-28 04:11:04 UTC
I can confirm it. I was struggling for the few days on figuring out what caused it, as it bugged me for quiet some time now, and hopefully I can guide you to reproduce it.

I usually use Konsole with lots of tabs, and on one of them I ssh on my server all the time, and for whatever reason the connection with the server interrupts (network change, laptop suspend/resume), it doesn't disconnect (how it should) but just freezes (not an UI freeze but the ssh session becomes unresponsive [maybe I should report a new bug for this if nobody has done it yet]). So when this happens, the right-click context menu disappears on all tabs, and just a fresh Konsole start fixes it.

So, Musthafa, is your case related to ssh in any way, as I described? 

Thanks.

p.s: Keep on the great work Konsole Devs, you've done a really good job, especially with the KDE4 port.
Comment 2 Unknown 2009-02-28 09:00:34 UTC
I am now able to reproduce the bug, thanks to Krenar. Following are the steps to reproduce it.

1) Open two tabs
2) ssh to a server in one tab (lets say tab A)
3) Disconnect the connection abruptly (turn off the wireless/network)
4) Now the tab A will be frozen, no keys will work (it should be a bug i think). But the right click context menu will work !
5) Close tab A. A confirmation dialog box with a warning message will appear "The program 'ssh' is currently running in this session.  Are you sure you want to close it?"
6) On clicking Yes in the confirmation dialog box, the tab will be closed.
7) After that Right click context menu will not appear in any of the exiting or new tabs in the same window !

Thanks a lot...
Comment 3 Krenar Qehaja 2009-02-28 18:48:12 UTC
Yes, you're right, the frozen tab has to be closed first, in order to make it disappear.
Comment 4 Michal Ziabkowski 2009-03-04 15:31:10 UTC
Happens here too. Good to know someone was finally able to reproduce it. It seemed totally random to me.
Comment 5 Unknown 2009-03-26 21:11:48 UTC
Hi, Any updates on this?

This issue is still there in Konsole Version 2.2.1 of KDE 4.2.1 in Kubuntu Jaunty.
Comment 6 Kurt Hindenburg 2009-03-27 03:40:47 UTC
I haven't had any time to look at this.  But really, you have to have a ssh disconnect and then close that tab.  You'll have to avoid doing this until someone can fix it.
Comment 7 Unknown 2009-04-13 15:27:42 UTC
I still encounter this problem (konsole freeze & no right-click) frequently. 
In our country there are frequent power cuts. So the network connection gets disconnected, without any proper ssh disconnect.
But in my laptop, the konsole window/tab where the ssh connection was opened hangs forever. If I close that tab, then right click doesn't work in that whole window.

Now, I am used to creating a new window for each ssh connection !!
But I would still like to see this fixed soon, as I really miss the tabs feature.

Thanks a lot...
Comment 8 Kurt Hindenburg 2009-04-29 15:36:05 UTC
*** Bug 190963 has been marked as a duplicate of this bug. ***
Comment 9 Sami Remes 2009-08-10 19:19:39 UTC
*** This bug has been confirmed by popular vote. ***
Comment 10 Giorgos Pallas 2009-08-20 15:08:51 UTC
In my version (debian testing - 4.2.4, konsole version 2.2.3) I never have a context menu! That is, I right click down on the tabs and absolutely nothing happens. So if I want to detach the tab, or close it, I have to do it from the menus which is a step back regarding the previous function with the context menu...
Comment 11 James Reno 2009-09-16 05:12:39 UTC
Confirmed here as well - Mandriva 2009.1.

NOTE: It does not matter 'what' program is opening, opening two tabs one running a simple nano editor, and closing the tab without closing nano, will break it as well... if that confirmation dialog box pops up -- right click is broken.
Comment 12 Heinz Wiesinger 2009-10-01 18:44:15 UTC
still valid for kde 4.3.1
Comment 13 Tristan Miller 2009-10-13 12:32:31 UTC
The lack of a context menu for konsole tabs is addressed in a separate bug report: Bug 153376
Comment 14 James Reno 2009-10-19 08:37:35 UTC
Re: #13/Tristan

While *I believe* that bug was valid in previous release the context menu IS currently available and should work properly. The bug you link to stipulates that the context menu does not exist... In the current version it does - its just buggy.  As such, I believe that these are two totally separate bug reports while having common ground -- they are not the same report and do not report the same problem.

The context menu in the current KDE release is in existence and does work fully and properly - UNTIL - the dialog pops up asking if you want to close the unresponsive program.

This is not a feature-request, as the other, but instead is a FIX-request as the feature exists but has a broken component and/or some sort of data corruption which needs fixed.
Comment 15 Kurt Hindenburg 2009-11-11 18:32:06 UTC
Thanks to #11 I can reproduce this issue.  Tested w/ nano and vim.
Comment 16 Dhaval Patel 2009-11-15 18:08:29 UTC
I can confirm this same problem with SSH disconnect. I am using 4.3.2 on Kubuntu Karmic.

Is anyone even working on this bug?
Can we expect a fix soon?
Does anyone know of a workaround for the time being?
Comment 17 Thiago Coutinho 2009-12-08 16:12:09 UTC
+1
Comment 18 Thiago Coutinho 2009-12-08 16:24:25 UTC
It's impossible use konsole in full screen with this bug.
Comment 19 john.r.bond 2009-12-17 15:18:53 UTC
I also suffer from this problem.  This manly happens when i logout of certain ssh sessions mainly to cisco, procurve or splat kit.  issuing exit appears to logout however the console window just hangs.  after this the context menu is gone. 
Arch 2.6.31-ARCH
Comment 20 Sami Remes 2010-03-26 06:28:16 UTC
The bug still exists with KDE 4.4.1.
Comment 21 Vsevolod Krishchenko 2010-05-04 18:52:00 UTC
Still here in 4.4.2.
Comment 22 Panagiotis Papadopoulos 2010-06-01 22:14:26 UTC
I've got this issue too in 4.4.3. :-)
Comment 23 Andreas Marschke 2010-06-05 13:48:13 UTC
Ok having had a look at the evil processor of this bug it appears to be in SessionController.cpp in the function showDisplayContextMenu(QPoint).
At first it tries to check if there is a KXMLGuiFactory for this KXMLGuiClient even though this(SessionController) seems not to be derived from KXMLGuiClient or anything like it. 
SessionController is based on ViewProperties which is derived from QObject. Thus I wonder how on earth it worked in the first place that you could simply call factory() and not get an 'unknown' as answer from the compiler(!). 
I'm working on it though not a konsole dev if anyone of the participants in this discussion can explain it to me why above mentioned worked befor, I would be very very happy.
Comment 24 Andreas Marschke 2010-06-05 22:25:11 UTC
Allright I tried to work on this and finally got a patch together that would fix this issue. I doubt that its the prettiest solution ever made but apparently this is whats needed to do to fix it. If you have suggestions to make this fix more obvious or elegant please tell me.
Diff is attached.

Cheers,

Andreas
Comment 25 Andreas Marschke 2010-06-05 22:26:21 UTC
Created attachment 47717 [details]
Patch to fix the bug
Comment 26 Kurt Hindenburg 2010-06-07 14:49:03 UTC
Created attachment 47780 [details]
Patch to enable context menu

A cleaner patch - the root cause of this issue still needs to be researched.
Comment 27 Kurt Hindenburg 2010-06-08 04:35:50 UTC
Both these patches have serious issues.  They mess up the top menus and print 'no text' in the upper left corner of the terminal.

Something else will have to be done.
Comment 28 boris64 2010-11-04 19:38:27 UTC
This bug is still present for me on KDE-4.5.3.
Right now a simple [ctrl]+[d] (aka exit) in a ssh session
leads to a non-functional rightclick/popup menu.

As asked before: Is anybody actually working on this?
Comment 29 boris64 2010-11-04 19:44:49 UTC
Looks like there are more people having this problem,
perhaps somebody could mark these reports as dupes.

https://bugs.kde.org/show_bug.cgi?id=199874
https://bugs.kde.org/show_bug.cgi?id=238342
https://bugs.kde.org/show_bug.cgi?id=248135
Comment 30 Panagiotis Papadopoulos 2010-11-04 21:58:27 UTC
*** Bug 199874 has been marked as a duplicate of this bug. ***
Comment 31 Panagiotis Papadopoulos 2010-11-04 22:00:59 UTC
*** Bug 238342 has been marked as a duplicate of this bug. ***
Comment 32 Panagiotis Papadopoulos 2010-11-04 22:01:14 UTC
*** Bug 248135 has been marked as a duplicate of this bug. ***
Comment 33 Ismail Donmez 2010-11-30 16:12:42 UTC
I can reproduce this with KDE SC 4.6 beta1.
Comment 34 Pentarh Udi 2010-12-09 16:06:49 UTC
Fedora 14, kdebase-4.5.3-1.fc14.x86_64.rpm still has this issue.
Comment 35 Andreas Marschke 2010-12-22 16:43:27 UTC
Hi! 

One thing concerning this bug really caught my eye recently. Most of the sessions you have in those tabs are called "Shell" or "Shell 2" depending on, how often you opened a new one. 

_This_ title (terminfo?) changes when a user starts a nano session or something else that can change the terminfo-data.

Just a suggestion. Though worth looking at.
Comment 36 Rick 2011-01-05 13:14:03 UTC
It's still broken.

Here's an easy way to reproduce the bug.
1. open konsole
2. open an extra tab
3. press ctrl+d in the new tab
4. the context menu is now broken

One workaround is to open a new konsole and drag all the tabs to that instance. But every time you close a tab with ctrl+d the context menu stops functioning.
Comment 37 Stefan Neufeind 2011-01-05 14:16:51 UTC
Hmm, I didn't yet notice it's related to ctrl-D. But yes, that's what I use often to close idle consoles :-) Just tried and I can confirm that seems to be the reason.

Thanks for finding out the details to reproduce this. Should hopefully get us closer towards a solution imho ...
Comment 38 Weng Xuetian 2011-01-08 19:41:04 UTC
It seems that after any tab is closed, the context menu will disappeared.
Ctrl + D is just a way to end the stdin for bash, so the tab is closed.
Comment 39 Christoph Feck 2011-01-08 21:24:49 UTC
Really wired.

Ctrl-D: bug
typing "exit": bug
Context menu > "Close Tab": bug
Tab bar "Close" button: works (!?)

I have to remember to close tabs using the tab button :)
Comment 40 Kurt Hindenburg 2011-01-23 00:59:09 UTC
Created attachment 56337 [details]
Patch that appears to fix this issue.

If anyone can try this patch and let me know of any issues.
Comment 41 Weng Xuetian 2011-01-23 09:51:40 UTC
I recompiled kdebase and found it works! Seems no problem right now.

Thanks very much!
Comment 42 Michal Ziabkowski 2011-01-23 11:50:59 UTC
Applied the patch. The bug seems to be fixed and I've yet to see any defects :) Much obliged.
Comment 43 Kurt Hindenburg 2011-01-23 18:41:10 UTC
SVN commit 1216490 by hindenburg:

Fix issue where the context menu popup no longer appeared after closing a tab.

BUG: 185466


 M  +2 -0      MainWindow.cpp  
 M  +1 -1      MainWindow.h  
 M  +4 -0      ViewManager.cpp  
 M  +6 -0      ViewManager.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1216490
Comment 44 Ivo Anjo 2011-01-23 19:05:06 UTC
Thanks a lot for solving this. Can't wait for this fix to arrive!

Is it possible to get it backported to 4.5? And I see the commit was made to trunk -- will 4.6 also contain this fix?

Again, thanks. This bug has been driving me crazy :)
Comment 45 Kurt Hindenburg 2011-01-23 20:17:47 UTC
It will be in KDE 4.7, 4.6.1 - I don't think there will be anymore 4.5 releases although I could commit the fix.
Comment 46 Kurt Hindenburg 2011-01-23 23:18:34 UTC
*** Bug 218389 has been marked as a duplicate of this bug. ***
Comment 47 Christoph Feck 2011-01-24 01:50:17 UTC
There is a regression:

* Open fresh Konsole
* Open a new tab with Ctrl+Shift+T
* Close the new tab with "Tab Close" button in the tab bar
* Right click on the remaining tab

-> An odd "No text" menu bar appears at the top-left corner of Konsole display.
Comment 48 Christoph Feck 2011-01-24 01:55:46 UTC
Sorry, that wasn't clear, fourth step is:

* Right click into display of the remaining tab
Comment 49 Kurt Hindenburg 2011-01-24 04:26:54 UTC
SVN commit 1216575 by hindenburg:

Handle when tabs are closed via the close tab button on tab bar.

CCBUG: 185466


 M  +2 -0      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1216575
Comment 50 Kurt Hindenburg 2011-01-24 05:04:06 UTC
The latest patch in #49 was an attempt to fix  this issue when using the close tab button on the tab bar.  However, that patch causes the menu to become messed up.  It will take some more work.

Exiting tabs all other ways appear to work.
Comment 51 Kurt Hindenburg 2011-01-27 16:27:40 UTC
SVN commit 1217498 by hindenburg:

Disable tab close methods until the issue of menu being trashed can be resolved.

CCBUG: 185466


 M  +4 -3      ViewContainer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1217498
Comment 52 Andrew Kohlsmith 2011-02-04 16:20:25 UTC
This bug does not appear to have anything to do with the "close tab" button; I can make the problem occur with a normal ^D to log out of the shell in the tab (which closes the tab).

I'm running Ubuntu 11.04, upgraded from 10.10. The bug was NOT in 10.10, but rather it appeared when I updated to 11.04. There have been a few updates to the kdebase package in 11.04 but none have corrected this bug.
Comment 53 Ivo Anjo 2011-02-04 17:01:34 UTC
(In reply to comment #52)
> This bug does not appear to have anything to do with the "close tab" button; I
> can make the problem occur with a normal ^D to log out of the shell in the tab
> (which closes the tab).

That part of the bug is fixed, but the fix causes the close tab regression. The fix is supposed to be on KDE 4.6.1, so if you're running on stable packages, you'll have to wait for it to be released.
Comment 54 Andrew Kohlsmith 2011-02-04 17:05:37 UTC
Ok; I'm happy to wait, I just wanted to make sure it was addressed (reading the bug log did not make it clear to me that the ^D part was indeed fixed) -- Thank you for the clarification!
Comment 55 Kurt Hindenburg 2011-02-05 22:47:04 UTC
Git commit e52b6b0ac0292abdf654e4fb408fd501542c02fa by Kurt Hindenburg.
Committed on 05/02/11 at 22:00.
Pushed by hindenburg into branch 'KDE/4.6'.

Disable tab close methods until the issue of menu being trashed can be
resolved.

Backport to 4.6 branch.
CCBUG: 185466

M  +3    -2    src/ViewContainer.cpp     

http://commits.kde.org/konsole/e52b6b0ac0292abdf654e4fb408fd501542c02fa
Comment 56 Kurt Hindenburg 2011-02-05 22:47:04 UTC
Git commit 18dd5bd012dae86b118c7b7a132866c0c7781297 by Kurt Hindenburg.
Committed on 05/02/11 at 21:58.
Pushed by hindenburg into branch 'KDE/4.6'.

Fix issue where the context menu popup no longer appeared after closing
a tab.

Backport to 4.6 branch.
CCBUG: 185466

M  +2    -0    src/MainWindow.cpp     
M  +1    -1    src/MainWindow.h     
M  +4    -0    src/ViewManager.cpp     
M  +6    -0    src/ViewManager.h     

http://commits.kde.org/konsole/18dd5bd012dae86b118c7b7a132866c0c7781297
Comment 57 Christoph Feck 2011-02-07 17:53:35 UTC
*** Bug 265706 has been marked as a duplicate of this bug. ***
Comment 58 Ingmar Vanhassel 2011-02-10 23:56:40 UTC
I applied both the patches from #55 and #56 and these patches seem to break Ctrl + shift + w to close a tab.

Can anyone confirm?
Comment 59 Kurt Hindenburg 2011-02-11 04:38:54 UTC
re #58 - the shortcut works fine for me under trunk.  What happens when you do it?
Comment 60 BRULE Herman 2011-02-11 09:15:03 UTC
re #59, re read the threads, the problem is not the shortcut, it's this action break the menu on right click.
Comment 61 Ingmar Vanhassel 2011-02-11 11:17:40 UTC
@ Kurt:
Sorry, I meant to add that I applied those 2 patches on our 4.4.0 packages. Am I missing a patch?
I'm just making sure that this will be fixed in 4.4.1. :)
Comment 62 Dhaval Patel 2011-02-11 14:28:43 UTC
Ingmar, you mean 4.6.1? By the way, when is that scheduled to come out?
Comment 63 Ingmar Vanhassel 2011-02-11 16:15:00 UTC
Yes, I meant 4.6.1 :/. tagged 24/2, released 1/3.
Comment 64 Will Stephenson 2011-02-15 13:54:52 UTC
Fix has been backported to openSUSE KDE:Distro:Factory 4.6.0 packages.
Comment 65 chx1975 2011-02-22 10:29:59 UTC
I am on 4:4.5.3-0ubuntu1~lucid1~ppa1 and the bug affects me. Any chance of a fix?
Comment 66 Kurt Hindenburg 2011-03-04 21:00:52 UTC
*** Bug 267651 has been marked as a duplicate of this bug. ***
Comment 67 Vincent Batts 2011-03-05 03:22:36 UTC
I've confirmed this patch fixes the issue on KDE-4.5.5
Comment 68 Kurt Hindenburg 2011-04-05 17:36:50 UTC
Git commit 467fb1edcbc53081de348251cef490ed5002fa3b by Kurt Hindenburg.
Committed on 05/04/2011 at 17:11.
Pushed by hindenburg into branch 'master'.

Restore 'Close Tab' on the tab context menu and the close tabbar button.

These 2 options were disabled due to they messed up the menu texts
after the fix for bko 185466.
The close method via dbus has been disabled as it causes menu issues.

Most of patch to fix 'Close Tab' by Albert Astals Cid aacid@kde.org
BUG: 267896
CCBUG: 185466
FIXED-IN: 4.6.3

M  +2    -1    src/Session.h     
M  +7    -14   src/ViewContainer.cpp     
M  +1    -1    src/ViewContainer.h     
M  +13   -0    src/ViewManager.cpp     
M  +2    -0    src/ViewManager.h     

http://commits.kde.org/konsole/467fb1edcbc53081de348251cef490ed5002fa3b
Comment 69 Dhaval Patel 2011-04-05 17:50:29 UTC
Is it too late for this change to make it into 4.6.2?
Comment 70 Raphael Kubo da Costa 2011-04-05 18:02:54 UTC
Yes, 4.6.2 was tagged a few days ago, and should be out really soon.
Comment 71 Kurt Hindenburg 2011-04-09 22:07:16 UTC
Git commit 05367a7e7463435e7b0a50827875f6dd6ee1940c by Kurt Hindenburg.
Committed on 09/04/2011 at 22:10.
Pushed by hindenburg into branch 'KDE/4.6'.

Restore 'Close Tab' on the tab context menu and the close tabbar button.

These 2 options were disabled due to they messed up the menu texts
after the fix for bko 185466.
The close method via dbus has been disabled as it causes menu issues.

Most of patch to fix 'Close Tab' by Albert Astals Cid aacid@kde.org
CCBUG: 267896
CCBUG: 185466
FIXED-IN: 4.6.3
CCMAIL: aacid@kde.org
(cherry picked from commit 467fb1edcbc53081de348251cef490ed5002fa3b)

M  +2    -1    src/Session.h     
M  +6    -13   src/ViewContainer.cpp     
M  +1    -1    src/ViewContainer.h     
M  +13   -0    src/ViewManager.cpp     
M  +2    -0    src/ViewManager.h     

http://commits.kde.org/konsole/05367a7e7463435e7b0a50827875f6dd6ee1940c
Comment 72 Jekyll Wu 2011-11-25 17:38:54 UTC
I think this problem has been fixed for quite some time. Feel free to reopen or leave comment if this still happens in recent version of KDE SC.
Comment 73 Bart Swennen 2015-04-05 10:24:35 UTC
Using plasma 5.2.2 (KDE frameworks 5.8):
when I select some text and right click on it, the context menu disappears and the entire Konsole window freezes. 
The freeze on right-click does not happen when I haven't selected any text.
Comment 74 Alexander 2015-09-16 14:19:44 UTC
I'm experiencing the same thing with konsole 2.14.2, kde 4.14.8.
No extra tabs or running programs are needed, it all happens with a plain new session on a single tab.
It doesn't freeze if there is no selection or if the selected text consists of whitespaces only.
With nontrivial text it freezes temporarily for about 3 minutes, after which it unfreezes and the menu works perfectly ever after. It also works on other instances of konsole opened after the first one unfreezed, or on other tabs, but freezes again in yakuake. If I kill all instances of konsole and open a new one the whole story repeats itself.
Another thing I found out while experimenting is that the freeze does _not_ happen when kded4 is not running - e.g. if I kill it before making the selection.