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