Problem switching from frame buffer to x11

Hi all.
During last year, I worked for a long time on Yocto, creating specific meta-layer and stuff.
Despite this, I have never studied the subject of graphic managers.
Since I never needed a windowing system, I always worked with frame buffer.
Now I am working on a project which use a 1920x1080 15.6’’ display.
I need to use that display in portrait mode and I’m looking for a solution that allow me to rotate interface.
Changing “/sys/class/graphics/fb0/rotate” parameters, nothing happens, so I tried switch to X11.
If I understand right, using X11 and xrandr, it is possible to rotate the interface and use display in portrait mode.
I added X11 to my DISTRO_FEATURES and then I added the xrandr utility, but if I run “xrandr --rotate left” I get and error which report:
Can’t open display.

Maybe I’m making a beginner’s mistake, but I’m not experinced on graphic managers.

Can someone help me pls?

Andrea

export DISPLAY=:0.0

Hi Marcel.
I tried export DISPLAY=:0.0, but when I run xrandr I get
‘Can’t open display :0.1’.

I alsa tried ‘xrandr --listmonitors’ to check which is the reference display, but the result is always the same

But why :0.1 of it should be :0.0? Are you sure you properly specified it?

I’m sorry Marcel, the error I get is: ‘Can’t open display :0.0’.
I had a mistake.

OK, and your X server is running (e.g. ps ax | grep Xorg). If so what does its log file say (cat /var/log/Xorg.0.log)?