You are not logged in.

#1 2011-09-18 13:51:20

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 772

How to cycle through screen resolution with no + or - key?

I have a minimal keyboard which doesn't have a dedicated + or - key.  Is there another way to cycle through screen resolutions?

Offline

#2 2011-09-20 07:34:36

rockin turtle
Member
From: Montana, USA
Registered: 2009-10-22
Posts: 227

Re: How to cycle through screen resolution with no + or - key?

I'm not sure I understand your question.  What program are you using (that accepts the +/- from the keyboard) to change your screen resolution?

I believe you can use xrandr from a shell prompt to change the video resolution. (I hope you can copy and paste the following since you need the '-' character to do this.)

First, fire up a terminal and do:

$ xrandr -q

to see what video modes are available to your system. When I do this I get the following:

Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 408mm x 306mm
   1600x1200      59.8*+
   1280x1024      60.0  
   1152x864       75.0  
   1024x768       85.0     75.1     60.0  
   832x624        74.6  
   800x600        85.1     75.0     60.3  
   640x480        75.0     60.0     59.9  
   720x400        70.1  

From this I can see that the output I want to change is HDMI-0.  Your system may have a different output. Use whatever the output is on your system.  Now if I want to change the resolution to 1280x1024, I would do:

$ xrandr --output HDMI-0 --mode 1280x1024

If that all worked for you, you may want to set up a script to make this easier, such as:

#!/bin/bash

case "$1" in
	1280) xrandr --output HDMI-0 --mode 1280x1024 ;;
	1152) xrandr --output HDMI-0 --mode 1152x864 ;;
	1024) xrandr --output HDMI-0 --mode 1024x768 ;;
	*) xrandr --output HDMI-0 --mode 1600x1200 ;;
esac

And then run it like

$ chres 1280  # change to 1280x1024
$ chres 1152  # change to 1152x864
$ chres 1024  # change to 1024x768
$ chres       # (no argument) change to 1600x1200

Offline

#3 2011-09-20 07:51:58

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: How to cycle through screen resolution with no + or - key?

rockin turtle wrote:

I'm not sure I understand your question.  What program are you using (that accepts the +/- from the keyboard) to change your screen resolution?

Xorg(1) wrote:

       Ctrl+Alt+Keypad-Plus
               Change video mode to next one specified in the configuration file.  This can be disabled with the DontZoom xorg.conf(5) file option.

       Ctrl+Alt+Keypad-Minus
               Change video mode to previous one specified in the configuration file.  This can be disabled with the DontZoom xorg.conf(5) file option.


This silver ladybug at line 28...

Offline

#4 2011-09-20 18:43:36

rockin turtle
Member
From: Montana, USA
Registered: 2009-10-22
Posts: 227

Re: How to cycle through screen resolution with no + or - key?

Thanks, lolilolicon, I never knew that.

Offline

#5 2011-09-24 14:42:50

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 772

Re: How to cycle through screen resolution with no + or - key?

Yeah - it was just the normal xorg behaviour I was looking for. I'm particularly looking for a keystroke solution rather than a cli command  - although I  suppose I can map a command to a key...

The main reason I want it is that sometimes software crashes and leaves me in the wrong resolution.  At the moment my only solution is to restart X.  Often the screen is in too much of a mess to try and enter a command.

Offline

#6 2011-09-24 14:44:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to cycle through screen resolution with no + or - key?

phunni wrote:

The main reason I want it is that sometimes software crashes and leaves me in the wrong resolution.  At the moment my only solution is to restart X.  Often the screen is in too much of a mess to try and enter a command.

I have a three-letter alias for resetting my resolution using xrandr.

Offline

Board footer

Powered by FluxBB