Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 600068

Summary: app-office/libreoffice: unset GDK_SCALE
Product: Gentoo Linux Reporter: Jason A. Donenfeld <zx2c4>
Component: Current packagesAssignee: Gentoo Office Team <office>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jason A. Donenfeld gentoo-dev 2016-11-17 03:52:02 UTC
LibreOffice uses xrdb (Xft.dpi: 192) for DPI settings, not the GDK variable. Having the GDK variable set works well for everything else, but breaks LibreOffice. Gentoo should work around it by unsetting it in the launcher.

This should be added to the top of /usr/lib64/libreoffice/program/soffice:

    unset GDK_SCALE
    export GDK_SCALE
Comment 1 Arfrever Frehtes Taifersar Arahesis 2016-11-17 21:18:26 UTC
(In reply to Jason A. Donenfeld from comment #0)
>     unset GDK_SCALE

'unset' already deletes exported variables.
So the line below is not needed.

>     export GDK_SCALE
Comment 2 Jason A. Donenfeld gentoo-dev 2016-11-25 10:58:50 UTC
Actually I've found the solution that works for HiDPI with libreoffice[gtk3] is adding this to the startup script:

export GDK_DPI_SCALE="$GDK_SCALE"
unset GDK_SCALE

This works around the existing libreoffice bugs.
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2020-11-25 01:50:33 UTC
Is this still required?
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2020-12-10 19:33:39 UTC
(In reply to Andreas K. Hüttel from comment #3)
> Is this still required?
Comment 5 Jason A. Donenfeld gentoo-dev 2020-12-11 22:40:07 UTC
I don't think so. Seems fine 4 years later.