How to set primary monitor and relation between monitors on ubuntu using terminal?
I figured it out. The command line tool is xrandr. The first step is to print all screens in the system by executing command:
xrandr
Next, when we know what the names are, we can adjust settings, in my case it was something like that:
xrandr --output DVI-I-1 --primary --right-of VGA-1
It set DVI-I-1 as primary monitor and 'moved' it on the right side of VGA-1 monitor.
Related videos on Youtube
Wojciech Wirzbicki
Experienced senior java developer and enterprise applications architect. Mainly focused on server-side programming using lightweight, scalable, open-source solutions.
Updated on September 18, 2022Comments
-
Wojciech Wirzbicki over 1 year
In my Ubuntu there were an applet responsible for monitors management. Unfortunately after some updates (I didn't notice when exactly) this applet disappeared from "System Settings" applet. I wonder if there is any command line tool which manages monitors' properties. For example I want to change primary monitor from current one to another and to change orientation between them (which is left or which is right).
-
Dave over 2 yearsI get awk: cmd. line:1: /1:{print } awk: cmd. line:1: ^ unterminated regexp when attempting this.
-
stryder9k over 2 years
/1:
is not needed. This should work,xrandr --output $(xrandr --listactivemonitors | awk '{print $4}') --primary