Bug 293229

Summary: partitionmanager fails to run from commandline
Product: [Applications] partitionmanager Reporter: Mattia <mattia.verga>
Component: generalAssignee: Volker Lanz <vl>
Status: RESOLVED DUPLICATE    
Severity: normal CC: orion.wilson777
Priority: NOR    
Version: 1.0.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Mattia 2012-02-03 17:43:55 UTC
Version:           1.0.3 (using KDE 4.7.4) 
OS:                Linux

Running 'partitionmanager' or 'partitionmanager-bin' as regular user in commandline is redirect to 'partitionmanager-bin --dontsu'. However the kdesu window is showed and it asks for a password. If you enter root password then gives the error:
'Cannot execute command /usr/bin/partitionmanager-bin --dontsu'
After that the warning about running with non administrative privileges is showed and you can continue as non-root user.

If you run directly 'partitionmanager-bin --dontsu' the password isn't asked and you continue directly to the warning.

Moreover, if you try 'partitionmanager-bin' from terminal as root user gives the error:
# partitionmanager-bin
partitionmanager(6530)/kdeui (kdelibs): Session bus not found 
To circumvent this problem try the following command (with Linux and bash) 
export $(dbus-launch) 
KCrash: Application 'partitionmanager-bin' crashing...
KCrash: Attempting to start /usr/libexec/kde4/drkonqi from kdeinit
sock_file=/root/.kde/socket-Betelgeuse/kdeinit4__0
Warning: connect() failed: : File o directory non esistente
KCrash: Attempting to start /usr/libexec/kde4/drkonqi directly
drkonqi(6531)/kdeui (kdelibs): Session bus not found 
To circumvent this problem try the following command (with Linux and bash) 
export $(dbus-launch

Reproducible: Always

Steps to Reproduce:
1. Open a terminal and run 'partitionmanager' as regular user
2. Kdesu windows asks for root password
3. Enter root password
4. Error 'Cannot execute command /usr/bin/partitionmanager-bin --dontsu'

Actual Results:  
Error 'Cannot execute command /usr/bin/partitionmanager-bin --dontsu'

Expected Results:  
Running 'partitionmanager' should don't trigger kdesu if it's redirect to 'partitionmanager-bin --dontsu'.
Or simply start it as 'partitionmanager-bin' and decide later if it should be run as root or standard user like user decision made in kdesu (there's the option 'ignore' to continue running as regular user).

Reported in RedHat bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=787194
Comment 1 Volker Lanz 2012-02-03 18:42:43 UTC
Thank you for the analysis and the bug report.

I can indeed reproduce the problem. This might be a regression of the way kdesu handles arguments passed to it, so I'll reopen the kdesu bug report that dealt with that and set this as a duplicate (which does not mean it's invalid, of course).

As a workaround, this should work:

$ kdesu /usr/bin/partitionmanager-bin --dontsu

I'm not sure, but from your bug report it appears this causes a dbus error for you. That might be some Fedora-specific thing, because this works for me on Kubuntu. Try if you can run any other KDE program like that, e.g. kcalc.

*** This bug has been marked as a duplicate of bug 265026 ***
Comment 2 Mattia 2012-02-03 19:32:45 UTC
Thank you, using 'kdesu /usr/bin/partitionmanager-bin --dontsu' works also in Fedora.

The dbus error is given when you become root user (with 'su') and then issuing 'partitionmanager-bin'... I don't know if should be any difference starting partitionmanager directly as root or using kdesu.
Comment 3 Andrius Štikonas 2016-02-19 12:27:10 UTC
*** Bug 355051 has been marked as a duplicate of this bug. ***