In my latest post I was complaining that if you’re using Gnome on Wayland there’s no way to make redshift work. Well, I was wrong.

I have run into an article by The Linux Rain talking about the possibility to make redshift work in Gnome on Wayland in Fedora 25 thanks to a user who patched gnome-settings-daemon. The magic is possible because is not Wayland that doesn’t support screen gamma correction, it actually does, but no third-party apps can’t modify gamma values on Wayland. Indeed, Wayland compositors can control these values if the compositor has this functionality enabled. Unfortunately, the latest iteration of Gnome hasn’t this functionality enabled. Here comes our hero, the github user benzea, who wrote the patch for gnome-settings-daemon and packed a gnome-shell extension for redshift.

As far as the article says this currently works only on Fedora 25 (there’s a on purpose repo) and Arch (there’s a package on aur). Well, starting from today, you can have it in Debian, too. I applied myself the patch to gnome-settings-daemon and installed the benzea’s extension and I have redshift on my Debian with Gnome on Wayland. Here’s how to do it.

1. Long way

  1. download the source of gnome-settings-daemon (henceforth, gsd) with the command
    apt-get source gnome-settings-daemon
  2. clone the benzea’s git repo
    git clone https://github.com/benzea/gnome-shell-extension-redshift.git
  3. in the git repo there’s a folder called “patches”. Get into it and copy gsd-3.22-color-Add-ability-to-change-the-color-temperature-of.patch into the folder debian/patches folder of the sources of gsd.
  4. edit the series file in debian/patches by adding in a new line the name of the patch to be applied, including the .patch extension.
  5. edit the changelog file in the debian folder inside the gsd source folder by adding the a new entry for new version (I chose 3.22.1-2) and be careful with the text formatting
  6. open the terminal, go into the gsd source folder and type
    sudo dpkg-buildpackage -uc -us
  7. the command above will probably return an error because of missing dependencies: install them and retype the command (the options -uc -us are there because I don’t have a validated gpg key)
  8. after a certain time, depending on your hardware, if everything goes fine, you’ll have your .deb package of the patched gsd; just install it through
    sudo dpkg -i gnome-settings-daemon_yourversion_yourarchitecture.deb
  9. install redshift
    sudo apt-get install redshift
  10. go back into the folder of the benzea’s git repo, open a terminal in that folder and type
    ./make-zip.sh
  11. you’ll have the gnome-shell extension zipped. Now you can install it through gnome-tweak-tool.
  12. logout, login, enable the extension, make sure you grant location access to geoclue and you’re done

2. Short way

  1. You can use the patched gsd deb file I have compiled, it’s for amd64 only, you can find it here.
  2. clone the benzea’s git repo
    git clone https://github.com/benzea/gnome-shell-extension-redshift.git
  3. install redshift
    sudo apt-get install redshift
  4. in the folder of the benzea’s git repo, open a terminal in that folder and type
    ./make-zip.sh
  5. you’ll have the gnome-shell extension zipped. Now you can install it through gnome-tweak-tool.
  6. logout, login, enable the extension, make sure you grant location access to geoclue and you’re done.

Of course, if you’re using either Fedora or Arch, feel free to follow the article by The Linux Rain I’ve linked above. The procedure I’ve described works on Debian 8; I don’t know if it works on Linux Mint or Ubuntu because I didn’t try.

That’s it. Comments, questions and suggestions are welcome.

 

Advertisements

3 thoughts on “Redshift in Gnome+Wayland: yes we can

  1. Hey, what do you think about making this Redshift feature official in GNOME? The new GNOME Control Center designs consider this feature, and we’re planning to put it on the next version. It’d be awsome if you’re interested in helping us out – or even better, contributing directly!

    Liked by 1 person

    1. Man, I’d be honored, but I’m no developer at all, I just applied a patch somebody else wrote. I just rebuilt gsd with his patch! It’s only that nobody did for debian

      Like

      1. This is definitely something we want upstream (and for all distros). We can talk about it on #gnome-hackers and #control-center IRC channels. Feel free to bring the original developers there too, it’d be even better! 🙂

        Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s