FS#52204 - [kde-cli-tools] Wrong config file used by kdesu

Attached to Project: Community Packages
Opened by deleteme (RASQ) - Monday, 19 December 2016, 01:55 GMT
Last edited by Antonio Rojas (arojas) - Friday, 23 December 2016, 13:04 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Antonio Rojas (arojas)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When started from a .desktop file, partitionmanager uses /root/.config/partitionmanagerrc. When started from a terminal (without sudo) it uses ~/.config/partitionmanagerrc, which is owned by root. I filed a bug report at bugs.kde.org (https://bugs.kde.org/show_bug.cgi?id=373796) and the developer said it's likely an issue with the Arch package and Gentoo always uses root's config. I tested on KDE Neon and can confirm that this bug doesn't occur there either.

Additional info:
versions 2.2 and 3.0

Steps to reproduce:
Start partitionmanager from KDE app launcher, krunner or .desktop file
Change settings, such as filesystem colors
Start from a terminal using command 'partitionmanager'
Notice different settings
This task depends upon

Closed by  Antonio Rojas (arojas)
Friday, 23 December 2016, 13:04 GMT
Reason for closing:  Not a bug
Comment by Doug Newgard (Scimmia) - Monday, 19 December 2016, 02:02 GMT
And just what are you going to do with a partition manager without root?
Comment by deleteme (RASQ) - Monday, 19 December 2016, 02:12 GMT
Use it, probably. It still works, maybe due to kdesu?
Comment by Doug Newgard (Scimmia) - Monday, 19 December 2016, 02:29 GMT
You never said "without sudo" on the upstream report. He assumed you were running this as root with either sudo or kdesu.
Comment by deleteme (RASQ) - Monday, 19 December 2016, 04:48 GMT
It always runs as root. If you don't use sudo, it will use kdesu (recommended by the dev in his newest comment). The problem is when it uses kdesu on Arch, it uses a different partitionmanagerrc file (in ~/.config) rather than the one it uses when launched by a .desktop file (/root/.config). The developer recommends using one config regardless of how it's launched, like it does on Neon and Gentoo. It seems odd that root is creating files in my .config directory rather than using it's own.
Comment by Antonio Rojas (arojas) - Monday, 19 December 2016, 10:21 GMT
Can't reproduce, /root/.config is always used here no matter how partitionmanager is started. Is kde-cli-tools installed?
Comment by deleteme (RASQ) - Tuesday, 20 December 2016, 08:47 GMT
Yes, it is. I tried deleting both config files and reinstalling partitionmanager, made no difference.
Comment by Antonio Rojas (arojas) - Tuesday, 20 December 2016, 08:51 GMT
what happens if you launch it with 'kdesu partitionmanager'?
Comment by deleteme (RASQ) - Tuesday, 20 December 2016, 11:10 GMT
It uses the file in ~/.config. Could this be an issue with kdesu config? I don't have a kdesurc on either Arch or Neon, not sure if I should.
Comment by Antonio Rojas (arojas) - Tuesday, 20 December 2016, 21:56 GMT
No, there is no kdesu config that I know of. Does this also happen when running other applications with kdesu or only with partition manager?
Comment by deleteme (RASQ) - Friday, 23 December 2016, 10:29 GMT
Yes, I tried Kate and Gwenview, both used my config instead of root's. I tried to test this on Neon as well, but apparently I don't have kdesu? it's not in my $PATH. When I use the command 'partitionmanager' on Neon, it prints in the terminal, "org.kde.kdesu: Daemon not safe (not sgid), not using it." Then it opens a window that looks and functions exactly like kdesu... but apparently it's not?

Edit: it's /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu. I used it to start Kwrite and Gwenview, both use root's config on Neon.
Comment by Antonio Rojas (arojas) - Friday, 23 December 2016, 10:39 GMT
Nothing to do with partitionmanager then. Anyway, as I said this works fine for me in all my systems, so I suspect some local configuration issue on your side. Try with a new user, and review all configuration changes you may have done to the authentication system.
Comment by deleteme (RASQ) - Friday, 23 December 2016, 12:59 GMT
Well, I finally figured out that this happened because for some reason I had explicitly set $XDG_CONFIG_HOME in my shell config. I don't really understand why that would cause the problem, but removing that line fixed it.

Loading...