xrandr before logging in

Kilian Rambach kilian.rambach at gmx.net
Wed May 28 20:38:58 UTC 2008


Hi there,
I want to use xrandr to switch one of the two connected monitors off as 
soon as kdm has started, before someone logged in. (I couldn't manage it 
  with some options in xorg.conf)

If I execute "xrandr -display :0.0" in a boot script, I always get:
No protocol specified
Can't open display :0.0

I think that's because, another user than root owns the display. But I
don't know who.
If I execute xrandr, after a user logged in, as this user, it works.

Before someone logged in "who -a" gives:
            system boot  2008-05-28 20:40
            Runlevel 2   2008-05-28 20:40                   last=
LOGIN      tty4         2008-05-28 20:40              4654 id=4
LOGIN      tty5         2008-05-28 20:40              4655 id=5
root     - tty2         2008-05-28 22:18   .         10534
LOGIN      tty6         2008-05-28 20:40              4661 id=6
LOGIN      tty1         2008-05-28 20:40              5663 id=1
LOGIN      tty2         2008-05-28 20:54              6717 id=2
LOGIN      tty3         2008-05-28 20:54              6722 id=3
            :0           2008-05-28 22:18                 0 id=:%K 
term=0 exit=0
LOGIN      tty2         2008-05-28 21:24             10534 id=2

So it doesn't show any user who owns display :0

So how can I execute xrandr before someone logged in?

Thanks for any help
Cheers
Kilian




More information about the kubuntu-users mailing list