5

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?

| improve this question | | | | |
8

I figured it out. Screen Configuration tool is just a GUI for XRandR. We can use,

DISPLAY=:0 xrandr --output $monitorName --rotate $orientation

Where $monitorName is the display name from the output of DISPLAY=:0 xrandr.

$orientation is left, right, inverted, or normal.

| improve this answer | | | | |
  • This does not seem to persist across reboots – Andrew Savinykh Feb 11 at 6:49
2

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=0 (Normal)

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.

| improve this answer | | | | |
  • 1
    This doesn’t work on the Pi 4. The work around is to use the screen configuration tool. But I’m looking for a way to do this though ssh – user1070953 Aug 2 '19 at 19:11
  • @user1070953 I see... most results I’ve found don’t explicitly apply to or don’t work with the raspberry pi 4. I’ll keep looking, but I don’t own a PI 4 yet so I can’t try and crack the issue firsthand, sorry – HomeworkHopper Aug 2 '19 at 19:22
0

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 dispsetup.sh script.

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.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.