Bug 107470

Summary: logical screen width wrong when restoring konsole window with multiple sessions
Product: [Applications] konsole Reporter: patrick
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: adaptee, p13, pontillo
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description patrick 2005-06-15 16:51:41 UTC
Version:           1.5.1 (KDE 3.4.1) (using KDE KDE 3.4.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Background: I have a Konsole Window open on one of my desktops at all times, usually with 4 or 5 sessions open inside the window. When logging in, Konsole is restored from the last KDE session with the according number of shell sessions. The Konsole window is maximized, and this setting is saved as the default in Konsole's settings.

It seems like the sessions, which are not visible do have the wrong logical screen width when the shell within them is started. I can see, this, because I run the fortune program from my .bashrc/.profile and in all sessions except for the one currently visible the fortunes are word wrapped to what seems a logical line width of 37 characters (no idea where that number comes from...).

Example fortune from the visible shell session (correctly displayed, I hope the wordwrapping carries over in the BTS):
------------------------------------------
"We'll look into it":
        By the time the wheels make a full turn, we
        assume you will have forgotten about it, too.
------------------------------------------

Fortune from a shell session which is not visible when restoring Konsole:
------------------------------------------
(1)     A sheet of paper is an ink-l
ined plane.
(2)     An inclined plane is a slope
up.
(3)     A slow pup is a lazy dog.

QED: A sheet of paper is a lazy dog.
                -- Willard Espy, "An
 Almanac of Words at Play"
------------------------------------------

As you can see the latter fortune is word wrapped, even though the corresponding session is capable of displaying 152 characters, before the line is filled.

Calling "fortune" after the sessions have been restored yields the correct (non word wrapped) results.

Patrick
Comment 1 Kurt Hindenburg 2005-06-15 17:51:25 UTC
This was fixed in bug:90309.  My KDE 3.4.1 it works correctly.
Comment 2 patrick 2005-06-15 18:02:51 UTC
Hmm...

(0) $ COLUMNS=70 dpkg -l konsole
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Säubern/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/Fehlgeschl. Konf./Halb install.
|/ Fehler?=(keiner)/Halten/R=Neuinst. notw/X=beides (Status, Fehler: GROß=schlecht)
||/ Name           Version        Beschreibung
+++-==============-==============-============================================
ii  konsole        3.4.1-1        X terminal emulator for KDE

I'll investigate...

Patrick
Comment 3 patrick 2005-06-15 18:15:53 UTC
OK, I just checked the sources of the Debian package, and the patch referenced in bug:90309 is definitely there. I'll now recompile from those source to rule out a discrepancy between the binary package and the sources.

BTW: Please note: I don't know, if the --profile option mentioned in bug:90309 has any immediate relevance on this bug. In any case: my console is not started with a "--profile" option, but is restored via KDE's session management, when I log in...

Commandline as per "ps -ef":
konsole [kdeinit] -session 10150140dbe9000111479879200000232970028_1118794083_509223

Patrick

Patrick
Comment 4 Kurt Hindenburg 2005-06-15 18:23:38 UTC
Basically the same code is used for session management and --profile

Try 'konsole --profile 4shells' and see what you get.

konsole --profiles for a list.
Comment 5 patrick 2005-06-15 18:43:05 UTC
I get "mixed" results with "konsole --profile 4shells". The first session is OK, in the second session the fortune is wrapped. Same for the 3rd session... The fourth session is OK again...

I then tried with 3shells and 5shells, and the pattern I can see is, that the first and the last are each OK (not wrapped) and those between are not OK (they *are* wrapped). 2shells shows both OK.

Patrick
Comment 6 Kurt Hindenburg 2005-06-15 20:08:12 UTC
I just installed fortune and I get the correct behavior.

Try this:
1. close all konsoles
2. mv $KDEHOME/share/config/konsolerc ~
3. konsole --profile 4shells

See what you get...
Comment 7 Kurt Hindenburg 2005-06-15 20:27:30 UTC
Yea, I ran 3.4 in Xnest and this bug showed up.  Perhaps having to do with timing...
Comment 8 patrick 2005-06-15 21:53:04 UTC
Regarding comment #6: Same behaviour with konsolerc moved away (first and last OK, others not)

Patrick
Comment 9 patrick 2007-03-21 09:24:09 UTC
I still get a behaviour similar to what is described above in Version 1.6.5 of Konsole (KDE 3.5.5 from Debian packages). The *last* session in the Konsole Window gets restored from the KDE session with the wrong logical screen width.

I was able to reproduce this by logging in, having the KDE session restore a Konsole window with 7 sessions. I then switched the *first* session to "Send input to all sessions" and the result is, that in the last (rightmost) session any input is wrapped after 37 characters. After going to the last session once the problem goes away, so the bug only seems to happen, if the last session has not been displayed yet.

regards,
Patrick
Comment 10 Robert Knight 2007-12-16 17:08:50 UTC
*** Bug 153340 has been marked as a duplicate of this bug. ***
Comment 11 p13 2007-12-17 03:32:12 UTC
I have a clue.  ;-)  

The OP noted a wrap at 37 characters on a 152 character Konsole (approx one quarter).  I see a wrap at 23 characters on an 86 character full screen Konsole (~1/4), and at 21 on 80 ch full screen (~1/4).  

Also there is no problem on tabs/sessions that have been opened before /fortune/ is displayed.  If I am quick I can click on all of them.  It is only the tabs that start "hidden" that display the bug.  

konsole -v
Qt: 3.3.8
KDE: 3.5.7
Konsole: 1.6.6
Comment 12 peter_s_d 2008-01-23 02:57:54 UTC
Things seem to be better behaved if Konsole is not maximised.  
Comment 13 Jekyll Wu 2011-08-24 10:08:49 UTC
I do not think this problem exists in KDE4 konsole, at least not in recent version.