[CentOS] CentOS 7 + GUI as KVM guest: fix screen resolution

Nicolas Kovacs

info at microlinux.fr
Wed May 25 12:20:31 UTC 2016


Hi,

I'd like to run CentOS 7 in a KVM guest (host is my Slackware64 14.1
workstation). The main purpose of this installation will be to build
custom RPM packages. I've made a few tests, and everything works more or
less as expected. I'd like to resolve a small problem that's nagging me
though.

When I install a GUI, I usually start by installing a minimal system,
then I add some command-line tools, then the X Window System, then I add
a lightweight window manager like WindowMaker to configure X, and then
only I install GNOME, the base desktop and only the applications I need.
So far this works quite well.

I just made a first installation of CentOS + X11 + WindowMaker in a KVM
guest, and I have some small resolution problems. I have a twin-monitor
setup, with the left 19" monitor displaying the host system, and the
right 19" monitor the guest system. The "ideal" resolution for this type
of monitor is 1280x1024.

Now when I start WindowMaker in the guest system, I get a weird
resolution, something like 1024x600: looks like 1024x768, only it gets
squashed down to what looks like 16/9. The top and bottom borders of the
screen are black, a bit like a cinemascope movie.

Now I tried to make a second "vanilla" installation of CentOS in another
KVM guest. This time I installed the default GNOME GUI. After the
initial reboot, GDM has the same weird resolution (1024x600 I guess),
and GNOME starts up with this same resolution also. BUT: I can go to the
Monitor Settings, and define 1280x1024 as resolution, and this works
perfectly.

Unfortunately this solution only seems to work on a per-user basis, and
only in GNOME. So here's my question:

- How did GNOME do that (redefine my monitor resolution on the fly)?

- Is there a way to achieve this new resolution system-wide, and also
for WindowMaker?

I tried to fiddle a bit with xorg.conf (X -configure, copy it over, edit
it), but to no avail.

Cheers,

Niki
-- 
Microlinux - Solutions informatiques durables
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : info at microlinux.fr
Tél. : 04 66 63 10 32



More information about the CentOS mailing list