Shallow Thoughts : tags : x11

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Mon, 20 Jul 2020

R is for Recording Zoom (or other video conferencing) Talks

Giving talks has certainly changed a lot since last year. All those skills we practice in Toastmasters -- using the space, expressive gestures, projecting your voice, making eye contact with all sections of the audience? Meaningless now. In an age of quarantine and video conferencing meetings, speakers need to learn new skills.

Fortunately, there's Toastmasters for a painless, fun way to practice.

I was scheduled to give a talk on browser privacy. My local LWV has a Privacy Study Group that I'm co-chairing, and we had a meeting coming up on privacy while browsing the web. I knew I wanted to show a series of demos in multiple browsers, including additional windows like the Developer Tools window. I also wanted to record the talk so I could upload it later.

In Zoom, the process of canceling a shared window and then starting another share is slow, fumbly and error-prone. I knew this was something I needed to practice before the talk, to find a way to smooth the transitions..

Read more ...

Tags: , , ,
[ 16:35 Jul 20, 2020    More speaking | permalink to this entry | comments ]

Thu, 17 Mar 2016

Changing X brightness and gamma with xrandr

I switched a few weeks ago from unstable ("Sid") to testing ("Stretch") in the hope that my system, particularly X, would break less often. The very next day, I updated and discovered I couldn't use my system at night any more, because the program I use to reduce the screen brightness by tweaking X gamma no longer worked. Neither did other related programs, such as xgamma and xcalib.

The Dell monitor I use doesn't have reasonable hardware brightness controls: strangely, the brightness button works when the monitor is connected over VGA, but if I want to use the sharper HDMI connection, brightness adjustment no longer works. So I depend on software brightness adjustment in order to use my computer at night when the room is dim.

Fortunately, it turns out there's a workaround. xrandr has options for both brightness and gamma:

xrandr --output HDMI1 --brightness .5
xrandr --output HDMI1 --gamma .5:.5:.5

I've always put xbrightness on a key, so I can use a function key to adjust brightness interactively up and down according to conditions. So a command that sets brightness to .5 or .8 isn't what I need; I need to get the current brightness and set it a little brighter or a little dimmer. xrandr doesn't offer that, so I needed to script it.

You can get the current brightness with

xrandr --verbose | grep -i brightness

But I was hoping there would be a more straightforward way to get brightness from a program. I looked into Python bindings for xrandr; there are some, but with no documentation and no examples. After an hour of fiddling around, I concluded that I could waste the rest of the day poring through the source code and trying things hoping something would work; or I could spend fifteen minutes using subprocess.call() to wrap the command-line xrandr.

So subprocesses it was. It made for a nice short script, much simpler than the old xbrightness C program that used <X11/extensions/xf86vmode.h> and XF86VidModeGetGammaRampSize(): xbright on github.

Tags: , , ,
[ 11:01 Mar 17, 2016    More linux | permalink to this entry | comments ]