There's a utility called xbrightness for dimming the screen in linux (basically a linear gamma ramp).

I've made some additions to it so that you can retrieve current brightness, use smooth transitions (specify steps and time between intervals).

I've contacted the author about adding in those changes, but for anyone who wants it, it can be found at the link below.

modified xbrightness