Use arduino with accelerometer to change the orientation of my desktop screen

I have set my desktop screen vertically on a stand so that more text would fit in. Sometimes I want to use the screen for watching a movie so I turn it back and change the configurations back. I want to speed up the process by making my desktop to change those settings automatically when I turn the screen (like on any tablet or smartphone). I want install arduino with accelerometer to sense the turn and tell the desktop to change the settings. I question is how do I set my desktop to listen to arduino and change its settings?

I got windows 7 and linux Ubuntu

Thanks

You have to write a program for your PC, that communicates with the Arduino and instructs Windows to rotate the view. Ask in a Windows group how to write such a program.

BTW a simple tilt switch is sufficient for the detection of the screen orientation.