I know that you can use the Screen Configuration tool from the desktop, but can I set this over ssh? Basically how can I use the Screen Configuration tool in the terminal on PI4?
EDIT: It seems that the process I described here no longer works with the raspberry PI 4
I didn’t even know that the raspberry PI 4 was a thing yet, haha.
I found a thread here that seems to cover the solution.
Basically, while in the terminal (or SSH) try editing the following config file like so:
sudo nano /boot/config.txt
And then adding ONE of the following flags at the bottom of the file depending on how you want the screen to rotate (don’t include the parts in parentheses):
display_rotate=1 (90 degrees)
display_rotate=2 (180 degrees)
It does look like this approach might also rotate the mouse movement, however if you are using SSH I get the feeling that this won’t be a problem for you.
The "Screen Configuration" utility is indeed a GUI for XRandR. But the key is, it is actually editing a script that gets run at boot to make its changes persistent across reboots. Just calling XRandR, as Andrew Savinykh noted, will only apply the change until the next reboot.
The actual file that it modifies is
/usr/share/dispsetup.sh. You can verify this by making a change, hitting the checkbox, then noting the change in the
Therefore, you can simply manually make your changes in
dispsetup.sh (its just calling
xrandr, so use
man xrandr for syntax). Or you can copy the file from one Pi to another, etc.