[PATCH 0/3] Add plugins to Thunar

OpenSubmitted by Simon Streit.
Details
3 participants
  • Ludovic Courtès
  • Simon Streit
  • tumashu
Owner
unassigned
Severity
normal
S
S
Simon Streit wrote on 4 Jan 16:39 +0100
(address . guix-patches@gnu.org)
yguy23vv7c2.fsf@netpanic.org
Hello,

I've been trying to package some plugins for Thunar. Unfortunately these
plugins are not loaded, or are not found in Thunar, and so far I can't see
why. There are no errors to begin with. A guess would be missing path
declarations from, maybe, pkg-config. Though the libs are residing in
../lib/thunarx-3, where they should be.

I'd be very happy if someone else wants to have a look at these patches
to see if they can be made workable.


Thank you!
Simon
S
S
Simon Streit wrote on 4 Jan 16:50 +0100
[PATCH 1/3] gnu: Add thunar-archive-plugin.
(address . 53008@debbugs.gnu.org)
yguee5nv6tz.fsf@netpanic.org
* gnu/packages/xfce.scm (thunar-archive-plugin): New variable.
---
gnu/packages/xfce.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index c08a2349dc..e665dacd61 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -792,6 +792,32 @@ (define-public thunar-volman
 and import the new pictures from your camera.")
     (license gpl2+)))
 
