Bug 1006356

Summary: Backintime wont start as root from desktop
Product: [openSUSE] openSUSE Distribution Reporter: Forgotten User iyQ2sVAGWM <forgotten_iyQ2sVAGWM>
Component: X11 ApplicationsAssignee: Tejas Guruswamy <masterpatricko>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: dimstar, forgotten_DV81ZEWZkN
Version: Leap 42.2   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 42.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 1007723    
Bug Blocks:    

Description Forgotten User iyQ2sVAGWM 2016-10-22 08:17:44 UTC
Backintime has two .desktop files: one to run it as normal user, and one to run it as root.

When launching "backintime as root" from gnome shell nothing happens. But if I run "pkexec backintime-qt" from terminal, it opens as it should.
Comment 1 Dominique Leuenberger 2016-10-27 11:53:36 UTC
This likely needs a similar wrapper that was needed for gparted (see bug 920510 for an explanation)
Comment 2 Dominique Leuenberger 2016-10-27 11:54:33 UTC
For reference:

cat /usr/sbin/gparted_polkit
>#!/bin/bash
>
>if [ $(which pkexec) ]; then
>	pkexec --disable-internal-agent "/usr/sbin/gparted" "$@"
>else
>	/usr/sbin/gparted "$@"
>fi

it should be rather straightforward to adjust this for backintime
Comment 3 Forgotten User iyQ2sVAGWM 2016-10-28 07:54:21 UTC
I replaced line
Exec=pkexec backintime-qt4
with
Exec=pkexec --disable-internal-agent "/usr/bin/backintime-qt4"
in file /usr/share/applications/backintime-qt4-root.desktop and didn't work.
Comment 4 Dominique Leuenberger 2016-10-28 07:58:19 UTC
(In reply to Felipe Hommen from comment #3)
> I replaced line
> Exec=pkexec backintime-qt4
> with
> Exec=pkexec --disable-internal-agent "/usr/bin/backintime-qt4"
> in file /usr/share/applications/backintime-qt4-root.desktop and didn't work.

That's also not what I said will work - the SAME approach as for gparted will work:

backintime_polkit script in /usr/bin and call this one by the desktop file.
Comment 5 Forgotten User iyQ2sVAGWM 2016-10-28 08:06:50 UTC
Ops. I didnt't think it should make a difference.

Doing it like you say works for me. I have created a file /usr/bin/backintime_polkit with execution permission and with this content:

#!/bin/bash
pkexec --disable-internal-agent "/usr/bin/backintime-qt4"

Then changed /usr/share/applications/backintime-qt4-root.desktop

Exec=/usr/bin/backintime_polkit

and worked fine!
Comment 6 Dominique Leuenberger 2016-10-28 08:19:04 UTC
(In reply to Felipe Hommen from comment #5)
> Ops. I didnt't think it should make a difference.
> 
> Doing it like you say works for me. I have created a file
> /usr/bin/backintime_polkit with execution permission and with this content:
> 
> #!/bin/bash
> pkexec --disable-internal-agent "/usr/bin/backintime-qt4"
> 
> Then changed /usr/share/applications/backintime-qt4-root.desktop
> 
> Exec=/usr/bin/backintime_polkit
> 
> and worked fine!

Great news!

Are you willing to work on fixing this directly in the packages so that everybody can profit from the fix? I can guide you to the result if you wish (for easier communication on how to do it, should you not know yet, you might want to join the #opensuse-factory IRC channel (irc.freenode.net)
Comment 7 Forgotten User iyQ2sVAGWM 2016-10-28 09:29:51 UTC
Yes, I would like.

I'm going to read some documentation about opensuse-factory in order to know what I talk about and then join #opensuse-factory IRC channel when I have some time, maybe tonight (I'm in Spain) or tomorrow.
Comment 8 Bernhard Wiedemann 2016-10-31 07:00:13 UTC
This is an autogenerated message for OBS integration:
This bug (1006356) was mentioned in
https://build.opensuse.org/request/show/437973 42.2 / backintime
Comment 9 Tejas Guruswamy 2017-03-09 16:38:25 UTC
This is now waiting for security review of the DBUS service.
Comment 10 Tejas Guruswamy 2017-05-17 18:28:33 UTC
Following the security review and dealing with the various findings, request 495451 has been accepted into Factory. Thanks all.