There is no way Thunar or any other part of Xfce could modify this file. They have no write access to anything in “/usr”. Unless you are running your DE as root, which would be a serious problem on its own.
I'm not talking about changing anything in /usr once it's installed. Just in a regular directory.
I am also unable to reproduce that behaviour. When changing a name of a file, to which Thunar has write access, it never modified it contents. It displays it as “filename.desktop” if the Name entry is missing (which may include the name being invalid or some syntax error occuring), but the file remains unmodified.
Yes Thunar will display a different filename than it's actual filename which i think is very confusing. As to modifying it's contents, i think this happened:
I create a soulanchor.desktop file. After a while i notice that it's missing the .desktop extension in thunar and why would i assume that it's not the actual filename right? So i change it back to filename.desktop only now this gets added without me realizing: Name[en_US.UTF-8]=SoulAnchor.desktop.
So once i installed that on the system from the package i got a SoulAnchor.desktop menu entry.
]]>I am also unable to reproduce that behaviour. When changing a name of a file, to which Thunar has write access, it never modified it contents. It displays it as “filename.desktop” if the Name entry is missing (which may include the name being invalid or some syntax error occuring), but the file remains unmodified.
]]>EDIT: confirmed, if i rename a file to .desktop in thunar, it automatically adds the name[lang]=soulanchor.desktop line.
If i remove the line, it will auto remove the .desktop extension. Thanks thunar/xfce!
EDIT2: the filename is not changed if i check with a terminal but thunar just displays it with the Name value
Edit: ok this is weird... now it's gone i see...
Edit2: no it's not, i was right, it is in the .desktop file
cp -a usr "$pkgdir/"
Adding --no-preserve=ownership ensure the files will be owned by root in case the originals were not (not an issue in this case)
echo "Name[$LANG]=SoulAnchor" >> "$pkgname.desktop"
Why not have Name=SoulAnchor in soulanchor.desktop? You are only providing one version of the string, if $LANG is unset or different between the build user and the executing user you will get an unexpected result. It also makes the build unreproducible.
]]># Maintainer: Anchorman <soulanchor at protonmail dot com>
pkgname=soulanchor
pkgver=0.8.0
pkgrel=1
pkgdesc="X11 Bible tool"
arch=('x86_64')
url="https://www.dropbox.com/sh/jhuutnchr7pxru3/AAA7rtTic8LdeUFTKEtsW2hPa?dl=0"
license=('custom:soulanchor')
depends=(qt5-base qt5-multimedia)
source=("https://www.dropbox.com/s/zaqi0bnhhk682f3/$pkgname-$pkgver.tar.gz")
md5sums=("90dc5bf9f876b6d53724efdb5bdedb66")
package() {
cd "$srcdir/$pkgname-$pkgver"
cp -a usr "$pkgdir/"
install -Dm644 usr/share/soulanchor/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
echo "Name[$LANG]=SoulAnchor" >> "$pkgname.desktop"
install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}
2nd version without the echo line and with the --no-preserve
# Maintainer: Anchorman <soulanchor at protonmail dot com>
pkgname=soulanchor
pkgver=0.8.0
pkgrel=1
pkgdesc="X11 Bible tool"
arch=('x86_64')
url="https://www.dropbox.com/sh/jhuutnchr7pxru3/AAA7rtTic8LdeUFTKEtsW2hPa?dl=0"
license=('custom:soulanchor')
depends=(qt5-base qt5-multimedia)
source=("https://www.dropbox.com/s/zaqi0bnhhk682f3/$pkgname-$pkgver.tar.gz")
md5sums=("90dc5bf9f876b6d53724efdb5bdedb66")
Name=SoulAnchor
package() {
cd "$srcdir/$pkgname-$pkgver"
cp -a --no-preserve=ownership usr "$pkgdir/"
install -Dm644 usr/share/soulanchor/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}