Bug 407754

Summary: StartKDE script writes into config files
Product: [Plasma] plasmashell Reporter: David Edmundson <kde>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, harmathy, karl, nate, plasma-bugs, rdieter
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=389598
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description David Edmundson 2019-05-20 10:57:45 UTC
# Write a default kdeglobals file to set up the font
kdeglobalsfile=$configDir/kdeglobals
test -f $kdeglobalsfile || {
cat >$kdeglobalsfile <<EOF
[General]
XftAntialias=true
XftHintStyle=hintmedium
XftSubPixel=none
EOF
}


Writing to a config file is very wrong as it breaks distro overrides. If we want to set a default, we should just set a default when we load things (probably in krdb)
Comment 1 Nate Graham 2019-05-21 15:27:20 UTC
Maybe this is why "Vendor Default" in the Fonts KCM doesn't actually respect the Vendor's defaults. See also https://phabricator.kde.org/D12925
Comment 2 Nate Graham 2019-05-21 15:29:03 UTC
Se also also Bug 389598
Comment 3 Nate Graham 2019-05-21 15:31:21 UTC
*** Bug 389598 has been marked as a duplicate of this bug. ***
Comment 4 Bhushan Shah 2019-05-23 09:13:01 UTC
Git commit bbe55f7580b52524fd324bb684a71204efe2854d by Bhushan Shah.
Committed on 23/05/2019 at 08:42.
Pushed by bshah into branch 'bshah/fixup-fonts'.

Set defaults for anti-aliasing using the krdb

We used to write a configuration for the anti-aliasing using the
startkde script, startkde script would write to kdeglobals and then read
this configuration in the krdb.

This had un-intended side-effect of $XDG_CONFIG_DIRS/kdeglobals settings
or settings set by ~/.config/fontconfig/fonts.conf not being used.

D21335 fixes this by not writing to kdeglobals anymore, this transfers
the defaults used by startkde here.
Related: bug 389598

M  +16   -25   kcms/krdb/krdb.cpp

https://commits.kde.org/plasma-desktop/bbe55f7580b52524fd324bb684a71204efe2854d
Comment 5 Bhushan Shah 2019-05-27 09:15:10 UTC
Git commit 1af4680ea8464e0f6f444c103d49887fe219ee27 by Bhushan Shah.
Committed on 27/05/2019 at 09:07.
Pushed by bshah into branch 'master'.

Don't write a anti-aliasing settings from startkde

Summary:
Writing a config files in $HOME at start-up is wrong way of setting
defaults, If defaults needs to be set, they should be set by krdb
instead of the startkde.

Another side-effect of writing config file is that this breaks the
distribution/vendor configuration, who might want to configure this
value by shipping kdeglobals in either /etc/xdg or $XDG_CONFIG_DIRS.
Related: bug 389598

Reviewers: #plasma, ngraham, apol, davidedmundson

Reviewed By: #plasma, ngraham, apol, davidedmundson

Subscribers: apol, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21335

M  +0    -11   startkde/startkde.cmake
M  +0    -11   startkde/startplasmacompositor.cmake

https://commits.kde.org/plasma-workspace/1af4680ea8464e0f6f444c103d49887fe219ee27
Comment 6 Bhushan Shah 2019-05-27 09:15:51 UTC
Git commit 873cbc1da8f3f2b589f9f2722a4e15a8fcbfe4e5 by Bhushan Shah.
Committed on 27/05/2019 at 09:06.
Pushed by bshah into branch 'master'.

Set defaults for anti-aliasing using the krdb

We used to write a configuration for the anti-aliasing using the
startkde script, startkde script would write to kdeglobals and then read
this configuration in the krdb.

This had un-intended side-effect of $XDG_CONFIG_DIRS/kdeglobals settings
or settings set by ~/.config/fontconfig/fonts.conf not being used.

D21335 fixes this by not writing to kdeglobals anymore, this transfers
the defaults used by startkde here.
Related: bug 389598

M  +16   -25   kcms/krdb/krdb.cpp

https://commits.kde.org/plasma-desktop/873cbc1da8f3f2b589f9f2722a4e15a8fcbfe4e5