Bug 155603 - Konsole needs an easy way to resize the window to 80 columns
Summary: Konsole needs an easy way to resize the window to 80 columns
Status: REOPENED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 153433 168419 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-13 05:07 UTC by Karl Robillard
Modified: 2021-07-24 20:53 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Robillard 2008-01-13 05:07:42 UTC
Version:            (using KDE KDE 4.0.0)
Installed from:    Compiled From Sources

This could be accomplished by:

  1) Show the character dimensions when the window is resized.
  2) Bring back the Settings -> Size menu from KDE 3.
Comment 1 Robert Knight 2008-01-13 05:19:38 UTC
> Konsole needs an easy way to resize the window to 80 columns 

I don't have any objection to it, but why the need to have a specific window width?
Comment 2 Amy Brodzik 2008-01-13 05:31:42 UTC
> I don't have any objection to it, but why the need to have a specific window width?

Many programs expect the terminal to be 80 columns. I also prefer it to be 80×24 for æsthetic reasons.
Comment 3 Karl Robillard 2008-01-13 05:43:10 UTC
80 columns is simply an old standard (e.g. text-only terminals) which I still adhere to.  All my text & code fits in 80 columns.
Comment 4 Robert Knight 2008-01-13 15:17:34 UTC
> 1) Show the character dimensions when the window is resized.

The code for that, including the "Size: X x Y" string is already in the code - it just needs a little polishing, so I can do that in a 4.0.x release.

> 2) Bring back the Settings -> Size menu from KDE 3. 

That needs new menu items so it will have to wait until KDE 4.1
Comment 5 Robert Knight 2008-01-13 20:53:53 UTC
SVN commit 760960 "Backport #760957.  Show terminal size in a label in the center of the display when resizing the terminal.  Change the default bell mode to 'System Notification'.  Fixed Settings -> Configure Notifications changes having no effect." 

The change will be in KDE 4.0.1 which will ship around the end of this month.
Comment 6 Robert Knight 2008-01-16 02:16:20 UTC
Relates to http://bugs.kde.org/show_bug.cgi?id=147094
Comment 7 Fred Wells 2008-08-11 22:53:12 UTC
Maybe I'm missing something, but it's not there in my KDE 4.1.  I also need to be able to set the konsole geometry on startup.  Looking forward to the return of this feature.
Comment 8 Juergen Harms 2009-03-08 17:22:19 UTC
I submitted a corresponding bug for the mandriva platform: still missing in 4.1.2.

Justification for the need to determine the initial geometry:
 - keep your desktop tidy, allow standard applications to create a konsole occupying precisely the place needed, and not more
 - some applications (e.g. minicom) assume that the konsole has a predefined size (80 x 25 if I remember right).

Logic of the problem:
To me this looks like a consequence of the "set to default" button having gone away. As a result, konsolerc is updated each time the geometry of any konsole is modified, and newly created konsoles are than automatically set to that size - which is, to be polite, cumbersome. There is a second issue: the possibility of creating profiles that define an initial geometry has also gone away - I did not find any setup tools for defining that geometry. I tried text editing the old Height or Width <nn>=<mm> statements into the profile definition, does not complain, but does not work either - it appears that the value from konsolerc is always taken into account, whatever profile says.

