7

Setting Displays to monochrome / grayscale (Saturation 0) on Xubuntu / XFCE

 8 months ago
source link: https://alexanderzeitler.com/articles/setting-display-monochrome-saturation-0-on-xubuntu-xfce/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Setting Displays to monochrome / grayscale (Saturation 0) on Xubuntu / XFCE

Published on Monday, December 25, 2023

Photo by Chris Ried on Unsplash

Grayscale...

For some tasks like writing I prefer to have my displays set to monochrome / grayscale. This is how I do it on Xubuntu / XFCE.

There are several solutions out there that use xrandr or ddcutil but none of them worked for me. I'm using Xubuntu 22.04.2 LTS on a late 2012 Mac mini for some tasks.

So here is how you would do it using xrandr:

xrandr --output HDMI-3 --set Saturation 0

HDMI-3 is the name of my display.

You can get the name of your display by running xrandr without any arguments.

Connected displays will be listed like this:

HDMI-3 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm

The solution that actually worked for me was to use libvibrant and its source can be found on GitHub.

It's said to be build and installed this way:

mkdir build
cd build
cmake ..
make
sudo make install

However, I had to do few more things to get it working:

mkdir build
cd build

# fixes: Could not find X11
sudo apt install libx11-dev

# fixes: The RandR library and headers were not found
sudo apt install xorg-dev libglu1-mesa-dev

# fixes: fatal error: NVCtrl/NVCtrlLib.h: No such file or directory
sudo apt install libxnvctrl-dev

cmake ..
make

# fixes: libvibrant.so.1 cannot open shared object file
sudo /sbin/ldconfig -v*

sudo make install

After that I was able to run vibrant-cli and it worked like a charm:

vibrant-cli HDMI-3 0
vibrant-cli DP-1 0

To reset the saturation to 100%:

vibrant-cli HDMI-3 1
vibrant-cli DP-1 1

Running this will make it look even better:

xgamma -gamma 0.8

If you create a .desktop entry for both commands, you easily run them using a launcher like Albert:

Monochrome mode launcher

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK