From e70a68b124668d9bda827fd3b248dab960f4d53d Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Tue, 28 Feb 2023 03:49:55 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20script=20to=20prepare=20desktop?= =?UTF-8?q?=20for=20livecd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../usr/local/bin/prepare-live-desktop.sh | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 archiso/airootfs/usr/local/bin/prepare-live-desktop.sh diff --git a/archiso/airootfs/usr/local/bin/prepare-live-desktop.sh b/archiso/airootfs/usr/local/bin/prepare-live-desktop.sh new file mode 100755 index 0000000..2b35714 --- /dev/null +++ b/archiso/airootfs/usr/local/bin/prepare-live-desktop.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# borrowed from manjaro livecd + +xdg=$(xdg-user-dir DESKTOP) +src='/usr/share/applications' + +## We don't need .desktop on desktop, +## actually we should remove .desktop or fix the .desktop as it is running with pkexec, +## and using current calamares config (not even running with script to provide logs). +#if [[ -f /usr/bin/calamares ]]; then +# install -Dm755 $src/calamares.desktop \ +# $xdg/calamares.desktop +#fi + +# workaround for glib trash bug (https://bugzilla.gnome.org/show_bug.cgi?id=748248) +userid=$(id -u $USER) +if [ ! -d "/.Trash-$userid" ]; then + sudo mkdir -p /.Trash-$userid/{expunged,files,info} + sudo chown -R $userid /.Trash-$userid +fi + +# mark launchers trusted for XFCE 4.18 +for f in $(ls $xdg/*desktop); do + gio set -t string $f metadata::xfce-exe-checksum "$(sha256sum $f | awk '{print $1}')" +done;