X Display Manipulation: Difference between revisions

From Leo's Notes
This page was last edited on 1 September 2019, at 06:21.
xrandr dual head
m Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux"
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Rotate Screen ==
== Rotate Screen ==
Try:
{{code|xrandr}} lets you rotate screens.


{{highlight|lang=terminal|code=
{{highlight|lang=terminal|code=
$ xrandr -o left
$ xrandr -o left
}}
}}
To have it initialize when X starts, you could try putting that line in {{code|/etc/gdm/Init/Default}}


== Dual-head Displays ==
== Dual-head Displays ==
Line 18: Line 16:
}}
}}


== Turn On / Off Screen ==
 
To turn on:
== Controlling Screen Power/Sleep ==
{{highlight|lang=terminal|code=
 
{| class="wikitable"
! Command
! Description
|-
| {{highlight|lang=terminal|code=
$ xset dpms force on
$ xset dpms force on
$ xset s reset  # may be required to unblank screen
}}
}}
 
| Turn on screen
To turn off:
|-
{{highlight|lang=terminal|code=
| {{highlight|lang=terminal|code=
$ xset dpms force off
$ xset dpms force off
}}
}}
| Turn off screen
|-
|{{highlight|lang=terminal|code=
$ xset +dpms
$ xset dpms 600 600 600
}}
| Enable sleep (eg. after 10 minutes)
|-
|{{highlight|lang=terminal|code=
$ xset -dpms
}}
| Disables sleep
|}


[[Category:Linux]]
You may also use {{code|xset -q}} to get the current display status.


{{Navbox Linux}}
{{Navbox Linux}}[[Category:Linux]]

Latest revision as of 06:21, 1 September 2019

Rotate Screen

xrandr lets you rotate screens.

$ xrandr -o left

Dual-head Displays

If for some reason your dual-head configuration isn't being saved properly, you can use xrandr to adjust the screens as part of a login-script.

Something along the lines of:

# xrandr --output DVI-1-0 --mode 1920x1080 --primary \
         --output DisplayPort-1-2 --mode 1920x1080 --right-of DVI-1-0 \
         --output HDMI1 --mode 1920x1080 --same-as DisplayPort-1-2


Controlling Screen Power/Sleep

Command Description
$ xset dpms force on
$ xset s reset  # may be required to unblank screen
Turn on screen
$ xset dpms force off
Turn off screen
$ xset +dpms
$ xset dpms 600 600 600
Enable sleep (eg. after 10 minutes)
$ xset -dpms
Disables sleep

You may also use xset -q to get the current display status.