56

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.

11 Answers 11

53

Launch gnome-terminal as such:

gnome-terminal --window --maximize
3
  • It works with the shortcut in the menu bar but it doesn't if I lunch it via gnome-do :( I'm accepting this answer anyway :)
    – tutuca
    Aug 5, 2010 at 17:27
  • I'm pretty sure Gnome-do depends on what's set in the gnome-terminal.desktop file. Oct 29, 2010 at 20:13
  • this works when you launch the command from the terminal or something of the like, but it has no effect on the .desktop file on ubuntu 17.10+
    – tutuca
    Mar 16, 2018 at 22:09
39
  • 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?

4
  • 2
    I confirm this works in 12.04, and is probably the easiest solution (at least for people like me who always work with maximized windows) - thanks! My advice is to set the default columns and rows to just slightly more than what fills the screen, in order not to have problems in case you un-maximize the window. Dec 29, 2012 at 14:57
  • 1
    If you temporarily need a small window, you can always un-maximize the window (double click on top) and click on Terminal > 80x24 Dec 31, 2012 at 8:59
  • 1
    This is the simplest way that works!
    – xmllmx
    Aug 12, 2015 at 4:58
  • That's what I'm doing, but it makes it only almost maximized with a narrow margin on the right and the bottom. Even if I enter absurd 999 x 999 dimensions. Sep 16, 2021 at 10:37
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.

7
  • 2
    It doesn't work in Ubuntu 12.04 May 18, 2012 at 10:40
  • 7
    Actually I found it that [Terminal] disappear from my unity dash. What I realize instead copy above code (outdated on my U13.10) it's better to copy original file $ cp /usr/share/applications/gnome-terminal.desktop ~/.local/share/applications/ and then edit it changing Exec=gnome-terminal to Exec=gnome-terminal --window --maximize. Logout then login again.
    – sobi3ch
    Jan 15, 2014 at 1:57
  • Just wanted to add that I saw the change take effect after closing all my Terminal windows and then relaunching it. Not sure if that's what you meant by "log out and log back" but it worked for me. Thanks! Feb 6, 2015 at 17:03
  • Any idea to make it work with the Launcher and nautilus-open-terminal package?
    – leaf
    Apr 12, 2015 at 19:46
  • 1
    Please consider updating this answer to advise copying the existing desktop file rather than creating a new one. I can't upvote this as it stands. Jul 8, 2018 at 22:44
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).

2
  • I needed to reboot after adding this rule for it to take effect.
    – dave4420
    Dec 8, 2012 at 22:54
  • doesn't work for me :-(. tried rebooting, logging in and out, grabbing the window class automatically (by clicking on the Terminal). I typically start my terminal from the sidebar or with Ctrl+Alt+T. In both cases it still starts with small size. Nov 22, 2013 at 9:51
8

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
4
  • 1
    Do not use "Ubuntu 12" there are always 2 versions per year.
    – RolandiXor
    Sep 25, 2012 at 19:28
  • 1
    where is that Search menu item? (12.04) Dec 29, 2012 at 15:19
  • Launch the 'System Settings' applet from Dash, and there's a search-box in the top-right corner of that applet. That's what I was referring to. BTW, I have been using the method described by @Craig above, and also the --maximmize option for scripting. Dec 31, 2012 at 17:50
  • Thank you. Works without the --window option. Feb 8, 2015 at 8:53
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.

10
  • This is first thing I would always do whenever I install/re-install Ubuntu. Works like a charm. Aug 26, 2016 at 2:50
  • Why doesn't this approach work for Open in terminal context menu entry in Nautilus file manager?
    – orschiro
    Oct 13, 2016 at 12:55
  • @RobertOrzanna if this solution works for you in other situations, it's most likely that Nautilus runs a different terminal program (usually there's more than one installed). Try opening a new terminal while the one launched by Nautilus is running and do ps aux or ps aux | grep term to find out which executables are running. Or, try switching the arguments on the second line in the script like so: $@ --maximize.
    – Brane
    Oct 15, 2016 at 15:51
  • 1
    @RobertOrzanna You're welcome, I'm glad it works for you. The updated solution should affect all terminal windows, not just gnome-terminal - try opening uxterm for example. To put it more accurately, it should affect all applications that start bash or dash in a regular window and load your .bashrc file. It's possible however, to limit the affected applications. If anyone needs that, let me know and I'll add that to my answer.
    – Brane
    Oct 17, 2016 at 9:07
  • 1
    @RobertOrzanna Take a look at this answer: askubuntu.com/questions/27826/… - basically install "maximus" and make it run at startup.
    – Brane
    Oct 19, 2016 at 8:39
6
gnome-terminal --full-screen

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

1
  • 7
    There's a difference between full screen and maximized though. Aug 5, 2010 at 15:11
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.

2
  • 1
    Making the window the same size as the desktop doesn't make it maximized
    – Isaiah
    Oct 29, 2010 at 20:20
  • 1
    @DoR I know but i still consider it as an option and a rather good and easy one at that because it will work even if he uses gnome-do and this is for a newbie who may have the same question he might find this thread and he deserves to have all options shown as he cannot ask a duplicate question and suppose he dosen't want it fully maximized or wants to use gnome-do or any new launcher this option survives...
    – Siamore
    Oct 31, 2010 at 9:38
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.

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.

-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.

1
  • 2
    Can you provide any information about how to do this? Jun 25, 2012 at 0:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .