在多顯示器設置中選擇lightdm登錄屏幕位置


7

如何在多顯示器設置中使用lightdm設置登錄屏幕的位置。

如果有兩個顯示器(1920x1080)+(1920x1200),並且當前在我啟動後,左側(較小)的顯示器上顯示登錄信息。我只想在右側(更大)的顯示器上查看它。

切換圖形卡上的電纜沒有幫助,並且我已經使用xrandr將較大的屏幕作為主屏幕:

xrandr --output DVI-1 --primary #big screen

登錄後,我的面板位於主屏幕上,但登錄屏幕本身顯示在另一個較小的屏幕上。如何配置lightdm僅在更大的屏幕上顯示登錄名。

3

This did the trick for me. Find out your primary screen:

$ xrandr

And create the file /usr/bin/dualmon.sh with the following command:

xrandr --output DVI-0 --primary

**Change DVI-0 for your primary screen.*

Make it executable:

sudo chmod +x /usr/bin/dualmon.sh.

And add it to /etc/lightdm/lightdm.conf file:

[SeatDefaults]
display-setup-script=/usr/bin/dualmon.sh
session-setup-script=/usr/bin/dualmon.sh

Regards!


7

At least with Ubuntu 16.04, which includes lightdm-gtk-greeeter 2.0.1, the following entry in /etc/lightdm/lightdm-gtk-greeter.conf can be used to fix the initial position of the login dialog on a certain monitor:

[greeter]
active-monitor=0

The xrandr workaround didn't work here, too.


0

Once you find out your screen identifier as Ben suggested using xrandr then you can pick your desired display output (mine was called HDMI-1) and enter it direct in to the config file.

/etc/lightdm/lightdm.conf

Search for the line "display-setup-script" and change it to read:

display-setup-script=xrandr --output HDMI-1 --primary

Obviously replacing "HDMI-1" with your desired monitor, eg. "DVI-1" or "DP-1" for DVI or DisplayPort if not HDMI.

I currently use lightdm-webkit2-greeter so I don't have this option, but if you use the lightdm-gtk-greeter then you can do the following instead:

[greeter]
active-monitor=0

In the file /etc/lightdm/lightdm-gtk-greeter.conf