I want to tell compiz, metacity, the gnome-terminal or whoever is in charge to open the terminal window maximized by default.
How can I do that?
EDIT for the future: most of the answers were upvoted in older ubuntu versions, since 17.10 and on the most upvoted solutions do not work.
Launch gnome-terminal as such:
Edit
menu selectProfile Preferences
.Use custom default terminal size
and enter a default size that is too large for the screen e.g. 240 columns and 100 rows.Close, then open a new Terminal by clicking the icon (or press Ctrl + Alt + T): the new terminal window should be maximised.
This answer is based upon advice I was given here: How to make terminal start maximized?
If you want gnome-terminal to open fullscreen when you open it with Gnome Do or the Applications menu, put the following into a file named
gnome-terminal.desktop
and put that in~/.local/share/applications
.Then log out and log back to apply the changes.
Ubuntu 12.04 and 14.04 LTS
Run
ccsm
(CompizConfig Settings Manager). Under Window Management enable Window Rules and open it, and in the Maximized field putclass=Gnome-terminal
. You may need to log out and log back in before the changes come into effect.If you don't see Window Rules, then make sure you've got the
compiz-plugins
package installed.You can do more. I use
(class=Gnome-terminal) | (class=Evince)
.In Ubuntu 11.10 and up:
gnome-terminal --window --maximize
The selected answer didn't work for me on fully updated Ubuntu 12.04 LTS, so I decided it was time for a more drastic approach. The solutions below are tested up to 16.04 LTS.
My old solution
Rename original
gnome-terminal
executable tognome-terminal-original
:Create a new file in
/usr/bin
namedgnome-terminal
with the following content:Make it executable:
Now no matter how I open the terminal, it always opens maximized. The only downside I see for this approach is that you have to repeat these steps every time you might update
gnome-terminal
with a new version via update manager orapt-get upgrade
.Note: the
$@
parameter means that all arguments that might get passed tognome-terminal
will still get passed tognome-terminal-original
, along with--maximize
argument.A better solution
Install "wmctrl":
Add this line to the very end of your
~/.bashrc
file:Repeat the second step for other user's
.bashrc
files if needed, for example, for "root" user (/root/.bashrc
).This solution will not affect the size of the terminal window initially, but rather maximize it shortly after it opens, usually in a matter of milliseconds. You can try moving the line you added in the second step to the beginning of
.bashrc
file, to make the terminal maximize even earlier.You could create a shortcut on your desktop or panel to this command.
If you just want the terminal to open full size on screen, use the GUI method of changing the default size through current profile preferences dialog appropriately. To do so, simply follow these steps:
The column setting is 128 for me. You should set the values that best suit you.
In QTerminal, you can maximize the window and then close the terminal by the "exit" command. When you Ctrl+Alt+T again it will automatically open maximized.
This can be applied to any size, just set the size you want, "exit" and then open again.
Just add a custom shortcut.
Go to Settings > Devices > Keyboard, scroll down to the end of the list and click on the
+
to add your shortcut.Give it a name and in the command section type
gnome-terminal --maximize
and add your preferred keyboard shortcut combination.