Bug 403966 - Program always starts in privileges-less mode on wayland
Summary: Program always starts in privileges-less mode on wayland
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (other bugs)
Version First Reported In: 3.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-05 17:15 UTC by Lucia Mrenica
Modified: 2019-02-05 20:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 3.80.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucia Mrenica 2019-02-05 17:15:54 UTC
Starting partition manager with QT_QPA_PLATFORM=wayland fixes this, so why doesn't start like this by default? Also when run with the command above the cursor is wrong and the program is unstable, so I wouldn't trust it doing anything with my partitions.

KDE Plasma Version: 5.14.90
KDE Frameworks Version: 5.54
Qt Version: 5.12.1

ADDITIONAL INFORMATION
Only on wayland
Comment 1 Andrius Štikonas 2019-02-05 17:55:38 UTC
(In reply to mthw0 from comment #0)
> Starting partition manager with QT_QPA_PLATFORM=wayland fixes this, so why
> doesn't start like this by default? Also when run with the command above the
> cursor is wrong and the program is unstable, so I wouldn't trust it doing
> anything with my partitions.
> 
> KDE Plasma Version: 5.14.90
> KDE Frameworks Version: 5.54
> Qt Version: 5.12.1
> 
> ADDITIONAL INFORMATION
> Only on wayland

I don't think cursor is wrong. It uses the cursor that is defined in user's settings (which is root).

As for QT_QPA_PLATFORM=wayland, partitionmanager 3.3 only depends on Qt 5.10 but new Plasma releases don't set QT_QPA_PLATFORM when Qt is 5.11 or newer.

Anyway, the points above become moot with latest beta version of kpmcore/partitionmanager 4.0 since the GUI no longer runs as root. Since you are running beta version of Plasma desktop, you can try beta version of KDE Partition Manager too.
Comment 2 Andrius Štikonas 2019-02-05 17:57:17 UTC
Oh, and can you mention in more details what is unstable? Just "unstable" is not very helpful for me.
Comment 3 Lucia Mrenica 2019-02-05 18:59:15 UTC
(In reply to Andrius Štikonas from comment #2)
> Oh, and can you mention in more details what is unstable? Just "unstable" is
> not very helpful for me.

Yeah, I know that isn't a very good description, but I was running it with gdb and it didn't show me a single line when it crashed. I will build and try the new version (3.80.0) anyway.
Comment 4 Andrius Štikonas 2019-02-05 19:23:36 UTC
(In reply to mthw0 from comment #3)
> (In reply to Andrius Štikonas from comment #2)
> > Oh, and can you mention in more details what is unstable? Just "unstable" is
> > not very helpful for me.
> 
> Yeah, I know that isn't a very good description, but I was running it with
> gdb and it didn't show me a single line when it crashed. I will build and
> try the new version (3.80.0) anyway.

Version 3.80.0 is easier to debug with gdb too.

In version 3.3, when you start partitionmanager, it starts another instance of partitionmanager which runs as root. It could be that your gdb was attached to the wrong intance of partitionmanager.

Version 4 beta also has two processes but different ones. One is partitionmanager process which is most of the code and a small daemon (kpmcore_externalcommandhelper) which runs as root. And the good  thing is that even if partitionmanager crashes or is killed, kpmcore_externalcommandhelper will keep running until it finishes current job (not the whole operation, just particular job, but that's already much safer).
Comment 5 Andrius Štikonas 2019-02-05 20:12:17 UTC
[20:09] <d_ed> stikonas: there are constant fixes to QtWayland wrt popup handling
[20:10] <d_ed> there's another one on review ATM