Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

To fight with dual-monitor resolution problems, I followed the advice found in other questions here related to session- and display-setup-script. I have the following /etc/lightdm/lightdm.conf:

[SeatDefaults]
user-session=ubuntu
greeter-session=unity-greeter
allow-guest=false
display-setup-script=/usr/bin/dualmon.sh
session-setup-script=/usr/bin/dualmon.sh

I also have the following (executable) /usr/bin/dualmon.sh that I created:

#!/bin/bash

xrandr --output LVDS1 --auto --left-of HDMI1 --output HDMI1 --auto
# notify-send Dualscreen activated

touch /home/shade/Desktop/touched

However, the resolution is wrong both at the login screen and after I log in. Also, the file /home/shade/Desktop/touched is not there. When I run the dualmon.sh script manually (after I log in), the resolution is set correctly.

This makes me think that the scripts are not run at all. What is the cause of this and how can I fix it?

share|improve this question

1 Answer

Have you checked the file permissions? You need to make sure that it's executable by a root user. This post should help.

share|improve this answer
It's executable for all users. I can execute the script both with my user and suid. – Shade Apr 8 at 15:07
Just for fun, does it execute the display-setup-script when you switch the two? I've got a config where it executes the display-setup-script but then ignores the following session-setup-script. – J.T. Blum Apr 9 at 17:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.