[conspire] running without a DE- dynamically activating external monitor

Tony Godshall togo at of.net
Fri Apr 19 11:49:52 PDT 2013


> for the record, this made my non-DE touchpad environment much more tolarable:
>
> for id in $(xinput list|perl -ne 'if(m{Atmel maXTouch
> Touchpad.*id=([0-9]+)}){print "$1\n"}')
> do
>     #low,high,press, or release, start, click
>     # original:      Synaptics Finger (264): 25, 30, 256
>     xinput set-prop $id 'Synaptics Finger' 25 60 256
> done


And I figured out how to tell X11 to use an external HDMI display and
shut off the laptop display:

This tells what outputs are connected to the current screen:

    xrandr

This tells it to turn off the laptop display:

    xrandr --output LVDS --off

This tells it to resize the display based on the HDMI resolution:

    xrandr --output HDMI-0 --preferred

As a sanity check, I put the above inside a conditional

if [ $( xrandr|perl -ne 'if(m{(LVDS|HDMI-0) connected }){print
"$1\n"}'|wc -l ) -eq 2 ]
then
    xrandr --output LVDS --off
    xrandr --output HDMI-0 --preferred
fi

I assume the perl-avoidance version will be forthcoming ;-)

The above recipe may also work with DVI- this display actually is DVI
display driven by a cheap HDMI-DVI converter from Fry's

Anyone know how to tell the active window manager to reconfigure
itself to a new resolution?  SIGHUP seems to be a convention for
daemons but not for WMs.

In googling for that answer, I also found out how to make the laptop
screen appear in addition, and "below", the HDMI display, and also
incidentally turn it back on ...

xrandr --output LVDS --preferred --below HDMI-0

... which works well in with newer window managers that seem to have
mechanisms to detect and adapt to changes in display configuration
(I'm running fluxbox started by lightdm right now).  But for older
window managers, there's gotta be a signal to tell them to reread
their configurations.


--
Best Regards.
This is unedited.




More information about the conspire mailing list