双显示器环境中的右侧显示器 – Ubuntu 15.10(Wily Werewolf))

好的,这可能对某人有帮助。

在Ubuntu 15.10中,guake已经改变了一点。 要将终端更改为正确的监视器,您必须编辑:

/usr/lib/python2.7/dist-packages/guake/guake_app.py 

然后改变第831行:

 window_rect = screen.get_monitor_geometry(monitor) 

通过:

 window_rect = screen.get_monitor_geometry(1) 

杀死并重启guake

任何人都知道这样做的方法不那么hacky?

我在Linux Mint上,以下解决方案对我有用(它也适用于Ubuntu)。 使用以下命令编辑/ usr / bin / guake / file替换get_final_window_rect方法:

 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')) # future we might create a field to select which monitor you # wanna use #monitor = 0 # use the left most monitor monitor = screen.get_n_monitors() - 1 # use the right most monitor monitor_rect = screen.get_monitor_geometry(monitor) window_rect = monitor_rect.copy() window_rect.height = window_rect.height * height / 100 window_rect.width = window_rect.width * width / 100 if width < monitor_rect.width: if halignment == ALIGN_CENTER: window_rect.x = monitor_rect.x + (monitor_rect.width - window_rect.width) / 2 elif halignment == ALIGN_LEFT: window_rect.x = monitor_rect.x elif halignment == ALIGN_RIGHT: window_rect.x = monitor_rect.x + monitor_rect.width - window_rect.width window_rect.y = monitor_rect.y return window_rect 

我从这里拿走它,但我改变了80100