For a long time my favorite Terminal program has been Guake. It is “a drop-down terminal for GNOME Desktop Environment.” It is always available and hidden when not in use. Simply press a button and it pops out from top of the screen, press again and it goes away.

To install Guake simply  sudo apt-get install guake

The only problem I’ve had with it is on my desktop machine when two monitors are plugged in. Guake always defaults to the left monitor. It does a great job of determining the size of ‘monitor 1’, which in my case is a much smaller extra one to the side. To get Guake on my right-side monitor I had to tweak the source code. Here’s how you can do the same:

  1. Make a copy of theGuake program and put it in yourbin folder. I renamed mine toguake-dualmon but you can call it whatever you want.
  2. Edit the copy in your preferred editor.
  3. Find the method definition  def get_final_window_rect(self):
  4. First we will correctly position the terminal on the right monitor. Add one line at the end, between window_rect.y = 0  and  return window_rect . The window_rect.x and window_rect.y variables tell theGuake window where to be located. Set window_rect.x to be the width of your left monitor and window_rect.y will depend on how offset the monitors are. I had to play with the ‘y’ setting to get it just right or the text starts off the top of the screen.
  5.  Now Guake will be positioned on your right monitor, but it will still be the size of the left one. In my case it was sized at 1280, and I needed it to be 1920. Divide your right monitor’s width by the left monitor’s width (ie. 1920/1280 = 150). Still within  get_final_window_rect(self): you will find the line width = 100 . This setting is a percentage of your left monitor, so set it to the answer you got by dividing one width into the other. In my case it was:
  6. That’s it! Just make sure to always run your copy of the program, or better yet add it to your autostart so it runs automatically!

Here’s the new get_final_window_rect() method looks like with edited lines highlighted:

Have any questions? Feel free to ask in the comments below. Thanks for reading!