Tuesday, March 24, 2015

linux (fedora) how to change your screen resolution

The following are intended for when you're using a virtual machine (proxmox host in my case), and the resolution is too high for your 1080p laptop screen that you're using to manage the VMs remotely.
However these methods will probably work with a physical linux installation also (not just a virtual one).

As of 2015 the following method worked for me on Fedora 21 (server version):
Edit the following file with your favorite text editor (mine is VIM): /etc/default/grub
find the line starting with: GRUB_CMDLINE_LINUX=
and put at the end: video=800x600"
when you're done the line should look something like:
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora-server/root rd.lvm.lv=fedora-server/swap rhgb quiet video=800x600"

note: instead of 800x600 you can use, 640x480 or 1024x768 also


To change the resolution off X-windows (xorg),
xrandr --output VGA-0 --mode 800x600
-if you have any errors type xrandr by itself, (and hit enter), and you will see a list of available outputs and the list of modes for each one:
source: https://wiki.archlinux.org/index.php/xrandr

edit: below is my original method, which newer versions of fedora (as of 2015/ fedora 21) doesn't appear to work very well.

If you're running fedora in a virtual machine (proxmox, vmware, virtualbox), and the screen resolution of fedora in console mode (not X), is so high that it takes up your entire screen you can change it using fbset.

If you don't have fbset, first you'll have to install it "sudo yum install fbset"

Then you can change the resolution with the following:
sudo fbset -xres 800 -yres 600
(can use 1024 768, or other resolutions also).