thunar-shares-plugin
does not work since quite some time. I am a bit surprised that actually, there seems to be only low interest in that topic. See Thunar Shares Plugin 'net usershare' error 255 - #8 by ondara for a reference.
Currently, thunar-shares-plugin
seems to be broken.
It starts with the fact that there are at least three different thunar-shares-plugin
packages available when you search in pamac
.
The first, thunar-shares-plugin-manjaro
, does not seem to work at all. You simply do not get the Share tab when clicking a folder’s properties. Even tried a reboot, to no avail.
The second, thunar-shares-plugin
(without the -manjaro
suffix) just spits out the following errors:
Calling "net usershare" created error 255: [2022/01/22 17:25:39,0] ../../lib/util/debug.c:1100(reopen_one_log)
reopen_one_log: Unable to open new log file 'shared/log.net': No such file or directory
net usershare add: share name /home/gerd/shared contains invalid characters (any of %<>*?|/\+-=;:,)
Of course, creating an empty file shared/log.net
does not help. And there are also no illegal chars in the path to the folder to be shared.
Finally, I tried thunar-shares-plugin-gtk
but it shows the same net usershare add
error as thunar-shares-plugin
.
According to Thunar Shares Plugin 'net usershare' error 255 - #8 by ondara, this has been introduced by a recent Manjaro update.
UPDATE: The solution is provided by @megavolt here: Samba Nautilus-Share funktioniert nicht mehr - #20 by megavolt
What do you have to do?
- Download the following PKGBUILD in an empty folder:
# Maintainer : Rob McCathie <korrode at gmail>
# Contributor: SpepS <dreamspepser at yahoo dot it>
# Contributor: vinz <vinz@archlinux.us>
# Contributor: Aurélien DESBRIÈRES <ice.cube@gmx.com>
# Contributor: Alexandru Ianu <alexandru.ianu at gmail>
_name=thunar-shares-plugin
pkgname=$_name
pkgver=0.3.1
_gitcommit=9f9d2429217838b3b8375e41ab3675412cf1d0ed
pkgrel=1
pkgdesc="Thunar plugin to quickly share a folder using Samba without requiring root access"
arch=('i686' 'x86_64')
url="http://goodies.xfce.org/projects/thunar-plugins/${_name}"
license=('GPL2' 'LGPL')
depends=('thunar>=1.7.0' 'samba' 'manjaro-settings-samba')
makedepends=('xfce4-dev-tools')
provides=("${_name}=${pkgver}")
replaces=("$_name-manjaro")
conflicts=("${_name}" "$_name-manjaro" "$_name-gtk")
#source=("http://git.xfce.org/thunar-plugins/${_name}/snapshot/${_name}-${_gitcommit}.tar.bz2")
source=("https://gitlab.xfce.org/thunar-plugins/thunar-shares-plugin/-/archive/master/${_name}-master.tar.bz2"
"shares.patch")
sha256sums=('bdb4c5e3c4125522d5893caacf17d599e4bf259b947ee46961825f4e2e80810a'
'88ffc824dd38bb61d3e0db0a0df44bc1afcae3a2b27557570c0e984917c2d575')
build() {
#cd "${srcdir}/${_name}-${_gitcommit}"
cd "${srcdir}/${_name}-master"
patch -p1 -i "$srcdir"/shares.patch
./autogen.sh --prefix=/usr --enable-debug=no
make
}
package() {
#cd "${srcdir}/${_name}-${_gitcommit}"
cd "${srcdir}/${_name}-master"
make DESTDIR="${pkgdir}" install
}
- Download the following patch in the same folder and name it
shares.patch
:
--- a/libshares/shares.c 2022-01-22 18:59:51.925421512 +0100
+++ b/libshares/shares.c 2022-01-22 19:00:16.665155816 +0100
@@ -711,7 +711,7 @@
return FALSE;
argv[0] = "add";
- argv[1] = "-l";
+ argv[1] = "--long";
argv[2] = info->share_name;
argv[3] = info->path;
argv[4] = info->comment;
- Run
makepkg --syncdeps
, let it install the dependencies and have a look if it is able to create the package.
- Install the newly made package with
sudo pacman -U thunar-shares-plugin-0.3.1-1-x86_64.pkg.tar.zst
and replace all other versions of thunar-shares-pluigin
.
- Important: Log out and back in to your X session, or reboot.
- Finished:
thunar-shares-plugin
works again!