User Tools

Site Tools


general:linux:konsole_kde_scaling_workaround

Got inspiration for the workaround here:
https://bugs.kde.org/show_bug.cgi?id=373232#c105

I chose to create a wrapper instead, because I normally leave konsole open with a few tabs and am used to have that restored automatically at login

Steps to perform

# mv /usr/bin/konsole /usr/bin/konsole-real

Create file /usr/bin/konsole with these contents

#!/bin/bash
export _QT_SCREEN_SCALE_FACTORS="$QT_SCREEN_SCALE_FACTORS"

# -a "$0" makes the name of the process still be konsole instead of
# konsole-real otherwise the KDE session manager will launch
# konsole-real and this script will not be run
QT_SCREEN_SCALE_FACTORS="" exec -a "$0" /usr/bin/konsole-real "$@"

And make sure it is executable

chmod +x /usr/bin/konsole

And last modify your shell login script (bash in my case) ~/.bashrc

[...] Add this to the bottom of the script
 
# Fix for problem with scale factor in konsole
if [ -n "$_QT_SCREEN_SCALE_FACTORS" ]; then
    # Check if variable contains "=" as is the case if scaling is used
    if [[ "$_QT_SCREEN_SCALE_FACTORS" =~ "=" ]]; then
        QT_SCREEN_SCALE_FACTORS="$_QT_SCREEN_SCALE_FACTORS"
        _QT_SCREEN_SCALE_FACTORS="Moved to orig variable from .bashrc"
    fi
fi
general/linux/konsole_kde_scaling_workaround.txt · Last modified: 2020/11/17 22:21 by sunkan

Donate Powered by PHP Valid HTML5 Valid CSS Run on Debian Driven by DokuWiki