Thursday 22 March 2012

Changing the Primary Monitor in Linux Mint, and Persisting the Change

In a previous post, I explained how to switch the primary monitor in Linux Mint, using a small script. This change however, does not persist when you reboot your machine. If you haven't already, take a look at that post, as you will need to run the script to get the names of your monitors, which are required for this example.


To make the primary monitor change permanent, go to Menu -> Other -> Startup Applications, and click Add. Give the startup program a name, like "Set Primary Monitor", then in the Command box, enter:


 xrandr --output monitorName --primary  


where monitorName is the name of the monitor you wish to use as the primary monitor, as listed in the script from this post. My command for example, looked like this:


 xrandr --output DVI-I-2 --primary  


Your Add Startup Program window should look something like this:




Click Add, and you're done! Let me know if this works for you below!

7 comments:

  1. Worked for me. Thanks!

    ReplyDelete
  2. it messed up my monitor, now every time i startup, my screen goes blank except for the backlight. How can i remove this from my startup using the terminal only since it's the only thing i can access through safe boot?

    ReplyDelete
    Replies
    1. Hi Justin,

      If you delete the script using the terminal, it will no longer launch when your machine starts up. With scripts like this, I'd always recommend testing them first, before adding them them more permanently into your machines configuration (via startup, or similar).

      Delete
  3. Works but not fully. In case when the main monitor is 24" and side monitors are 19" and the above command is called the items from the system tray (clock, network, sound, etc) are always docked more or less in the middle of the menu panel. It does not matter if they are locked or not. It is really annoying to move them to the right corner every time I start the system.

    ReplyDelete
    Replies
    1. That does sound a bit odd. I'd maybe look into configuring your panel in more depth - it sounds like it's being reset whenever you start your system. Best of luck!

      Delete
  4. Know this is an old topic now, but had an issue with a new machine, keep defaulting to a small monitor on the side, this trick worked for me, running LinuxMint 16 - Thanks

    ReplyDelete

Please leave a comment if you find this blog helpful or interesting! I'd love to hear from you!