I'd like to make a couple of desktop launchers to quickly change desktop resolution.
I thought xrander would do it but... no. Following tutorials on using xrandr, my output is not at all as expected. Is xrandr even the right way to go about this?
-Thanks!
Linux Mint, Mate
Nvidia something Mobile (nvidia-driver-390)
only one monitor
Edit: Just fyi, I want to switch resolutions like so:
640x480 before running Frozen Bubble
1024x576 before launching Steam
2880x1620 before anything else
And I can use the monitor preferences (mate-display-properties) but really... letting my children lose in control panels is not good for my laptop! I'm nervous about following the tutorials I'm finding for xrandr because they all eventually lead to checking/editing your xorg.conf file... which I thought was obsolete (my system doesn't have one by default). Thanks again for any help or pointers!
Command line to change resolution? [Solved]
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.
Command line to change resolution? [Solved]
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times 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: Command line to change resolution?
While I am not sure your reasons for switching resolution are sound, here's how you do it with xrandr:
If you run xrandr without any parameters, it will give you a list of supported outputs and resolutions. Abridged example:
Now to switch that output to 1024x768:
and back to 1920x1080:
If you run xrandr without any parameters, it will give you a list of supported outputs and resolutions. Abridged example:
Code: Select all
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080 60.00*+ 50.00 59.94
1024x768 75.03 70.07 60.00
Code: Select all
xrandr --output HDMI-1 --mode 1024x768
Code: Select all
xrandr --output HDMI-1 --mode 1920x1080
Re: Command line to change resolution?
Woo! That did it. Thank you so much!
xrandr --output eDP-1-1 --mode 2880x1620 (normal)
xrandr --output eDP-1-1 --mode 640x480 (Frozen Bubble)
So now I have a little "rescue" launcher to get back to a usable desktop resolution, right in my panel.
Frozen Bubble runs in 640x480.
Not fullscreen, it's a little game window on my huge desktop. Fullscreen, it's a little game window floating in blackness. So I have to change the resolution to make the game playable, before launching the game... it's getting *back* to a normal resolution that's been difficult.
Similar story with Steam - there is no scaling for the Steam overlay/UI for Linux (that I can find anyhow), so I have to put on my reading glasses just to navigate.
Anyhow - this is perfect. Thanks again!
edit:
Frozen Bubble launching even better is:
sh -c "xrandr --output eDP-1-1 --mode 640x480 ; frozen-bubble --fullscreen"
Yay.
xrandr --output eDP-1-1 --mode 2880x1620 (normal)
xrandr --output eDP-1-1 --mode 640x480 (Frozen Bubble)
So now I have a little "rescue" launcher to get back to a usable desktop resolution, right in my panel.
Frozen Bubble runs in 640x480.
Not fullscreen, it's a little game window on my huge desktop. Fullscreen, it's a little game window floating in blackness. So I have to change the resolution to make the game playable, before launching the game... it's getting *back* to a normal resolution that's been difficult.
Similar story with Steam - there is no scaling for the Steam overlay/UI for Linux (that I can find anyhow), so I have to put on my reading glasses just to navigate.
Anyhow - this is perfect. Thanks again!
edit:
Frozen Bubble launching even better is:
sh -c "xrandr --output eDP-1-1 --mode 640x480 ; frozen-bubble --fullscreen"
Yay.
Re: Command line to change resolution?
Is that the regular or the flatpak version? Because at least with the regular version the overlay is the same size as on Windows - unless there's a way to additionally scale it on Windows that I'm not aware of.