startup - how to automatickly run xrandr comand after launching X

X

Xelor

Guest
Hi Everyone!

I have a beamer and it layed upside down on my bookshelve near the ceiling.

So, I need to flip my screen and i know how to do it:
xrandr -o inverted
It works fine via terminal or .sh-script.

But I want to add it to startup.

I have no enought expirience in linux and google pointed me to /etc/rc.local configuration file.
Unfortunatelly adding my command to /etc/rc.local was not helpful (I think thats because it runs before xorg but i'm not sure).

Where do I need to specify my xrandr command to take effect after starting X?

Thanks in advence for any advices.
 


Hi,

Xrandr works only after X.org start (pretty simple and logical), thus you have to add xrandr line to ~/.xinitrc

/etc/rc.local deals with system initialisation, means commands there are executed during the boot automatically.

But X is started manually (via startx or xinit or half-manually using any display manager like XDM, LightDM or whatsoever).

Cheers
 
Hi,
thanks a lot for your help!
Your advice was helpfull - finally it works as i want to :)
 


Top