Add autorandr before kdm starts

Posted by Serge Tarkovski on Ask Ubuntu See other posts from Ask Ubuntu or by Serge Tarkovski
Published on 2012-04-14T09:58:17Z Indexed on 2012/04/14 11:45 UTC
Read the original article Hit count: 381

Filed under:
|
|
|

I want to add autorandr before kdm starts. Autorandr works well within KDE, however, in kdm I still have ugly 1024x768 resolution when my external monitor is connected.

I tried adding autorandr --change to /etc/kde4/kdm/Xsetup:

#! /bin/sh
# Xsetup - run as root before the login dialog appears

#xconsole -geometry 480x130-0-0 -notify -verbose -fn fixed -exitOnFail -file /dev/xconsole &

/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=kdm

/usr/local/bin/autorandr --change >> /tmp/autorandr
echo "Xsetup finished" >> /tmp/xsetup-finished

A debug message in /tmp/xsetup-finished appears correctly. /tmp/autorandr is empty (so it seems autorandr runs without errors).

I also tried to move autorandr --change line before /sbin/initctl -q emit login-session-start DISPLAY_MANAGER=kdm with no effect.

P.S. Of course, autorandr profiles I created under KDE session, are in my home folder, but Xsetup script runs under root, so I created a symlink from my ~/.autorandr to /root/.autorandr.

© Ask Ubuntu or respective owner

Related posts about kubuntu

Related posts about kde