Re: (forw) Re: [conspire] could Linux desktop go reasonably any faster?

Akkana Peck <[email protected]>
Newsgroups gmane.org.user-groups.linux.svlug
Message-ID <[email protected]>
Replying a little late, but ...

Rick Moen writes:
> Quoting Steve Litt ([email protected]):
> 
> > Because of lxterminal and lxrandr, I'm a big fan of installing LXDE
> > even if you never use it. Lxrandr has saved my life, many times, during
> > presentations with a projector.
> 
> This appears to be an X11 front-end (using the gtk2 graphics toolkit) 
> for the X.org 'X RandR' extension (/usr/bin/xrandr).
[ ... ]
> Typically, distro package lxrandr, as compiled, depends on:
[ long list of dependencies)
> That strikes me as a whole darned brass band, Steve.  Suggest you also
> look into obvious alternatives that include:
> 
> o  Christian Amsüss's ARandR, a graphical front end to /usr/bin/xrandr
>    requiring only PyGTK, Python2, and xrandr.
> o  /usr/bin/xrandr .  The underlying X.org utility.  It won't bite you.
>    And all you're doing with one of these other things is talking to 
>    this very utility through additional layers of software, so maybe you
>    should try just using it without bloatware middlemen.

A couple of useful xrandr aliases I use before and after talks:

# Connect to a projector on the VGA port:
alias projector='xrandr --output VGA1 --mode 1024x768; noscreenblank'
# and on the HDMI port:
alias projectorh='xrandr --output HDMI1 --mode 1024x768'

# and set video back to normal:
alias noprojector='xrandr --auto; screenblankon'

The screenblank stuff is so the screen doesn't go dark if the Q&A
session goes long and I don't touch a key/slide clicker for a while
(I don't run a screensaver):

noscreenblank() {
    xset -dpms
    xset s off
}

screenblankon() {
    xset +dpms
    xset s on
}

And a little script to use xrandr to probe to see what sort of monitor
is connected, and enable the right one:
https://github.com/akkana/scripts/blob/master/check-monitors

I wrote that script so that if I dock or undock my Lenovo X201,
it would automatically figure out whether it was docked with a
monitor connected, and display to the monitor rather than the laptop
screen. But I have yet to find a way to run anything automatically
upon resuming from suspend. Years ago, you could put wakeup scripts
in /etc/pm/sleep.d, but those aren't called reliably any more; I've
tried the systemd equivalent and several other methods I can't 
remember any more, and finally gave up and just call it manually
if the screen is blank after docking or undocking.

	...Akkana
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.