how to run xrandr command at startup

John M Cavallo johnc0102 at verizon.net
Sat Jan 3 12:54:31 UTC 2015


On Friday, January 02, 2015 03:44:49 PM CS DBA wrote:
> Hi all;
> 
> I want to run an xrandr command at startup.
> 
> I Tried these solutions with no luck:
> 
> 1) added command it to /etc/rc.d/rc.local (as a script with #!/bin/bash
> as the first line)
>      created a soft link from /etc/rc.d/rc.local to /etc/rc.local
>      systemctl start rc-local.service
> 
> 2) added command to /etc/kde/kdm/Xsetup
>      chmod a+x /etc/kde/kdm/Xsetup
> 
> 
> Neither of the above solutions work
> 
> 
> I'm running Fedora 21, KDE spin (64bit)
> 
> Thanks in advance for any help...

I created an executable file /etc/X11/xinit/xinitrc.d/99-xrandr, to position 
and rotate my second monitor,

    #!/bin/bash
    
    xrandr --output DVI-I-2 --rotate left
    xrandr --output DVI-I-1 --pos 0x350



More information about the users mailing list