Archive for the ‘xfce’ Category

Redshift to reduce eye strain from nightly computer use

January 11, 2017 4 comments

Note: This tutorial is mainly for Linux users. For other operating systems you could consult the article “Best Automatic Display Adjustment Software for Mac, Windows, iOS and Android“.

Redshift is a little Free and Open Source tool that can reduce the blue component in the light emitted by your computer screen. By default, it does so between sunset and sunrise based on your latitude / longitude coordinates, but you can also use a permanent fixed light temperature.

The underlying idea is that too much blue light can strain your eyes, especially at night.

Permanent candle light

On Debian and derivatives like Ubuntu, the redshift command line version can be installed like this:

sudo apt-get install redshift

I personally like a “permanent candlelight” setting at all times. This simple example sets a relatively low fixed light temperature of 2200K and a slightly dimmed brightness (see man redshift for more details):

redshift -r -O 2200 -b 0.8

If you like this approach, you can run this command at X session start, similar to what is shown under “Autostart after Login” below.

Emulating Day and Night

If you want redshift to distinguish between day and night, it is convenient to use the GUI version with a config file that specifies your latitude and longitude as shown below.

On Debian and derivatives like Ubuntu, redshift with the GTK UI can be installed like this:

sudo apt-get install gtk-redshift

You can determine your coordinates by googling for the name of your town or city, combined with the words “longitude” and “latitude”, for example for the German town of “Rodgau” this would be:

Note that latitudes south of equator and longitudes west of Greenwich must be specified as negative values. The following shows an example ~/.config/redshift.conf for Halifax (44.65° North, 63.58° West):



You can visit the Redshift website for more details about installation and configuration, etc.

Run the tool for the first time either via Start Menu – Accessories – Redshift on Debian systems, or as redshift-gtk on the Linux command line. You should then be able to see a reddish light-bulb icon in the system tray (aka “notification area”) of your desktop system. Clicking on it gives you options to temporarily disable the tool or view info about your configured geo-location and whether redshift thinks it is currently night-time. If so, you should notice a reddish screen color temperature.

Autostart after Login

To have redshift-gtk start up on every X session, add an entry to the Autostart mechanism of your desktop environment or window manager. For XFCE on Debian, open Start Menu – Settings – Session and Startup – Application Autostart tab and add an entry like this:


Categories: debian, linux, xfce Tags: ,

Set the X cursor theme in XFCE 4.10

August 16, 2015 Leave a comment

After upgrading to Debian Jessie and XFCE 4.10, I set the default cursor theme in XFCE main menu – Settings – Mouse and Touchpad – Theme tab.

But this seemed to affect only a few applications.

To consistently set the theme for all applications and the desktop I had to run this:

oliver@debian:~$ sudo update-alternatives --config x-cursor-theme
There are 3 choices for the alternative x-cursor-theme (providing /usr/share/icons/default/index.theme).

  Selection    Path                                    Priority   Status
  0            /usr/share/icons/Adwaita/cursor.theme     90        auto mode
  1            /usr/share/icons/Adwaita/cursor.theme     90        manual mode
  2            /usr/share/icons/DMZ-Black/cursor.theme   30        manual mode
* 3            /usr/share/icons/DMZ-White/cursor.theme   50        manual mode

Press enter to keep the current choice[*], or type selection number:

Select the desired theme from the listed options and make sure it is the same as the one you selected in the XFCE settings.

Categories: bash, coding, debian, linux, xfce Tags: ,

Use xtrlock via XFCE 4.8 lock button

March 12, 2014 3 comments

I currently use XFCE 4.8 on Debian Wheezy as my desktop system. Its panel supports so-called “action buttons” for hibernate, lock, shutdown, etc.

I use one of those buttons to lock the screen but I don’t like xscreensaver (too ugly, don’t need the screensaver stuff), gnome-screensaver (too many dependencies), xlock and its successor xlockmore (too ugly) or slock (just a black blank screen always confuses me).

Good thing is that I found xtrlock which does what I want: It just shows a lock symbol instead of the mouse cursor, all screen content is still visible but user interaction is blocked until the current user password has been typed in.

This is just enough to prevent my 2 and 5 year old children from messing around with my laptop. So I installed it:

sudo apt-get install xtrlock

Problem was that the XFCE lock button calls xflock4 which is a simple shell script that has hardcoded support for the afore-mentioned set of lock programs, but not for xtrlock.

My simple solution was to take advantage of /usr/local/bin being usually before /usr/bin in the PATH and create a script /usr/local/bin/xflock4 with this content:


Make it executable with

sudo chmod a+x /usr/local/bin/xflock4

Now I can use the XFCE lock button and get what I want.

Alternatively, there are a couple of other light-weight lock programs for Linux:

Categories: debian, linux, xfce Tags: ,

XFCE 4.8 panel : Fix missing Suspend and Hibernate icons

January 28, 2014 5 comments

The “Action Buttons” panel plugin of XFCE 4.8 on Debian “wheezy” has a known bug regarding missing icons for the Suspend and Hibernate actions and users will only see a generic placeholder icon.

Ognyan Kulev who reported the bug says this is because most icon themes do not provide icons named “system-suspend” and “system-hibernate”.

As a work-around he suggests linking to the corresponding xfce4-power-manager icons. This fixed the issue on my Debian laptop:

sudo apt-get install xfce4-power-manager-data
cd /usr/share/icons/hicolor/scalable/actions
sudo ln -s xfpm-suspend.svg system-suspend.svg
sudo ln -s xfpm-hibernate.svg system-hibernate.svg
sudo gtk-update-icon-cache-3.0 -f ../..

I saved save the commands into a shell script so I can run it again if the symbolic links get deleted during an apt-get update or accidental apt-get remove:

echo "#! /bin/sh" > /usr/local/bin/
chmod ugo+x /usr/local/bin/
sudo vim /usr/local/bin/

Transparent background for XFCE desktop icon texts

July 12, 2013 Leave a comment

For semi-transparent background of XFCE desktop icon texts, put this into your ~/.gtkrc-2.0 file:

style "xfdesktop-icon-view" {
  ## opacity of text background (0 - 255, 0 = transparent)
  XfdesktopIconView::label-alpha = 50
  XfdesktopIconView::selected-label-alpha = 150
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"
Categories: linux, xfce

Fix ugly GTK3 apps on XFCE 4.8

July 11, 2013 Leave a comment

This works for my Debian 7:

1) As root:

apt-get install clearlooks-phenix-theme

2) As user:

ln -s /usr/share/themes/Clearlooks-Phenix/gtk-3.0 ~/.config/gtk-3.0
Categories: bash, debian, xfce

Debian Wheezy XFCE 4.8 simple splash without text shadow

May 11, 2013 Leave a comment

Update 14/Aug/2018: I no longer maintain the patched Debian package mentioned and the download links below are most likely broken.

Debian 7 (wheezy) comes with XFCE 4.8. By default, the “simple” splash screen on session startup displays startup messages with an ugly text shadow that makes the text blurry and harder to read.

This is annoying enough that for example OpenSuse and Fedora both applied a patch to remove the text shadow.

Unfortunately, in Debian, XFCE 4.8 still has the text shadow. So I applied this fix and rebuilt the deb from source. I followed this excellent how-to by Raphaël Hertzog. Feel free to download the resulting xfce4-session_4.8.3-3foo1_i386.deb

You can then install it like this:
sudo dpkg -i xfce4-session_4.8.3-3foo1_i386.deb

If you don’t use sudo then you have to run the dpkg command as the root user in the usual way.

Categories: debian, xfce