Gentoo Archives: gentoo-user

From: Valmor de Almeida <val.gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: VGA output?
Date: Thu, 05 Nov 2009 15:14:35
Message-Id: 4AF2F9B6.30603@gmail.com
In Reply to: Re: [gentoo-user] Re: VGA output? by Grant
1 Grant wrote:
2 ...[snip]...
3 >
4 > Thanks everyone. Do these apps allow you to connect and disconnect a
5 > monitor without restarting X? I'm not sure how that would work
6 > because my laptop screen's aspect ratio is resized based on that of
7 > the monitor.
8 >
9 > - Grant
10 >
11 >
12
13 Yes. Typically I have aliased commands for xrandr. If I am using the VGA
14 and I want to undock the laptop and use its LCD, I run my turnoffvga alias:
15
16 xrandr --output VGA --off
17
18 undock the laptop and restart windowmaker (not the X server); just a
19 simple ALT+R key stroke for wm; this does not mess up running X apps. I
20 restart the window manager so my desktop background are resized to the
21 size of the laptop LCD monitor. I use xrandr extensively to reset, turn
22 on and off VGA/LCD whether I have the laptop docked or not. All without
23 restarting the X server; it also works with digital projectors.
24
25 For resetting the VGA:
26
27 xrandr --output LVDS1 --auto --pos 0x0
28
29 or for a resetting both monitors (bash function)
30
31 EXTERNAL_OUTPUT="VGA"
32 INTERNAL_OUTPUT="LVDS1"
33 INTERNAL_LOCATION="--below $EXTERNAL_OUTPUT"
34
35 xrandr |grep $EXTERNAL_OUTPUT | grep " connected "
36 if [ $? -eq 0 ]; then
37 xrandr --output $EXTERNAL_OUTPUT --auto
38 xrandr --output $INTERNAL_OUTPUT --auto
39 xrandr --output $INTERNAL_OUTPUT $INTERNAL_LOCATION
40 else
41 xrandr --output $EXTERNAL_OUTPUT --off
42 xrandr --output $INTERNAL_OUTPUT --auto
43 fi
44
45
46 --
47 Valmor

Replies

Subject Author
Re: [gentoo-user] Re: VGA output? Grant <emailgrant@×××××.com>