Run XRandR commands at MATE session login

Run XRandR commands at MATE session login

Postby jvdurme on Fri Jan 06, 2012 10:22 am

Hi all,

I'm trying to load some xrandr settings (for dual head boot, also tested with single head boot, same issues) automatically when I log in with MATE.
From what I've read so far, this is what I've done:
Create the executable xrandr script /home/me/scripts/setoutput.sh:

Code: Select all
xrandr --output CRT1 --mode 1920x1080
xrandr --output LVDS --mode 1440x900 --rate 50
xrandr --output CRT1 --right-of LVDS
xrandr --output CRT1 --primary


Then edited /etc/lightdm/lightdm.conf so it looks like:

Code: Select all
[SeatDefaults]
greeter-session=unity-greeter
user-session=mate
display-setup-script=/home/me/scripts/setoutput.sh
# for your desktop session
session-setup-script=/home/me/scripts/setoutput.sh


The display-setup-script line seems to work as the screen setting is ok when I see the logon screen (where you have to enter your password).
But once I login with MATE, all the xrandr settings are lost and I'm back to the default screen and resolution setting.

When I fire the setoutput.sh script manually from the terminal, it does work. I just need to find a way to fire it on session login.

Does anyone know how to run xrandr commands automatically at MATE startup?

Thanks!

ps: running Mint 12 with an ATI 3650 radeon card (lenovo W500 notebook)
jvdurme
Level 1
Level 1
 
Posts: 7
Joined: Thu Jan 05, 2012 6:09 pm

Linux Mint is funded by ads and donations.
 

Re: Run XRandR commands at MATE session login

Postby jvdurme on Fri Jan 06, 2012 10:41 am

Well, it seems to work when I add the script to Startup Applications from the Mint Menu. Don't know if it's the best solution.
But I'd like to find out why the display-setup-script line works but not the session-setup-script line ??
jvdurme
Level 1
Level 1
 
Posts: 7
Joined: Thu Jan 05, 2012 6:09 pm


Return to MATE

Who is online

Users browsing this forum: No registered users and 9 guests