1

I'm pretty new to Ubuntu but I am currently trying to use a server version to display an application for a stripped down kiosk. I've got Ubuntu booting up into the application I want at startup, however I've run into one issue. I need to change the display orientation from Landscape to Portrait.

So far I haven't had much success and I've searched through the google a bunch without anything working for me. I thought I'd ask here. From my understanding I should be using the xrandr command.

What I've tried so far is:

xrandr which tells me that it Can't open disaply

xrandr -d :0 which gives me the following output

xrandr: Output HDMI1 is not disconnected but has no modes
xrandr: Output HDMI1 is not disconnected but has no modes
xrandr: Output VIRTUAL1 is not disconnected but has no modes
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 32767 x 32767
VGA1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 490mm x 320mm 1680x1050 59.9**
HDMI1 connected (normal left inverted right x axis y axis)
HDMI2 connected (normal left inverted right x axis y axis) 
VIRTUAL1 connected (normal left inverted right x axis y axis) 

From that I figure I should do something like:

xrandr --output VGA1 --rotate left

However, that responds with Can't open display.

I've tried a few other things but I'm really at a loss here. Any help would be greatly appreciated.

Thanks!

Mark
  • 13

1 Answers1

0

You probably need to specify the display to modify/use, using -d again (or --screen?):

xrandr --output VGA1 --rotate normal -d :0

Note that this needs to be done with the display focused on the screen, otherwise it may throw a error like xrandr: Configure crtc 0 failed (e.g. when doing the commands from a TTY) - to fix this the display needs to be focused when the command is run, so for instance with a TTY you could use this command and switch back to the GUI quickly:

sleep 5; xrandr --output VGA1 --rotate normal -d :0

Also, desktop environments often include display settings, you may be able to do this from there.

Wilf
  • 30,732