A similar problem exists for the menubar (KDE bug #186561) - here the means to specify for a profile whether new konsoles should be created with or without a menubar exist, but dont work: the contents of profilerc have priority, a new konsole has or has not a menubar as specified in konsolerc, the value from the profile does not matter.

Personally, I would prefer to have the "set as default" facility back. If not, a reasonable compromise would be to leave things re defaults as they are (values form konsolrc, updated whenever any konsole is modified), but, for konsoles launched with a specified profile, have the definition from the profile take priority over the default settings. Evidently, the mechanism defining a profile should allow the user to specify the geometry.
Comment 9 Juergen Harms 2009-03-08 22:04:24 UTC
Sorry, I jumped at conclusions. After some more checking, the hypotheses still holds that the last change of settings is remembered and is used to determine the parameters used for a newly created konsole. But this remembering is not done in konsolrc.
Comment 10 Jay Mallar 2009-03-11 21:51:10 UTC
Here's justification for the option...  I connect to three different types of session.  1 for my local machine in which I prefer full width screens.  My second set is for some old mainframes which only support 80x32.  My third allows me various options, I prefer 80x50.  Remembering from one konsole session to the next isn't sufficient as I constantly be resizing every time I hit a new machine type.
Comment 11 Patrick R. Michaud 2009-04-13 05:32:29 UTC
I also have a strong need for the --geometry option (and width x height) in konsole.  In KDE 3 I have several hotkeys set up to open applications in konsoles at specific sizes and locations of the desktop -- the lack of a similar feature in KDE 4 means I will have to look for other desktop solutions.

Pm
Comment 12 Lee Lofgren 2009-05-04 20:47:52 UTC
I just moved from KDE 3 to KDE 4 and found that vt_sz was removed and that --geometry doesn't work. It seems that all other bug references point to this bug, but this one is assigned as wishlist. I use konsole  to connect to a text based accounting app that expects 80x25. The screen layout gets garbled if it is any other size or if I accidentally change the size while trying to move it. Please elevate this bug or Bug 15433 or Bux 147094. It seem to have a low priority considering the importance of this feature (Or does no one use text based apps anymore?).
Comment 13 hronir 2009-05-07 00:11:39 UTC
Any time estimate for the fixing of such an annoying bug?
I can see it's since january 2008 that such a basic and can't-live-without feature was requested...
Comment 14 Robert Knight 2009-05-07 14:29:03 UTC
> Any time estimate for the fixing of such an annoying bug?

Honestly No - I have many other things keeping me busy.  If anyone posts a suitable patch it'll get done faster.
Comment 15 Lee Lofgren 2009-05-07 17:22:09 UTC
How much of the KDE 3 stack was actually required in the KDE3 Konsole. Is there any way that the necessary libraries could be statically linked into the KDE3 Konsole so that it could run without the KDE3 libraries?
Comment 16 groot 2009-09-07 00:47:12 UTC
*** Bug 168419 has been marked as a duplicate of this bug. ***
Comment 17 groot 2009-09-07 00:47:40 UTC
*** Bug 153433 has been marked as a duplicate of this bug. ***
Comment 18 Scott 2009-10-15 18:32:57 UTC
This is a functional problem resulting in people (such as myself) having to use other terminal programs to do what we need to and used to be able to do in previous versions of KDE. Being able to specify the number of rows and columns in an terminal program is pretty basic functionality.
Comment 19 Juergen Harms 2009-10-16 09:01:35 UTC
I agree - this is shocking regression from KDE3, I feel tempted to fill pages of ranting ...

A - functionally limited - workaround is:

- Use the right button on the title-bar of a konsole window to open a 
  pulldown menu
- Open the "Advanced" sub-menu
- Open the "Special Application Settings...") sub-menu of that menu
- You now have a tabbed window which in its "Geometry" tab allows you to
  specify that newly created (konsole-) windows come up ("Apply initially")
  with a given size. You specify the size as a comma-separated pair - not of
  characters and lines, but of pixels (use xwininfo to read the size of a 
  konsole window that you have created and that has the desired size - you 
  have to add to the geometry-values thus found he height of the titlebar,
  normally 22, and the widths of the 3 other borders, normally 4 for for 
  each of them).

As a result, all konsoles will now be initially opened with the size you have
choosen. I did no digging - this looks class-based, so if you call certain 
consoles under another name, you should be able to differentiate between different initial sizes
Comment 20 Alain Knaff 2010-01-06 21:02:19 UTC
Jürgen, thanks for this workaround. I've been using this since a couple of months now, and it does indeed work most of the time.

However, on occasion, konsole still opens up with weird size. But now it's so rare that it is manageable.

Just pointing this out for completeness' sake.
Comment 21 Juergen Harms 2010-01-07 12:02:11 UTC
The following remark is slightly off-topic for bugzilla, but it must be made: due to this and comparable other bugs, I have moved to Gnome now. I would love to come back (the concept and features of KDE are substantially superiour, but ...). KDE should make a slight shift of emphasis from effort put on innovation to effort put on improving user satisfaction!

