I'm booting Sparkylinux from a live-usb in a notebook with broken screen.

There is a external monitor connected by VGA. The external monitor is booted dual with the notebook monitor And the external monitor resolution is booted with some issues.

To fix it i need to put the external monitor as the primary monitor, or even better, shutdown the notebook monitor. In Ubuntu i can use Fn key to change monitors.

In Lubuntu, even i cant see much, i can open the start menu, type monitor and change it manually.

In Sparkylinux the special key dosen't work and start menu is tricky, so i cant access the monitor menu whithout seeing.

So I'm trying xrandr to change it , but apearently i cant open the terminal ( ctrl+alt+t), the bad resolution sends it to another realm.

So i used ctrl+alt+F1 to try xrandr, but for most but not all xrandr commands i get

"xrandr: Cant open display".

Like xrandr --listmonitors


xrand is an Xwindows utility and expects to be run inside an X session, that's where the Cant open display comes from.

You could do this (if your DISPLAY is :0):

$ export DISPLAY=:0
$ xrandr --listmonitors
$ xrandr your_command
  • For Bash, DISPLAY:0 was not a valid identifier, but export DISPLAY=:0 worked. See askubuntu.com/a/156037.
    – Kyle
    Dec 26 '21 at 19:13
  • @Kyle, that was a typo, thanks for pointing it out. Fixed. Dec 27 '21 at 0:40

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.