60

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.

tutuca
  • 2,762

11 Answers11

57

Launch gnome-terminal as such:

gnome-terminal --window --maximize
Tommy Brunn
  • 10,021
41
  • Open a Terminal.
  • From Edit menu select Profile Preferences.
  • Tick 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?

Craig
  • 1,346
31

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.

[Desktop Entry]
Name=Terminal
Comment=Use the command line
TryExec=gnome-terminal
Exec=gnome-terminal --window --maximize
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.0
Categories=GNOME;GTK;Utility;TerminalEmulator;
StartupNotify=true
OnlyShowIn=GNOME;
X-Ubuntu-Gettext-Domain=gnome-terminal

Then log out and log back to apply the changes.

Mmmh mmh
  • 121
Isaiah
  • 60,750
9

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 put class=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).

9

In Ubuntu 11.10 and up:

  • Search > Keyboard > Shortcuts > Custom Shortcuts > Add (+ button) >
    • Name: Launch Terminal Maximized
    • Command: gnome-terminal --window --maximize
  • Click Apply
  • Click on 'Disabled'
  • Shift+Ctrl+Alt+T
RolandiXor
  • 51,797
7

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

  1. Rename original gnome-terminal executable to gnome-terminal-original:

    cd /usr/bin
    sudo mv gnome-terminal gnome-terminal-original
    
  2. Create a new file in /usr/bin named gnome-terminal with the following content:

    #!/bin/bash
    /usr/bin/gnome-terminal-original --maximize $@
    
  3. Make it executable:

    sudo chmod +x gnome-terminal
    

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 or apt-get upgrade.

Note: the $@ parameter means that all arguments that might get passed to gnome-terminal will still get passed to gnome-terminal-original, along with --maximize argument.

A better solution

  1. Install "wmctrl":

    sudo apt-get install wmctrl
    
  2. Add this line to the very end of your ~/.bashrc file:

    wmctrl -i -r $WINDOWID -b add,maximized_vert,maximized_horz
    
  3. 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.

Brane
  • 446
6
gnome-terminal --full-screen

You could create a shortcut on your desktop or panel to this command.

popey
  • 24,549
2

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:

  • Open a terminal
  • Choose Edit
  • In the General tab, check "Use custom default terminal size"
  • You need to adjust these values so that they fit your screen by simple trial and error

The column setting is 128 for me. You should set the values that best suit you.

wjandrea
  • 14,504
Siamore
  • 864
1

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.

damadam
  • 2,873
0

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.

slava
  • 4,085
-1

You can probably modify your shortcuts to use the maximize one so that it always starts that way.

The easiest way of doing so is to locate your application (in /usr/share/applications or ~/.local/share/applications) and to modify your .desktop file.

In that .desktop file, you will see the line that starts with Exec=.... To start gnome-terminal maximized, all you need to do is to add --start-maximized to the end of the command.

wjandrea
  • 14,504
Nigel
  • 487