Skip to content

Instantly share code, notes, and snippets.

@nicnilov
Last active November 17, 2020 16:58
Show Gist options
  • Select an option

  • Save nicnilov/85ddd060b95fba2e792b98e9b970adc7 to your computer and use it in GitHub Desktop.

Select an option

Save nicnilov/85ddd060b95fba2e792b98e9b970adc7 to your computer and use it in GitHub Desktop.
Run RawTherapee custom linux build on Windows 10 with sharp fonts on a HiDPI display

The credit for WSL setup for graphical apps belongs to https://medium.com/@jeffborch/running-the-scenic-elixir-gui-framework-on-windows-10-using-wsl-f9c01fd276f6.

Configure Windows Subsystem for Linux

  1. Enable WSL
Settings > Apps > Programs and Features
Check the Windows Subsystem for Linux
  1. Install Ubuntu
  • In Microsoft Store and search for ‘Linux’
  • Install Ubuntu 20 LTS
  1. Install X Server
  • Run Ubuntu
  • Run the following commands
sudo apt-get update
sudo apt-get install mesa-utils
  Multiple Windows
  Start no client
  Uncheck Native OpenGL

This starts the VcXsrv windows xserver

In Ubuntu terminal run

export DISPLAY=localhost:0

Verify the graphical apps work by running glxgears

Prepare RawTherapee

For any details refer to https://rawpedia.rawtherapee.com/Linux

  1. Install the build dependencies In Ubuntu terminal run
sudo apt-get update
sudo apt-get install build-essential cmake curl git libcanberra-gtk3-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk-3-dev libgtkmm-3.0-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev liblensfun-dev libpng12-dev librsvg2-dev libsigc++-2.0-dev libtiff5-dev zlib1g-dev
  1. Clone the RawTherapee repo
mkdir -p ~/programs
git clone https://github.com/Beep6581/RawTherapee ~/programs/code-rawtherapee
cd ~/programs/code-rawtherapee
  1. Select the required branch, e.g.
git checkout filmneg
  1. Compile RawTherapee
cd ~/programs/code-rawtherapee
mkdir build
cd build

cmake \
    -DCMAKE_BUILD_TYPE="release"  \
    -DCACHE_NAME_SUFFIX="5-dev" \
    -DPROC_TARGET_NUMBER="2" \
    -DBUILD_BUNDLE="ON" \
    -DBUNDLE_BASE_INSTALL_DIR="$HOME/programs/rawtherapee" \
    -DOPTION_OMP="ON" \
    -DWITH_LTO="OFF" \
    -DWITH_PROF="OFF" \
    -DWITH_SAN="OFF" \
    -DWITH_SYSTEM_KLT="OFF" \
    ..

make --jobs=$(nproc --all)
make install
  1. Run RawTherapee
~/programs/rawtherapee/rawtherapee

At this point RawTherapee should start and work as usual. The Windows drives should be available under /mnt/ directory.

Configure RawTherapee to display sharp fonts

If Windows 10 is configured to use scaling other than 100% (Display -> Scale and Layout), which is typical on a high resolution display, the unsupporting applications will display blurry fonts because their fonts are scaled as raster graphics and not as vector graphics. With the descibed setup RawTherapee runs under WSL which although is now configured for GUI applications, is not aware of the Windows scaling, so RawTherapee UI fonts look blurry.

  1. Configure the XLaunch shortcut Shutdown the running RawTherapee Shutdown VcXsrv by right-clicking its tray icon and selecting Exit Right-click the XLaunch icon and select Properties On Compatibility tab select Change high DPI settings In High DPI scaling override section set the checkbox and select Application in the dropdown Close the dialogs by clicking Ok

  2. Configure RawTherapee for HiDPI display Run RawTherapee Open Preferences On General tab enable Pseudo-HiDPI mode Restart RawTherapee

Now RawTherapee UI should display sharp fonts everywhere and the layout should be comfortably scaled. If the fonts appear too small, their size can be adjusted in Preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment