How to install and use xrandr in Debian?

57,908

About xrandr

From man xrandr:

Xrandr is used to set the size, orientation and/or reflection of the outputs for a screen. It can also set the screen size.

In my Debian GNU/Linux 7 I have found xrandr in the package named x11-xserver-utils.

Note xrandr is a tool to work with X server. It will be useless if you boot your OS with text console only and you want to keep it this way.

To install:

sudo apt-get update
sudo apt-get install x11-xserver-utils

How to know which package to install?

Check this question and its answers. In one of the answers I have created a basic guide to apt-file with xrandr as an example.


How to use xrandr to change resolution?

First simply invoke:

xrandr

You will probably see (among other things) some common video resolutions available to you, e.g.:

1360x768       59.8     60.0
1152x864       60.0
1024x768       60.0

You can switch to one of them like this:

xrandr -s 1024x768

Adding custom resolution is also possible. Read this.

Share:
57,908

Related videos on Youtube

CSCoder
Author by

CSCoder

Updated on September 18, 2022

Comments

  • CSCoder
    CSCoder over 1 year

    Everywhere I look they say to use xrandr to change the resolution but when I try to use the command it is not found. I tried apt-get install xrandr (and randr) but the package could still not be found.

    What is xrandr? Why can't I find it? How do I change my screen resolution?

  • CSCoder
    CSCoder over 7 years
    Hmm I'm not using a GUI so perhaps that explains the issue.. So if i can't use xrandr, what can I do to fix my resolution? I'm using my tv as a monitor and only the middle of the command window is showing up
  • Kamil Maciorowski
    Kamil Maciorowski over 7 years
    @CSCoder See this. Don't forget to update-grub.
  • CSCoder
    CSCoder over 7 years
    Sorry I didn't have time to give it a try till now but the /etc/grub/ directory doesn't exist.. I'm trying to do this on C.H.I.P. so it might be a stripped down version of debian
  • Kamil Maciorowski
    Kamil Maciorowski over 7 years
    @CSCoder I think you should mention this in your question in the first place. I don't know how Debian on C.H.I.P boots. There should be a way to pass video=… to the kernel. Or maybe there is fbset available – you could use my old fix then.