Guake overlaps the second screen in a dual-monitor setup with a side panel

Bug #643145 reported by Stuart Langridge on 2010-09-19
124
This bug affects 34 people
Affects Status Importance Assigned to Milestone
Guake
Confirmed
Unknown
guake (Ubuntu)
Low
Andrew Starr-Bochicchio

Bug Description

Binary package hint: guake

Guake doesn't have a way to configure the window-width (which is fine), except in gconf (which is also fine; this is a minority thing to want to do). However, if you do set the window_width in gconf (/apps/guake/general/window_width) then it's ignored: the relevant section of the code is:

    def get_final_window_rect(self):
        """Gets the final size of the main window of guake. The height
        is the window_height property, width is window_width and the
        horizontal alignment is given by window_alignment.
        """
        screen = self.window.get_screen()
        height = self.client.get_int(KEY('/general/window_height'))
        width = 100
        halignment = self.client.get_int(KEY('/general/window_halignment'))
#

Note that width is hardcoded to 100 rather than loaded from gconf.

the reason this is important is that when running Unity the Guake terminal needs to be narrower than 100% of the width of the screen because of the unity launcher on the left.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: guake 0.4.2-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-21.31-generic-pae 2.6.35.4
Uname: Linux 2.6.35-21-generic-pae i686
Architecture: i386
Date: Mon Sep 20 00:42:29 2010
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: guake

Stuart Langridge (sil) wrote :
Sense Egbert Hofstede (sense) wrote :

Thank you for helping with making Ubuntu and the drop-down terminal Guake better by reporting this bug. An upstream bug report already existed, which confirms this bug. I'm setting the status to Triaged, we now have to wait for the upstream developers to take a look at it.
However, I'm not so sure whether the bug will get much attention since upstream seems to have ceased most activity.

summary: - Guake width not configurable and gconf width item ignored
+ Guake overlaps the second screen in a dual-monitor setup with a side
+ panel
Changed in guake (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in guake:
status: Unknown → New
mitch (mitch-embry) wrote :

I also had this issue with my dual monitor setup in both Ubuntu and Linux Mint and was able to fix it with a quick code edit in the main guake.py file. I figured I would post it here to help out anyone who may be having this issue until the devs implement a way to manipulate the width the 'Preferences' GUI.

In the meantime this should work nicely and like I said will only take a minute of your time to accomplish. The version I am using is 0.4.2 so the line numbers and exact location of the function may be different for you. A quick grep or search in a text editor should take you right to it though. Anyway open up your local copy of guake at /usr/lib/guake/guake.py in your favorite text editor and find this function (lines 810-836 for me):

def get_final_window_rect(self):
        """Gets the final size of the main window of guake. The height
        is the window_height property, width is window_width and the
        horizontal alignment is given by window_alignment.
        """
        screen = self.window.get_screen()
        height = self.client.get_int(KEY('/general/window_height'))
        width = 80
        halignment = self.client.get_int(KEY('/general/window_halignment'))

The function is actually a bit larger but I've truncated it here to save space. At any rate the string we want is 'width= 100' and as you can see I have changed mine to 'width = 80'. I picked 80 as an arbitrary number because I figured that it would be about right percentage wise and indeed it perfectly trimmed guake to fill the left monitor's space without bleeding over onto the left monitor. Of course you may have to tinker with the percentage a bit to get it right but it should work nicely.

Hope this helps.

Nicolas Krzywinski (nsk7even) wrote :

Two points to contribute:
- For me the side panel is a screenlet, so this is none special but a problem with all kind of windows that preserves screenspace I assume
- The width is automatically sized to perfectly fit (!) the remaining screen on my first monitor as soon as I double click right besides the first terminal title to spawn a second one!

Maybe there is simply a little call missing when initially opening Guake with the first terminal?

Nicolas Krzywinski (nsk7even) wrote :

Just found the button to open a new tab... :D
It works with this button as well.

But closing/reopening Guake reverts the width to bad state. A new terminal has to be opened to fix it. Closing a terminal does not fix it.

So the "create new tab" algorithm is the hero!

Franklin Strube (thedoc8786) wrote :

I've had the same issues. When showing the guake terminal, it would be shifted to the right by the same number of pixels as the Unity launcher's width.

With the help of Google search, I wrote the attached patch. It works for me! Test it out and see if it works for you all.

Nicolas Krzywinski (nsk7even) wrote :

Great, thank you!
I can confirm that this works for me too!

tags: added: patch
Changed in guake (Ubuntu):
assignee: nobody → Andrew Starr-Bochicchio (andrewsomething)
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package guake - 0.4.2-6

---------------
guake (0.4.2-6) unstable; urgency=low

  * Fix a problem on startup when notify-osd was not available.
    Please note that this dependency could be removed soon if a better fix
    comes up (Closes: #633789)
  * Guake overlaped the second screen in a dual-monitor setup with a side panel
    Thanks to Franklin Strube for the patch (LP: #643145)
  * Guake did not restored to its original size after fullscreen.
    Thanks to Franklin Strube for the patch (LP: #793405)
  * Switch to dpkg-source 3.0 (quilt) format

 -- Sylvestre Ledru <email address hidden> Tue, 30 Aug 2011 13:54:50 +0200

Changed in guake (Ubuntu):
status: In Progress → Fix Released
Nicolas Krzywinski (nsk7even) wrote :

Confirming that version 0.4.2-6 fixed the issue.

I have the same problem in Ubuntu 12.06 64 bits .

When I'm using two screens, the guake console is correctly shown, in the "main" screen... but when I'm using only one screen, then the right scroll bar gets hidden because the Unity menu adds some padding to to guake without a width resizing .

Changed in guake:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.