Happy birthday to bug 155603!
Comment 22 Vaso 2010-04-20 10:56:24 UTC
Hi all!

I have:
  $ konsole -v
  Qt: 4.6.2
  KDE: 4.4.2 (KDE 4.4.2)
  Konsole: 2.4.2

With this stuff at startup:
  $ konsole
  konsole(6996)/kdeui (kdelibs): Attempt to use QAction "change-profile" with KXMLGUIFactory!
  $ Undecodable sequence: \001b(hex)[?1034h

And 
  # konsole --geometry 100x100+400+400
  works only for root

But for user it works only with --nofork parameter and only with "-" sign, e.g.:
  konsole --nofork --geometry 100x100-400-400

Amusing behavior, isn't it?
Comment 23 Shawn Rutledge 2011-07-20 09:11:06 UTC
It is a genuine bug that konsole --help-all gives this output:

 --geometry <geometry>     sets the client geometry of the main widget - see man X for the argument format (usually WidthxHeight+XPos+YPos)

and yet it doesn't actually work, without the --nofork parameter.  Why does this drag on for so many years without getting fixed?
Comment 24 Jekyll Wu 2011-08-01 17:59:53 UTC
To be fair, the root cause of the broken --geometry option lies in kdelibs. See bug #165355 .

However, I think konsole can deal that better. See my comment #9 in bug #262169.
Comment 25 Jinesh Choksi 2021-07-23 18:38:38 UTC
You can sort of control Konsole's geometry via using the following command line parameter:

-p <property=value>        Change the value of a profile property.


e.g.

If a user wanted to simulate "konsole --geometry 100x100+400+400" as mentioned in comment 22, they can use the following command:

konsole -geometry +400+400 -p TerminalColumns=100 -p TerminalRows=100

Note, 100 rows may be too large for most people's screens and so Konsole will do the right thing and only expand the rows to what is visibly fittable on the screen. It will helpfully adjust the Y axis figure as well to fit as many rows as possible.

So try using command to confirm things work as wanted:

konsole -geometry +400+400 -p TerminalColumns=84 -p TerminalRows=24
Comment 26 Vaso 2021-07-24 15:08:37 UTC
(In reply to Jinesh Choksi from comment #25)
> You can sort of control Konsole's geometry via using the following command
> line parameter:
> 
> -p <property=value>        Change the value of a profile property.
> 
> 
> e.g.
> 
> If a user wanted to simulate "konsole --geometry 100x100+400+400" as
> mentioned in comment 22, they can use the following command:
> 
> konsole -geometry +400+400 -p TerminalColumns=100 -p TerminalRows=100
> 
> Note, 100 rows may be too large for most people's screens and so Konsole
> will do the right thing and only expand the rows to what is visibly fittable
> on the screen. It will helpfully adjust the Y axis figure as well to fit as
> many rows as possible.
> 
> So try using command to confirm things work as wanted:
> 
> konsole -geometry +400+400 -p TerminalColumns=84 -p TerminalRows=24

Tested on:
Ubuntu 20.04.2 LTS
konsole 19.12.3
plasmashell 5.18.5

KDE neon User Edition 5.22
konsole 21.04.3
plasmashell 5.22.3

$ konsole --geometry 200x200+400+400 -- Runs konsole 12x5 at position +400+400
$ konsole -geometry +400+400 -p TerminalColumns=84 -p TerminalRows=24 -- Runs konsole with previos size (12x5 as about) at position +400+400
$ konsole -geometry +200+200 -p TerminalColumns=84 -p TerminalRows=24 -- Runs konsole with previos size (12x5 as about) at position +200+200

So properties like TerminalColumns and TerminalRows are still ignoring by konsole
Comment 27 Darin McBride 2021-07-24 20:53:59 UTC
(In reply to Vaso from comment #26)
> So properties like TerminalColumns and TerminalRows are still ignoring by
> konsole

FYI, with konsole 20.12.3, KDE Frameworks 5.84.0, Qt 5.15.2 on Gentoo, these properties appear to work for me.