I'm running KDE on OpenSUSE 13.2 with three monitors. I primarily use the far right monitor for music, Youtube, baseball games, and other stuff that are just meant to be background noise. On the panel in that monitor, I've created an icon to launch the browser (Chromium) I use for these things, but the browser always seems to launch on different monitors. I want it to automatically launch on monitor 3 when I use this particular icon.

If I right-click the icon and go to Icon Settings, in the Application tab, there is an option for Command:. I've been playing around with it, and searching for a way to get this done, but I can't figure it out. None of the commands I've found do anything at all, so I'm clearly not doing it correctly.

Is there a command to tell the application to open in a specific window? If so, what is that command?


1 Answer 1


If your window manager has an option to say where new windows are spawned, try selecting "spawn at the mouse cursor" or some such.

Alternatively, there are a couple other ways to accomplish what you want. One of them is to use a more configurable window manager, such as one of the many tiling window managers available for Linux. But that's a bit of a drastic thing to do.

Another option, that won't work quite as well is to use something like devilspie or xdotools. The former is a program that runs in the background, and will run commands on any window matching a certain pattern, once it finds it. So you could tell it to look for windows with the application title of "Chromium" and then tell it to move that window to a particular position on screen (you could tell it to move it to whatever X coordinate matches the left side of the desired screen).

The latter tool is a command you can run to manually perform WM tasks like moving, resizing, or iconifying windows. You could append an xdotools command to the end of the command that opens Chromium, to tell it to move Chromium windows to whichever X coordinate you want.

There are probably better ways of doing this, but these are the ones I can think of from the top of my head.

Here's an example xdotool command:

xdotool windowmove $(xdotool search Chromium) 1921 y

This should move the Chromium window to the x coordinate of 1921 (the first pixel of your second screen, if your monitors are both 1080p) while preserving the current y coordinate.

Problems with this approach: May not work with multiple Chromium windows, may not work on maximised Chromium windows. These could be worked around, but you'd need to experiment a bit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .