Launching applications from a terminal with specific window size and location

chromekdewindow-geometrywindow-management

I am running Linux Mint 13, with a KDE 4 desktop manager. I would like to launch applications from a terminal (konsole in my specific case) and setting the exact size of the window and the location of the window. As an example, if I launch Kate and Chromium from a terminal, I want Kate's window the cover the left-half of my screen and I want Chromium to cover the upper-right quarter of my screen.

How can I accomplish this?

ps: I have a 15.6" screen set to a 1920×1080 resolution.

Best Answer

If you don't want to specify the geometry/position during startup, but permanently, simple use Kwin's rule system:

  • Launch the desired application
  • Right-click on the title-bar or use Alt+F3
  • More Actions
  • Special Window Settings
  • Tab: Window matching
    • Check, whether the values were detected correctly, otherwise use the Detect Windows Properties button to capture the data of the target window
  • Tab: "Size & Position"
    • Enable the checkboxes of Position and Size
    • Select, when to apply the Position/Size (Apply Initially, Force, etc.)
    • Set the value for Position and/or Size

You can do way more than just this using the window rules, see also: Screenshot of window specific settings in kwin.

Related Question