summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2022-10-31 22:16:33 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2022-10-31 22:16:33 +0000
commit2e06caa8f5f035c338ccf784c1b49238a47085f4 (patch)
treee990ccc09a7c80b28a5c9c3f4d6617ab2573edf9 /files
parentade6ca04b8d44a8f3c3257f81ed4a35b51a832fe (diff)
downloaddraklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.tar
draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.tar.gz
draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.tar.bz2
draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.tar.xz
draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.zip
Add Xfce desktop shortcut to draklive-install at run time, not build time.
Xfce has added an extra restriction on executable desktop files in the Desktop directory. They now need to have a xfce-exe-checksum extended file attribute as well as having execute permissions. We can't add this at build time because squashfs does not support system extended attributes.
Diffstat (limited to 'files')
-rw-r--r--files/add-draklive-install-shortcut17
-rw-r--r--files/add-draklive-install-shortcut.desktop8
2 files changed, 25 insertions, 0 deletions
diff --git a/files/add-draklive-install-shortcut b/files/add-draklive-install-shortcut
new file mode 100644
index 0000000..8c81d8b
--- /dev/null
+++ b/files/add-draklive-install-shortcut
@@ -0,0 +1,17 @@
+#!/usr/bin/sh
+
+dst_dir=$HOME/Desktop
+
+src_file=/usr/share/applications/mageia-draklive-install.desktop
+dst_file=$dst_dir/draklive-install.desktop
+
+[ -x /usr/bin/gio ] || exit
+[ -x /usr/bin/sha256sum ] || exit
+[ -r $src_file ] || exit
+[ -e $dst_file ] && exit
+
+mkdir -p $dst_dir
+cp $src_file $dst_file
+checksum=$(sha256sum $dst_file)
+gio set $dst_file metadata::xfce-exe-checksum ${checksum:0:64}
+chmod 750 $dst_file
diff --git a/files/add-draklive-install-shortcut.desktop b/files/add-draklive-install-shortcut.desktop
new file mode 100644
index 0000000..8e5b7fc
--- /dev/null
+++ b/files/add-draklive-install-shortcut.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Add draklive-install shortcut
+Comment=Add draklive-install shortcut to desktop
+Type=Application
+Terminal=false
+StartupNotify=false
+Exec=/usr/bin/add-draklive-install-shortcut
+OnlyShowIn=XFCE;