Link to home
Create AccountLog in
Avatar of Mark McCall
Mark McCallFlag for United States of America

asked on

How to permenantly change display resolution in RHEL 5 VM (Utilizing VirtualBox on Win7 Host)

I can't figure out how to permanently change my display resolution on my guest RHEL 5 VM utilizing VirtualBox 6.1.4 r136177.

I changed the resolution and then depressed Shift + Ctrl + Backspace, log back in and its set to 1280X1024, but when I reboot it goes back to 800X600.
This is driving me crazy!
Avatar of Mark McCall
Mark McCall
Flag of United States of America image

ASKER

I meant to say Ctrl + Alt + Backspace
Avatar of arnold
Which GUI interface are you using? Which
within RHEL 5. which is old, why not load up centos 7?

The GUI when you change the settings, make sure to save them.
the resolution for the login, or for the bootup, check the VM

the key combos just goes through the available resolution, it does not make it permanent.
Hi Arnold,

I like the Gnome GUI, but if you only know a fix for KDE, then I can work with that.

I have to use RHEL 5 because our lab software is written for this version.

In the Dispaly Settings Window, I selected the Hardware tab > Set it to Generic LCD Panel 1280X1024 > Clicked OK > Selected the Settings tab > Selected 1280X1024 Resolution > Clicked OK and then a pop up window said, "Display settings changed, You need to log out and restart X server for the changes to take effect. Configuration was written to /etc/X11/xorg.conf".

So at this point it sounded like it saved the changes. Rebooting sets it back to original settings. How do you save the settings?

Thanks,
Mark
Double check the settings are actually reflected there, in /etc.
Does the system start in text and upon login you startx?
more /etc/initttab look here does it have here 5 for graphical or 3 for non-graphical multi-user?
The setting are reflected in the xorg.conf file.
It initializes in text with the OKs and then the login GUI/startx loads.

Here is what's in inittab

# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
I opened /etc/rc.d and noticed: current runlevel=$2
I meant, opened /etc/rc.d/rc
I disabled my networking so it would boot faster while troubleshooting this issue. Otherwise, runlevel probably would have been 3.

What is runlevel5 (X11)?
If it goes straight into graphical it boots right
/etc/Ira.d/rc is a script
Runlevel=$2 means it widen run will get the desired level as the second argument

/etc/rc.s/rc argument_1 argument_2
     $0               $1                 $2

run chkconfig --list
Need to see which script starts GUI.

Within it it might read I settings for /etc/init.d/functions as an example you have to see where the initial is read in.

If you look in the /etc/ that you hot notice after changing resolution, whether it reflects the higher resolution as the default

Gnome, shoukd have a .X or .Gnome where the settings are stored

Is the application accessed locally, or it is access remotely?
I couldn't figure out which script starts the GUI from the list. I did notice that the xorg.conf file kept getting overwritten on every reboot so I tried something and it worked! After I set the display monitor type and resolution to LCD Panel 1280X1024, I backed up the xorg.conf to a different name. Next, I edited the S99local scripts for rc2.d and rc3.d so the the backup xorg.conf copies over the xorg.conf. That did the trick!

Thank you for pointing me to the startup scripts. I appreciate your help.
ASKER CERTIFIED SOLUTION
Avatar of Mark McCall
Mark McCall
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks Arnold