Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package pcmanfm-qt

Starting pcmanfm-qt as root session need a running dbus user-session
Bug was: pcmanfm-qt does not start as root on Debian live (Closes: #928818)


diff --git a/config/pcmanfm-qt/lxqt/settings.conf.in 
b/config/pcmanfm-qt/lxqt/settings.conf.in
index b7ef002..68dc7b1 100644
--- a/config/pcmanfm-qt/lxqt/settings.conf.in
+++ b/config/pcmanfm-qt/lxqt/settings.conf.in
@@ -1,6 +1,6 @@
 [System]
 IconThemeName=elementary
-SuCommand=lxqt-sudo %s
+SuCommand=lxsudo dbus-run-session -- %s
 TerminalCommand=
 Archiver=file-roller
 SIUnit=false
diff --git a/debian/changelog b/debian/changelog
index 9347ae6..97ef5b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+pcmanfm-qt (0.14.1-3) unstable; urgency=medium
+
+  * Enhanched the fix and included pcmanfm/settings.cpp - the fallback
+    settings.
+
+ -- Alf Gaida <aga...@siduction.org>  Sun, 12 May 2019 01:41:32 +0200
+
+pcmanfm-qt (0.14.1-2) unstable; urgency=medium
+
+  * Starting pcmanfm-qt as root session need a running dbus user-session
+    Bug was: pcmanfm-qt does not start as root on Debian live (Closes: #928818)
+    Thanks  adrian15 <adrian15...@gmail.com> for spotting this.
+
+ -- Alf Gaida <aga...@siduction.org>  Sat, 11 May 2019 20:38:43 +0200
+
 pcmanfm-qt (0.14.1-1) unstable; urgency=medium
 
   * Cherry-picking upstream release 0.14.1.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7552e93
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+use-dbus-run-session.patch
diff --git a/debian/patches/use-dbus-run-session.patch 
b/debian/patches/use-dbus-run-session.patch
new file mode 100644
index 0000000..af4333d
--- /dev/null
+++ b/debian/patches/use-dbus-run-session.patch
@@ -0,0 +1,46 @@
+Description: pcmanfm-qt need a dbus user session to be started as root
+ Just using dbus-run-session to get one. This is the upstream solution.
+
+Author: Alf Gaida <aga...@siduction.org>
+Last-Update: 2019-05-11
+
+--- pcmanfm-qt-0.14.1.orig/config/pcmanfm-qt/lxqt/settings.conf.in
++++ pcmanfm-qt-0.14.1/config/pcmanfm-qt/lxqt/settings.conf.in
+@@ -1,6 +1,6 @@
+ [System]
+ IconThemeName=elementary
+-SuCommand=lxqt-sudo %s
++SuCommand=lxsudo dbus-run-session -- %s
+ TerminalCommand=
+ Archiver=file-roller
+ SIUnit=false
+--- pcmanfm-qt-0.14.1.orig/pcmanfm/preferences.ui
++++ pcmanfm-qt-0.14.1/pcmanfm/preferences.ui
+@@ -704,11 +704,13 @@ only if there are more than one tab.</st
+             <item row="2" column="0" colspan="2">
+              <widget class="QLabel" name="label_4">
+               <property name="text">
+-               <string>Examples: &quot;xterm -e %s&quot; for terminal or 
&quot;gksu %s&quot; for switching user.
+-%s = the command line you want to execute with terminal or su.</string>
++               <string>Examples:&lt;br&gt;For terminal: &lt;i&gt;xterm -e 
%s&lt;/i&gt;&lt;br&gt;For switching user: &lt;i&gt;lxsudo %s&lt;/i&gt; or 
&lt;i&gt;lxsudo dbus-run-session -- %s&lt;/i&gt;&lt;br&gt;&lt;i&gt;%s&lt;/i&gt; 
is the command line you want to execute with terminal or su.&lt;br&gt; 
Important: Please use lxsudo, sudo alone will wreck permissions of the settings 
file.</string>
+               </property>
+               <property name="textFormat">
+-               <enum>Qt::PlainText</enum>
++               <enum>Qt::RichText</enum>
++              </property>
++              <property name="wordWrap">
++               <bool>true</bool>
+               </property>
+              </widget>
+             </item>
+--- pcmanfm-qt-0.14.1.orig/pcmanfm/settings.cpp
++++ pcmanfm-qt-0.14.1/pcmanfm/settings.cpp
+@@ -189,7 +189,7 @@ bool Settings::loadFile(QString filePath
+         // the value from XSETTINGS instead of hard code a fallback value.
+         fallbackIconThemeName_ = "oxygen"; // fallback icon theme name
+     }
+-    suCommand_ = settings.value("SuCommand", "lxqt-sudo %s").toString();
++    suCommand_ = settings.value("SuCommand", "lxsudo dbus-run-session -- 
%s").toString();
+     setTerminal(settings.value("Terminal", "xterm").toString());
+     setArchiver(settings.value("Archiver", "file-roller").toString());
+     setSiUnit(settings.value("SIUnit", false).toBool());
diff --git a/pcmanfm/preferences.ui b/pcmanfm/preferences.ui
index c7a3c37..0e5b916 100644
--- a/pcmanfm/preferences.ui
+++ b/pcmanfm/preferences.ui
@@ -704,11 +704,13 @@ only if there are more than one tab.</string>
             <item row="2" column="0" colspan="2">
              <widget class="QLabel" name="label_4">
               <property name="text">
-               <string>Examples: &quot;xterm -e %s&quot; for terminal or 
&quot;gksu %s&quot; for switching user.
-%s = the command line you want to execute with terminal or su.</string>
+               <string>Examples:&lt;br&gt;For terminal: &lt;i&gt;xterm -e 
%s&lt;/i&gt;&lt;br&gt;For switching user: &lt;i&gt;lxsudo %s&lt;/i&gt; or 
&lt;i&gt;lxsudo dbus-run-session -- %s&lt;/i&gt;&lt;br&gt;&lt;i&gt;%s&lt;/i&gt; 
is the command line you want to execute with terminal or su.&lt;br&gt; 
Important: Please use lxsudo, sudo alone will wreck permissions of the settings 
file.</string>
               </property>
               <property name="textFormat">
-               <enum>Qt::PlainText</enum>
+               <enum>Qt::RichText</enum>
+              </property>
+              <property name="wordWrap">
+               <bool>true</bool>
               </property>
              </widget>
             </item>
diff --git a/pcmanfm/settings.cpp b/pcmanfm/settings.cpp
index 88d4056..d486c7f 100644
--- a/pcmanfm/settings.cpp
+++ b/pcmanfm/settings.cpp
@@ -189,7 +189,7 @@ bool Settings::loadFile(QString filePath) {
         // the value from XSETTINGS instead of hard code a fallback value.
         fallbackIconThemeName_ = "oxygen"; // fallback icon theme name
     }
-    suCommand_ = settings.value("SuCommand", "lxqt-sudo %s").toString();
+    suCommand_ = settings.value("SuCommand", "lxsudo dbus-run-session -- 
%s").toString();
     setTerminal(settings.value("Terminal", "xterm").toString());
     setArchiver(settings.value("Archiver", "file-roller").toString());
     setSiUnit(settings.value("SIUnit", false).toBool());



unblock pcmanfm-qt/0.14.1-3

-- System Information:
Debian Release: 10.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 
'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.1.2-towo.2-siduction-amd64 (SMP w/8 CPU cores; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE= 
(charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Reply via email to