![]() We can do this by parsing the output of xrandr for the port type of the monitor we want to set. Therefore, we should modify our command to make sure we get the name of the display we want to change instead of just hardcoding it in. This command only works as long as the output name happens to stay the same. The changes made will go into effect the next time the X11 server starts. Then we include the –primary flag to indicate we want it to be changed to the primary display: We specify the display we want to modify by passing its name to xrandr –output. At the beginning of an output’s name is the port it is connected to (e.g., DVI-D). The results from this command show us the names of the various outputs along with which ones are currently connected. HDMI-A-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 476mm x 268mmĭVI-D-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 476mm x 268mm Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384ĭisplayPort-0 disconnected primary (normal left inverted right x axis y axis) To get a list of outputs and their associated information, we can simply call xrandr without any options: $ xrandr If we want to set the primary display using xrandr, we should first obtain the output name of the monitor we want to change. There are multiple ways to change the primary monitor in X11, but one of the most widely used ways is through the use of xrandr. ![]() The X windows system (e.g., X/X11) is responsible for providing basic graphics support for the majority of Linux distributions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |