After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 97922 - gnome-terminal size not restored.
gnome-terminal size not restored.
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 124748 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-11-07 13:33 UTC by Brad Garcia
Modified: 2005-08-26 10:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.0



Description Brad Garcia 2002-11-07 13:33:03 UTC
When I save my gnome session, I have a number of gnome terminals
running.  One of them has a non-standard size.

When I restart gnome, the terminal is restored, but the size is
the standard 80x24 instead of the size listed in metacity's session
file (I checked the file, and it does have the correct values for
width and height).
Comment 1 Brad Garcia 2002-11-07 13:51:39 UTC
Could this be related to bug 96510?

I don't know if it would make a difference, but the gnome-terminal
in question was on the 2nd of three horizontal workspaces.
Comment 2 Brad Garcia 2002-11-07 15:42:27 UTC
More information:

Ok, I was able to move the terminals around a bit, save the
session again, and have it be restored correctly.  The windows
were placed in the exact same position that they were last time.

In the original PR, two terminals were out of place.  In addition
to the one terminal having incorrect size, it had also switched
places with another terminal.

The terminal with the incorrect size is automatically execing a
program.  It currently has the highest stacking number.  Before,
when it did not appear correctly, it did not have the highest
stacking number.

Hope that helps.
Comment 3 Heath Harrelson 2002-11-18 21:13:19 UTC
This actually sounds like a session-saving problem in gnome-terminal.
 Maybe this is a dup of bug 96788?

Moving to gnome-terminal, since I can't see how this is Metacity's fault.
Comment 4 Brad Garcia 2002-11-19 11:10:06 UTC
> I can't see how this is Metacity's fault.

Metacity is the application that saves the window sizes, is it not?
I assume that also means it is responsible for sizing the window
correctly when the application is restarted.

But, since hp is the assignee in either case, I'll leave it be until
he chimes in.
Comment 5 Brad Garcia 2002-11-19 11:33:45 UTC
> This actually sounds like a session-saving problem in gnome-terminal.
> Maybe this is a dup of bug 96788?

Nope, that's a different problem.

The gnome-terminal session-saving stuff goes into ~/.gnome2/session.
This part is written by gnome-terminal.

The window-sizing stuff ends up in the
~/.metacity/sessions/<some-ungodly-named-file>.ms file.
It looks like this file is written by metacity.  I don't see anything
in the gnome-terminal source that would write the contents of this
file.

Why this information is split between two files, and how it gets
restored, is a mystery to me.
Comment 6 Heath Harrelson 2002-11-22 03:22:31 UTC
I'm sorry for the misunderstanding.  I've looked into this, and this
bug is in Metacity.  It's also a duplicate.

There's a lot of discussion in the other bug (bug 81802, see also bug
91481), including a partial implementation to save / restore window
positions.  The patch also handles window history.

Note that the patch's author has purposefully written the patch so
that it only restores the window's location, at present.

*** This bug has been marked as a duplicate of 81802 ***
Comment 7 Benjamin Kahn 2002-11-22 21:19:47 UTC
I don't think this bug is related to 81802 since it has to do with
sessions as opposed to window history.  Also, this sounds like a bug
with whatever was restoring the session.  I assume that's metacity,
but I haven't read through the session stuff closely enough to know.
Comment 8 Heath Harrelson 2002-11-22 21:29:12 UTC
Fine.  You guys want the bug so much, you can have it. I won't touch
it again.
Comment 9 Havoc Pennington 2002-11-22 21:47:35 UTC
no one has a clue whether this is metacity or gnome-terminal or what
the cause of the problem is until someone investigates, as far as I'm
concerned. use the metacity log file for example, and check stderr.
Comment 10 Mariano Suárez-Alvarez 2003-04-15 21:23:52 UTC
The problem is with vte. 

Edit $GNOMEPREFIX/share/vte/termcap/xterm (the default termcap for
vte) so that it says co#100:it#8:li#50 somewhere near the top, and
gnome-terminal will get a 100x50 window when you log into your
session, instead of whatever the size was when you saved the session. 

This is part of bug 108931, which was closed as fixed, but did not fix
this.
Comment 11 Havoc Pennington 2003-04-21 18:10:53 UTC
Mariano, did you have a patch for this on bug 108931 that I didn't
apply? I thought I got everything.

Anyhow, if the required patch would be in VTE, we should move this 
bug to that component.
Comment 12 devsk 2003-08-24 07:09:37 UTC
This still doesn't work for gnome-terminals(2.3.2 with vte .11.10)
with more than one tabs. Is anybody looking into it? For one tab, it
works fine.
Comment 13 Mariano Suárez-Alvarez 2004-02-23 17:58:25 UTC
This should be working now.
Comment 14 Mariano Suárez-Alvarez 2004-02-23 18:00:28 UTC
*** Bug 124748 has been marked as a duplicate of this bug. ***