Hi,
how can I set the default screen resolution *before* logging in? I mean, without cvt and xrandr voodoo. It would be nice to have a control panel option for this.
Olaf
default screen resolution
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
default screen resolution
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: default screen resolution
Howdy,
It sounds like you know enough to have figured out how to obtain the right "newmode" settings and are just weary of entering them in terminal every boot. This works perfectly on M17 Cinnamon and XFCE for my Samsung monitor - obviously you'll replace with your own settings - it begins to boot at low res and you can see it change before the desktop shows up:
$sudo gedit ~/.xprofile
in the blank document add the three xrandr lines:
xrandr --newmode "1904x1200_60.00" 191.00 1904 2032 2232 2560 1200 1203 1213 1245 -hsync +vsync
xrandr --addmode VGA1 1904x1200_60.00
xrandr --output VGA1 --mode 1904x1200_60.00
You may have to go into file manager properties for the file (be sure you view hidden files) to make the file executable if the dot .xprofile doesn't execute when you try it. Good luck.
It sounds like you know enough to have figured out how to obtain the right "newmode" settings and are just weary of entering them in terminal every boot. This works perfectly on M17 Cinnamon and XFCE for my Samsung monitor - obviously you'll replace with your own settings - it begins to boot at low res and you can see it change before the desktop shows up:
$sudo gedit ~/.xprofile
in the blank document add the three xrandr lines:
xrandr --newmode "1904x1200_60.00" 191.00 1904 2032 2232 2560 1200 1203 1213 1245 -hsync +vsync
xrandr --addmode VGA1 1904x1200_60.00
xrandr --output VGA1 --mode 1904x1200_60.00
You may have to go into file manager properties for the file (be sure you view hidden files) to make the file executable if the dot .xprofile doesn't execute when you try it. Good luck.
TRUST BUT VERIFY any advice from anybody, including me. Mint/Ubuntu user since 10.04 LTS. LM20 64 bit XFCE (Dell 1520). Dual boot LM20 XFCE / Win7 (Lenovo desktop and Acer netbook). Testing LM21.1 Cinnamon and XFCE Live for new Lenovo desktop.
Re: default screen resolution
Thank you for the information, but ~/.xprofile affects only the user that is logged in. I would like to change the login screen's resolution.
Re: default screen resolution
Add the 3 xrandr command lines to “/etc/mdm/Init/Default”, so they will be executed before the Login screen. Open the file with this
command in the Terminal:
Put the lines at the bottom, just above the last line that says “exit 0”.
command in the Terminal:
Code: Select all
gksudo gedit /etc/mdm/Init/Default
Re: default screen resolution
Thank you for pointing into the right direction! In fact, it had been much easier.
I logged in (and got my preferred screen resolution) and just ran xrandr:
So I just had to put one line into /etc/mdm/Init/Default:
I logged in (and got my preferred screen resolution) and just ran xrandr:
Code: Select all
Virtual1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
800x600 60.0 + 60.3
2560x1600 60.0
1920x1440 60.0
1856x1392 60.0
1792x1344 60.0
1920x1200 59.9
1600x1200 60.0
1680x1050 60.0
1400x1050 60.0
1280x1024 60.0
1440x900 59.9
1280x960 60.0
1360x768 60.0
1280x800 59.8
1152x864 75.0
1280x768 59.9
1024x768 60.0*
640x480 59.9
Code: Select all
xrandr --output Virtual1 --mode "1024x768"