How to change the primary monitor in Ubuntu or other Linux distributions
Posted by
hackerbinhminh
| Sunday, October 23, 2011 at 11:38 PM
0
comments
Labels :
Linux
linux-tutorial
Using dual or multiple monitors in Linux is relatively straightforward as most monitors are automatically detected on the major distributions. However, Gnome does not give an option for specifying which monitor is the primary - that is to say the monitor which holds the panels by default and is considered the 'default' display. Fortunately, the xrandr utility can easily switch which monitor is the primary. Copy and paste the following script into a text file called monitor-switcher.sh.
Monitor Switcher Script | |
1 2 3 4 5 6 7 8 9 10 | #!/bin/bash # Author: Andrew Martin # Credit: http://ubuntuforums.org/showthread.php?t=1309247 echo "Enter the primary display from the following:" # prompt for the display xrandr --prop | grep "[^dis]connected" | cut --delimiter=" " -f1 # query connected monitors read choice # read the users's choice of monitor xrandr --output $choice --primary # set the primary monitor |
Once saved, make it executable by typing chmod +x monitor-switcher.sh into the terminal. Then, run it by typing ./monitor-switcher.sh. The script will then display a list of all detected monitors - type in the displayed name of the monitor you wish to make primary and hit enter. The script will then change the primary monitor immediately. Below is a sample run of the script:
$ ./monitor-switcher.sh Enter the primary display from the following: VGA1 LVDS1 VGA1
Source: http://www.thetechrepo.com/main-articles/502-how-to-change-the-primary-monitor-in-ubuntu-or-other-linux-distributions
Subscribe to:
Post Comments (Atom)