64

I am new to ubuntu, been using it for about a month now.

I created a desktop for MythTV, and so I use a dual monitor configuration (one monitor for watching shows, and one for everything else). But because i dont have the tuner(yet), I am just using Hulu desktop and some video files that i already have.

The problem is that when i open some applications, such as firefox, they open on the monitor that is playing the video. Sometimes they even open up behind the video application.

Is there a way to stick applications to a certain monitor, so that it will always open up on that application?

I was going to post an image of the display configure screen, but i am to new to post images. If you need to see an image of it let me know and i will email it to you. the image just showed my two screens, a 20" on the right, and one known as unknown on the left. The "Same image in all monitors" button is not checked.

The Samsung is the monitor i want it to open on, and the unknown is the tv that i watch the videos on. Firefox in particular always opens up on the tv whenever it was closed while maximized, and opens on the screen it was closed on when it was closed while not maximized. This is the biggest annoyance that i have with Ubuntu. I am coming to Ubuntu from mac, and have basic to mid-level terminal experience.

3
  • 1
    Do you want to define in which display to open each application, or to open all new applications on a given display? Jan 23, 2015 at 8:42
  • 1
    Adding on to Vadim's answer , you need to set "Force Placement Windows" to "Any". That fixed it for me. Jun 4, 2015 at 17:21
  • 1
    For people arriving here in despair: see my new answer to this old question at Super User (superuser.com/a/1656561/493904) and also take a look to this linked question's answer (superuser.com/a/1552846/493904).
    – leogama
    Jun 13, 2021 at 21:32

12 Answers 12

39

If you do not have CompizConfig, install it (you need it anyway).

sudo apt install -y compizconfig-settings-manager

Go to CompizConfig Settings Manager > Window Management > Place Windows (make sure that this plugin is checked). Under the General tab you see the option Multi Output Mode. You have options like: Use Active Output Device, or Use Output Device with Pointer etc.

3
  • 17
    Only none of those options are any good.
    – mjs
    Dec 5, 2014 at 22:10
  • 1
    A LibreOffice document is opened. An ods, for ex. You update a link and (CTRL+K) and a new dialog box is opened to update the link. The dialog box is opened on the second monitor (I don't want). I have tried as written above all the options and the dialog box is ALWAYS opened using the second monitor. Oct 20, 2021 at 14:53
  • None of the things mentioned above is valid and/or helpful. Don't bother installing this shitty software "compizconfig-settings-manager". Jordon Bedwell answer is actually relevant. Apr 7, 2023 at 18:15
16

Something similar to this happened to me a while back. Try going to System > Preferences > Monitors. Make sure that the main monitor (your working monitor) is to the left and not the right. If the two monitors are different resoutions make sure that they both align at the top. I noticed this with my setup a couple months ago when I installed a monitor that was using a resolution way higher than my working monitor.

6
  • 8
    And what if the auxiliary monitor needs to be physically to the left of the main one? Jul 24, 2016 at 19:18
  • 1
    Same logic applies, just make sure they align at the top no matter which side the monitor needs to be on or which virtual side you give it. Jul 25, 2016 at 23:04
  • 4
    No, that does not solve the problem when the main monitor is on the right, as your "the same logic applies" proposal is the precise situation where the problem arises. Essentially, your answer only works for someone who wants their main monitor on the left - you haven't actually answered the question of how to specify which monitor is the main one. Jul 26, 2016 at 1:42
  • 3
    @ChrisStratton: Here's the Launchpad bug for this. It hasn't actually been fixed. Exactly in your situation, primary screen to the right, I still see the bug in 16.04.1. Oct 1, 2016 at 19:29
  • Aligning the monitors on the top fixed the problem for me (my main monitor is also on the left).
    – Stockfisch
    Oct 10, 2017 at 8:24
6

Another choice is to use devilspie. You can get Devilspie from the Universe repository.

1
  • 2
    repository foes not exist anymore
    – Adam
    Jan 5, 2020 at 11:30
6

Same behavior in Ubuntu 20.04: with the primary (built-in) display on the right, (sub-)windows open on the (wrong) left/dual monitor. Examples: Search messages window of Thunderbird being opened on primary display, System Settings window clicked on top bar of primary display.

A work-around solution was possible with Settings > Displays > Drag displays to match physical set-up: Shifting the left display down below approximately 50 % of the height extension of the primary monitor (i.e. compromising the physical set-up, but still keeping the secondary display to the left of the primary display) generated a behavior correctly opening windows on the primary display.

2
  • 1
    I'm not sure how you figured this out but props to you!
    – Techno
    Dec 5, 2022 at 12:49
  • This was the only solution that worked for me. In my case it was enough to put the secondary monitor a nudge below my primary one inside the menu.
    – slashleo
    Aug 20, 2023 at 20:11
4

I believe (if you have compiz enabled) that you can do this from the compiz settings manager using the place windows plugin. I've not done this myself, but if you play around a bit with the options you should be able to get the window to appear on the desired monitor.

1
  • 2
    I just tried this in 12.04 and it had no effect at all, with any combination of the options. Ugh, wish this were easier. Sep 11, 2012 at 19:31
4

I fixed it by using compiz-config-manager. install using

sudo apt-get install compizconfig-settings-manager

Go to General > General Options > Display Settings

Set Overlapping Output Handling to whatever display you'd prefer (the smaller or the bigger, not sure what to do when you have equally sized monitors?).

Also correctly setting the Outputs text field with your respective screen resolutions seemed to help in placing the windows better.

1
  • only one that worked for me.
    – joaoal
    May 10, 2017 at 8:05
4

In System->Preferences select Monitors. Check "Show Monitors in Panel" then click on the monitor you want as default and hit the "Make Default" button. Log out and back in and there you go.

I've tried this a few times and it never took until I checked the "Show Monitors in Panel" box.

1
  • 3
    why I can not find Show Monitors in Panel chceck box which version of ubuntu do you use?
    – Medya
    Dec 9, 2012 at 21:14
2

If the compizconfig method does not work on it's own (see Vadim's post), then you can try using the GNOME Tweaks manager, go to Workspaces > Display handling and select 'Workspaces span displays'

Drag a window to the desired monitor and then close it. Next time you reopen it should open on that same monitor. Seems that you have to do it for each application.

Tested with Ubuntu 18.04

1
1

Right Click on the window titlebar and select: More Actions -▸ Window Manager Settings. There choose Focus in the column to the left. Toggle option Active screen follows mouse.

If no other defaults are specified, windows appear on the currently active screen. With the procedure described above, mouse position defines this active screen.

1
  • Is this a KDE only solution?
    – EoghanM
    Jul 22, 2018 at 21:06
1

In "Displays" using the "Launcher placement" drop-down, select the monitor you want apps to open on.

1

Until you are able to repair, use Alt+Tab plus Alt+F7.

0

Ubuntu 22.04, open the application, let's say TextEditor, move it to the second screen with the mouse and close it. We open it a second time and it opens on the second screen.

You must log in to answer this question.

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