Sunday, May 5, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2027  / 1 Year ago, fri, november 25, 2022, 8:54:57

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!


More From » command-line

 Answers
2

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.

[#39566] Saturday, November 26, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
naldis

Total Points: 257
Total Questions: 101
Total Answers: 111

Location: Kenya
Member since Sat, Feb 25, 2023
1 Year ago
naldis questions
;