Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-07-10 15:06:47

p.la
Member
Registered: 2018-07-10
Posts: 2

XFCE Lenovo w520 with second HDMI monitor

I'm using XFCE desktop in debian stretch . I'm trying to automatically expand desktop to second monitor after boot .
I placed "display" sh in /usr/local/bin/display to get the second monitor to setup :

#!/bin/bash
sleep 3
xrandr --listproviders \
&& xrandr --setprovideroutputsource 1 0 \
&& xrandr --output DP-1-1 --right-of LVDS-1

And "display.desktop" file in ~/.config/autostart/display.desktop :

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=display
Comment=
Exec=/usr/local/bin/display
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false
EOF

This works reasonably well , all though occasionally it mirrors the desktop instead of expanding .
I was wondering if there is some more reliable way to do this ?

Last edited by p.la (2018-07-10 20:19:43)

Offline

#2 2018-07-11 00:39:46

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: XFCE Lenovo w520 with second HDMI monitor

Hello and welcome.

You could use udev to monitor for display changes and then xrandr to act on those changes. I have successfully used this script in the past.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2018-07-11 16:40:14

p.la
Member
Registered: 2018-07-10
Posts: 2

Re: XFCE Lenovo w520 with second HDMI monitor

Seems to be related to the monitors standby mode when cold booting , so no problem .
Thanks for the link , very useful info . I'll probably make something along those lines anyway .

Offline

Board footer

Powered by FluxBB