Bug 90309

Summary: incorrect terminal size before first visited when using --profile=
Product: [Applications] konsole Reporter: Michael Daum <micha>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: adaptee
Priority: NOR    
Version: 1.3.2   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch to fix init of TE size.

Description Michael Daum 2004-09-27 10:42:12 UTC
Version:           1.3.2 (using KDE 3.2.3,  (testing/unstable))
Compiler:          gcc version 3.3.3 (Debian 20040422)
OS:                Linux (i686) release 2.6.7-686-smp-nats

I'm used to open a special konsole profile with several ssh processes to a set of machines I want to admin then in parallel by sending all input to all terminals. But before the set of terminal sessions is usable I have to switch thru all of them (15x shift-right) to get the terminal emulation initialized. The background is transparent with a slight tint and will be scaled from tiled to maxspec when focused before my eyes. If I don't do so first, things get wired, i.e. on a parallel vim or apt-get.
Comment 1 Kurt Hindenburg 2005-01-30 21:04:23 UTC
Do you still have problems when using a non-transparent schema?  And what do you mean by 'things get wired'?
Any chance you can test the beta KDE3.4?  or perhaps 3.3.x?
Comment 2 Michael Daum 2005-01-31 09:24:17 UTC
The error does not depend on a transparent background.

"Things get wired" means, that in- and output chars are placed incorrectly.

No, I will not test beta.

This error shouldn't be so hard to reproduce, is it?
Comment 3 Kurt Hindenburg 2005-02-06 23:44:38 UTC
Perhaps a screenshot of the 'wired' session.

Is Konsole started by the session manager (ie when you login to KDE as your user) or are you starting Konsole and creating new tabs/sessions?

Can you reproduce by not using ssh?
Comment 4 Michael Daum 2005-02-07 09:20:14 UTC
This works also without ssh. 

How to reproduce this bug:
1) start konsole ;)
2) press ctrl-alt-n 10 times
3) set sending the input from the first session to all others 
4) save sessions profile as "TestProfile"
5) type konsole --profile TestProfile on some commandline
6) type ls 
7) visit all sessions

If you reverse 6) and 7), i.e. first visit all 10 sessions,
"this will not be weird". (btw s/wired/weird/g ;)


Comment 5 Kurt Hindenburg 2005-02-07 19:15:59 UTC
Thanks for the 'how to reproduce'  It does indeed do as you say even on 3.4.beta2.  
I think this is related to BR81173.  It appears that the 'restored' session tabs have 20 wide chars, for some reason.

Note: It has nothing to do with 'sending input to all others'.  You can remove #3 and this problem still happens.
Comment 6 Kurt Hindenburg 2005-02-20 18:38:07 UTC
Created attachment 9746 [details]
Patch to fix init of TE size.

This appears to fix it.  The problem is that with --profile, the TEs are
initialize to the setMinimum size and then resized later.  This patch 'shows'
konsole after the first session is created, thus allowing the 2nd+ sessions to
init to the correct size.  It appears to work fine here.

Rather late, but it is an annoying bug for those that use --profile.
Comment 7 Kurt Hindenburg 2005-02-21 07:11:06 UTC
CVS commit by hindenburg: 

BUG: 90309
Fix terminal size for --profile sessions.


  M +4 -1      main.cpp   1.286


--- kdebase/konsole/konsole/main.cpp  #1.285:1.286
@@ -508,4 +508,8 @@ extern "C" int KDE_EXPORT kdemain(int ar
         counter++;
 
+        // show() before 2nd+ sessions are created allows --profile to
+        //  initialize the TE size correctly.
+        m->show();
+
         while (counter < session_count)
         {
@@ -553,5 +557,4 @@ extern "C" int KDE_EXPORT kdemain(int ar
         n++;
         m->activateSession( sessionconfig->readNumEntry("ActiveSession",0) );
-        m->show();
         m->setAutoClose(auto_close);
     }


Comment 8 Kurt Hindenburg 2005-02-21 07:13:46 UTC
Note that the 'for' loop is still required.  I tested this patch and didn't find any problems.

          // Hack to work-around sessions initialized with minimum size
          for (int i=0;i<counter;i++)
            m->activateSession( i );
Comment 9 Michael Daum 2005-06-22 10:14:02 UTC
This bug is still not resolved in kde-3.4.1/konsole-1.5.1.
However the behaviour changed but is still buggy: when opening
a profile with multiple terminals in it, the main konsole window
is shrunken to a different size than given during "save profile" and
all terminals get opened one after the other in a very flickering way.
When maximizing the konsole main window again the terminals still are not
initialized correctly in contrast to what has been commented above on this
bug report. This bug gets reopended again :(
Comment 10 Michael Daum 2006-02-15 11:57:33 UTC
This bug is still not resolved in kde-3.5.1/konsole-1.6.
Comment 11 Ferdinand Gassauer 2006-11-08 11:19:54 UTC
IMHO saveing a profile does not save the size (Example 80x24).

konsole has to be called with something like

konsole  --profile <profile_name> --vt_sz 80x24

Comment 12 Jekyll Wu 2011-08-04 13:07:00 UTC
KDE3 is gone. The --profile option has different meaning in KDE4 konsole.