I'm on Ubuntu 18.04, and I'm trying to make it so that when I open terminal by pressing CTRL-ALT-T, the terminal would open in the center of the screen instead of in the top left corner of the screen. I already tried editing the gnome-terminal.desktop file by adding --geometry xxxxxxx to the Exec line, and it doesn't seem to work. Any suggestions?
2 Answers
So you changed the Exec line of your gnome-terminal.desktop file. Now the terminal should be located as expected when you execute the .desktop file, either from Nautilus (file manager/desktop) or the activities overview. The Launch terminal keyboard shortcut is a different kettle of fish. In fact, there doesn't seem to be a correct way to change the default terminal command, and some parts of GIO even today have a hardcoded list of terminals that are tried to run in a specific order.
Anyways, this shouldn't bother you because if you want the terminal to be opened with specific arguments when you press Ctrl+Alt+T, there is an easy solution:
- Disable the default
Launch terminalshortcut inSettings->Devices->Keyboard - Scroll down and click the
+at the end of the list to create a custom shortcut - Choose any name for it and input the command that you used in the
.desktopfile, for example:gnome-terminal --geometry 30x30+100+0 - Bind it to Ctrl+Alt+T (or any other key combination)
This will, of course, only change the behaviour when opening the terminal via keyboard shortcut. If you want to know more about the default terminal problem in gnome, you can start with this bug.
As danzel suggested in comments, try to run the command manually to see that positioning works. When it will work manually it should work via Ctrl+Alt+T, too.
If geometry command line option does not work, use devilspie2 (http://www.nongnu.org/devilspie2/).
- 4,412