+(define-public thunar-archive-plugin
+  (package
+    (name "thunar-archive-plugin")
+    (version "0.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://archive.xfce.org/src/thunar-plugins/"
+                           name "/" (version-major+minor version)
+                           "/" name "-" version ".tar.bz2"))
+       (sha256
+        (base32 "059ikda4hig1iqk0g5kqc4p95chj0z1ljhl5qjrlw4l8lf3gm0mz"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list pkg-config intltool))
+    (inputs
+     (list exo
+           thunar
+           gtk+
+           libxfce4ui))
+    (home-page "https://www.xfce.org/")
+    (synopsis "Adds archive operations to the Thunar file context menus")
+    (description "This plugin allows you to create and extract archive files
+using the file context menus in the Thunar file manager.")
+    (license gpl2+)))
+
 (define-public xfwm4
   (package
     (name "xfwm4")
-- 
2.34.0
S
S
Simon Streit wrote on 4 Jan 16:50 +0100
[PATCH 2/3] gnu: Add thunarx-python.
(address . 53008@debbugs.gnu.org)
ygu8rvvv6se.fsf@netpanic.org
* gnu/packages/xfce.scm (thunarx-python): New variable.
---
gnu/packages/xfce.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index e665dacd61..9e1f0c2225 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -818,6 +818,34 @@ (define-public thunar-archive-plugin
 using the file context menus in the Thunar file manager.")
     (license gpl2+)))

+(define-public thunarx-python
+  (package
+    (name "thunarx-python")
+    (version "0.5.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://archive.xfce.org/src/bindings/"
+                           name "/" (version-major+minor version)
+                           "/" name "-" version ".tar.bz2"))
+       (sha256
+        (base32 "08lz9pvx006a2fypg2q38p61jbhy0yswz8cizlxpiwfcqsvhpnln"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list exo
+           thunar
+           python
+           python-pygobject
+           libxfce4ui
+           gtk+))
+    (home-page "https://gitlab.xfce.org/bindings/thunarx-python")
+    (synopsis "Python Bindings for Thunar")
+    (description "These bindings allow one to create python plugins
+for Thunar.")
+    (license gpl2+)))
+
 (define-public xfwm4
   (package
     (name "xfwm4")
--
2.34.0
S
S
Simon Streit wrote on 4 Jan 16:51 +0100
[PATCH 3/3] gnu: Add thunar-shares-plugin.
(address . 53008@debbugs.gnu.org)
ygu35m3v6rc.fsf@netpanic.org
* gnu/packages/xfce.scm (thunar-shares-plugin): New variable.
---
gnu/packages/xfce.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 9e1f0c2225..0baecc215a 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -846,6 +846,34 @@ (define-public thunarx-python
 for Thunar.")
     (license gpl2+)))

+(define-public thunar-shares-plugin
+  (package
+    (name "thunar-shares-plugin")
+    (version "0.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://archive.xfce.org/src/thunar-plugins/"
+                           name "/" (version-major+minor version)
+                           "/" name "-" version ".tar.bz2"))
+       (sha256
+        (base32 "182j8jl91735004hbl0i2xxga4r6fk03srfl6g87czkjm9y8q7fw"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list pkg-config intltool))
+    (inputs
+     (list exo
+           thunar
+           thunarx-python
+           gtk+
+           libxfce4ui))
+    (home-page "https://www.xfce.org/")
+    (synopsis "Quickly share a folder using Samba from Thunar")
+    (description
+     "The Thunar Shares Plugin allows you to quickly share a folder using
+Samba from Thunar without requiring root access.")
+    (license gpl2+)))
+
 (define-public xfwm4
   (package
     (name "xfwm4")
--
2.34.0
L
L
Ludovic Courtès wrote on 8 Jan 23:26 +0100
Re: bug#53008: [PATCH 0/3] Add plugins to Thunar
(name . Simon Streit)(address . simon@netpanic.org)(address . 53008@debbugs.gnu.org)
87r19h279x.fsf@gnu.org
Hi,

Simon Streit <simon@netpanic.org> skribis:

Toggle quote (6 lines)
> I've been trying to package some plugins for Thunar. Unfortunately these
> plugins are not loaded, or are not found in Thunar, and so far I can't see
> why. There are no errors to begin with. A guess would be missing path
> declarations from, maybe, pkg-config. Though the libs are residing in
> ../lib/thunarx-3, where they should be.

Can you check in Thunar itself how those plugins are searched for and
loaded?

If it’s plain ‘dlopen’, then they’ll have to be in $LD_LIBRARY_PATH.

HTH,
Ludo’.
T
T
tumashu wrote on 14 Mar 00:57 +0100
(address . 53008@debbugs.gnu.org)
2c6ab28b.1ac.17f85b6f072.Coremail.tumashu@163.com
I think it is controled by: THUNARX_DIRECTORY.

```
./thunarx-provider-factory.c\0158: dp = g_dir_open (THUNARX_DIRECTORY, 0, NULL);
./thunarx-provider-module.c\0180: path = g_build_filename (THUNARX_DIRECTORY, type_module->name, NULL);
./Makefile\0699: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
./Makefile.in\0699: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
./Makefile.am\05: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
```

While THUNARX_DIRECTORY is defined in Makefile:

```
AM_CPPFLAGS = \
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"thunarx\" \
-DTHUNARX_COMPILATION \
-DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
$(PLATFORM_CPPFLAGS)
```

So, I think we should deal with this like xfce-panel-plugins.patch:

T
T
tumashu wrote on 15 Mar 02:14 +0100
(name . 53008@debbugs.gnu.org)(address . 53008@debbugs.gnu.org)
2ec35459.b7a.17f8b23d59f.Coremail.tumashu@163.com
I do a hack in my own config like below: seem to work when install plugin in system configure :-)



```
(define-public thunar-geeguix
(package
(inherit thunar)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-thunarx-directory
(lambda _
(substitute* "thunarx/Makefile.in"
(("THUNARX_DIRECTORY=.*")
(string-append "THUNARX_DIRECTORY="
"\\\"/run/current-system/profile/lib/thunarx-3\\\" \\\n"))))))))))

```





















At 2022-03-14 07:57:13, "tumashu" <tumashu@163.com> wrote:
Toggle quote (24 lines)
>I think it is controled by: THUNARX_DIRECTORY.
>
>```
>./thunarx-provider-factory.c\0158: dp = g_dir_open (THUNARX_DIRECTORY, 0, NULL);
>./thunarx-provider-module.c\0180: path = g_build_filename (THUNARX_DIRECTORY, type_module->name, NULL);
>./Makefile\0699: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
>./Makefile.in\0699: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
>./Makefile.am\05: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
>```
>
>While THUNARX_DIRECTORY is defined in Makefile:
>
>```
>AM_CPPFLAGS = \
> -I$(top_srcdir) \
> -DG_LOG_DOMAIN=\"thunarx\" \
> -DTHUNARX_COMPILATION \
> -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
> $(PLATFORM_CPPFLAGS)
>```
>
>So, I think we should deal with this like xfce-panel-plugins.patch:
>
>https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/xfce4-panel-plugins.patch
Attachment: file
T
T
tumashu wrote on 18 Mar 07:27 +0100
(name . 53008@debbugs.gnu.org)(address . 53008@debbugs.gnu.org)
43a321c0.3cab.17f9bb56b5d.Coremail.tumashu@163.com
I have added a issue to xfce:



















At 2022-03-15 09:14:15, "tumashu" <tumashu@163.com> wrote:

I do a hack in my own config like below: seem to work when install plugin in system configure :-)



```
(define-public thunar-geeguix
(package
(inherit thunar)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-thunarx-directory
(lambda _
(substitute* "thunarx/Makefile.in"
(("THUNARX_DIRECTORY=.*")
(string-append "THUNARX_DIRECTORY="
"\\\"/run/current-system/profile/lib/thunarx-3\\\" \\\n"))))))))))

```





















At 2022-03-14 07:57:13, "tumashu" <tumashu@163.com> wrote:
Toggle quote (24 lines)
>I think it is controled by: THUNARX_DIRECTORY.
>
>```
>./thunarx-provider-factory.c\0158: dp = g_dir_open (THUNARX_DIRECTORY, 0, NULL);
>./thunarx-provider-module.c\0180: path = g_build_filename (THUNARX_DIRECTORY, type_module->name, NULL);
>./Makefile\0699: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
>./Makefile.in\0699: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
>./Makefile.am\05: -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
>```
>
>While THUNARX_DIRECTORY is defined in Makefile:
>
>```
>AM_CPPFLAGS = \
> -I$(top_srcdir) \
> -DG_LOG_DOMAIN=\"thunarx\" \
> -DTHUNARX_COMPILATION \
> -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
> $(PLATFORM_CPPFLAGS)
>```
>
>So, I think we should deal with this like xfce-panel-plugins.patch:
>
>https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/xfce4-panel-plugins.patch
Attachment: file
?