Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a question about the gnome-terminal. If I open firefox or my file explorer, if I close it while maximized, the next time I open it it's also maximized, but I can't do this with the terminal. Do you know any way to make it save the state? Thanks!

share|improve this question

3 Answers 3

up vote 1 down vote accepted

You'd probably get best value by creating a quicklist entry or two to open a maxed terminal, one of a specific size or what ever valid gnome-terminal option(s) you choose inc. below saved & load

As far as your question you could do that in a fashion by saving to a config file before closing the terminal, (gnome-terminal --save-config=term.txt & then altering the launch command to load from that file, (gnome-terminal --load-config=term.txt) or thru quicklist entry(s)

So as an example for 11.04/11.10, note the geometry command is adjustable. In example am showing most useful quicklist options, what show up is determined by what's on the X-Ayatana-Desktop-Shortcuts= line in order listed or in 12.04 by what's on the Actions= line

Am not suggesting you use all, just examples of what you can do. If you were to use a load & save options then note that when saving a config ALL open instances are saved

gedit ~/.local.share/applications/gnome-terminal.desktop

[Desktop Entry]
Name=Terminal
Comment=Use the command line
TryExec=gnome-terminal
Exec=gnome-terminal
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=2.32.1
Categories=GNOME;GTK;Utility;TerminalEmulator;
StartupNotify=true
X-Ubuntu-Gettext-Domain=gnome-terminal
X-Ayatana-Desktop-Shortcuts=New;Large;Maxed;Save;Load;

[New Shortcut Group]
Name=New Terminal
Exec=gnome-terminal
TargetEnvironment=Unity

[Large Shortcut Group]
Name=New Large Terminal
Exec=gnome-terminal --geometry=140x34
TargetEnvironment=Unity

[Maxed Shortcut Group]
Name=Maxed Terminal
Exec=gnome-terminal --maximize
TargetEnvironment=Unity 

[Save Shortcut Group]
Name=Save Config
Exec=gnome-terminal  --save-config=term.txt
TargetEnvironment=Unity

[Load Shortcut Group]
Name=Load Config
Exec=gnome-terminal  --load-config=term.txt
TargetEnvironment=Unity`

Starting in 12.04 X-Ayatana-Desktop-Shortcuts= is no longer being used, Actions= is the new way. Small example below

Name=Terminal
Comment=Use the command line
TryExec=gnome-terminal
Exec=gnome-terminal
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=3.4.0.1
Categories=GNOME;GTK;Utility;TerminalEmulator;
StartupNotify=true
OnlyShowIn=GNOME;Unity;
Keywords=Run;
Actions=New;Large;Maxed;Save;Load;
X-Ubuntu-Gettext-Domain=gnome-terminal

[Desktop Action New]
Name=New Terminal
Exec=gnome-terminal
OnlyShowIn=Unity

ect.
share|improve this answer

You cannot, for what I know, but you start it always maximized, see

Set Ctrl+Alt+T to open a maximized terminal

or set a given size premanently

Set terminal size permanently

share|improve this answer
    
It worked with Ctrl+Alt+T, it doesn't for the icon on the side bar. And actually it isn't what I wanted at all, but it can work. –  cgc512 Mar 31 '12 at 9:35

There's a way to do a something similar to what you are asking for. Open theTerminal, then go to Edit menu and click on Profile Preferences and go to the General tab. There you can see Use custom default terminal size option. enter image description here

But, how do you know how many columns and rows you need? Well, when you are dragging the Terminal to increase the window size you see how the columns and the rows (e.g. 159×48 in my case): enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.