alinefr Tux's lil' helper
Joined: 05 Jul 2009 Posts: 113 Location: São Paulo, Brasil
|
Posted: Tue Feb 28, 2017 3:53 pm Post subject: Dual monitors and Display Manager between both screens. |
|
|
It took me a while to figure out this, and this is plain simple to solve. So I think I should share it.
I have two monitors. My monitor laptop and a bigger lcd screen as a second monitor. I like to use both screens, usually my laptop monitor keeps a music player like Spotify and my main work keeps in the bigger screen. Xorg starts with my second monitor in the right side of the laptop monitor. The problem is, my Display Manager (I use Slim) have the user/password prompt just in the middle, between both screens. There are a lot of resources in the web but most of then deals in old fashion way (xinerama, full old xorg.conf). But there is a easier and better way.
Nowadays xrandr can be configured straight in xorg.conf.d/*. But I could not find xrandr's "--same-as". So I used absolute positional.
Code: |
cat 60-edp-1-monitor.conf
Section "Monitor"
Identifier "eDP-1"
Option "PreferredMode" "1366x768_60.00"
Option "DPMS" "true"
Option "Position" "0 0"
EndSection
|
Code: |
cat 61-hdmi-1-monitor.conf
Section "Monitor"
Identifier "HDMI-1"
Option "PreferredMode" "1360x768_60.02"
Option "DPMS" "true"
Option "Position" "0 0"
EndSection
|
The resolution is nearly the same in both monitors, so "Position 0 0" in both gives me clone mode in my Slim DM.
And I've added in my startup WM (I use Awesome WM, and x11-misc/dex to interpret *.desktop files):
Code: |
[Desktop Entry]
Exec=/usr/bin/xrandr --output HDMI-1 --mode 1360x768 --right-of eDP-1
Comment=primitive command line interface to RandR extension
Type=Application
Name=xrandr
|
This should work in most DMs, with any WM. If you use .xinitrc, you could add 'xrandr' command to it.
Also, if the resolution in both monitors are very different, you may have to adjust the "Position" argument to have the login/password in the center screen in both monitors. |
|