From f4a3f6dec973b3237b6acfcb1bf72c41fd6e49e8 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Tue, 29 Mar 2011 01:52:57 +0200 Subject: [PATCH] Generate only select appmenus for AppVMs The appmenus/whitelisted-appmenus.list file now specifies which *.desktop files should make it into the AppVM's apps/ directory. Also include those *.desktop files that have OnlyShownIn attribute --- appmenus/convert_app2template.sh | 10 ++++++---- appmenus/convert_app2template_for_templatevm.sh | 1 + appmenus/whitelisted-appmenus.list | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 appmenus/whitelisted-appmenus.list diff --git a/appmenus/convert_app2template.sh b/appmenus/convert_app2template.sh index 337b9d0..fc016b5 100755 --- a/appmenus/convert_app2template.sh +++ b/appmenus/convert_app2template.sh @@ -3,13 +3,14 @@ SRC=$1 DSTDIR=$2 DST=$DSTDIR/$(basename $SRC) -# Do not copy KDE/GNOME specific apps, e.g. "Home", "Find files", etc -if grep -q OnlyShowIn $SRC ; then +if ! grep -q ^Name $SRC ; then + echo "WARNING: app $SRC doesn't have Name keyword, skipping..." exit 0 fi -if ! grep -q ^Name $SRC ; then - echo "WARNING: app $SRC doesn't have Name keyword, skipping..." +# Skip all the appmenus not explicitly white-listed +DESKTOP_NAME=$(basename $SRC) +if ! grep -q ^$DESKTOP_NAME$ appmenus/whitelisted-appmenus.list ; then exit 0 fi @@ -20,6 +21,7 @@ sed -e "s/^\(Name.*\)=\(.*\)/\1=%VMNAME%: \2/" \ grep -v "^Mime" | \ grep -v "^Icon" | \ grep -v "^TryExec" | \ + grep -v "^OnlyShowIn" | \ grep -v "^Startup" >$DST echo X-Qubes-VmName=%VMNAME% >> $DST diff --git a/appmenus/convert_app2template_for_templatevm.sh b/appmenus/convert_app2template_for_templatevm.sh index 113cc3c..f9d98eb 100755 --- a/appmenus/convert_app2template_for_templatevm.sh +++ b/appmenus/convert_app2template_for_templatevm.sh @@ -9,6 +9,7 @@ sed -e "s/^\(Name.*\)=\(.*\)/\1=%VMNAME%: \2/" \ <$SRC | \ grep -v "^Mime" | \ grep -v "^TryExec" | \ + grep -v "^OnlyShowIn" | \ grep -v "^Startup" >$DST #echo "Categories=%VMNAME%" >> $DST diff --git a/appmenus/whitelisted-appmenus.list b/appmenus/whitelisted-appmenus.list new file mode 100644 index 0000000..ab42670 --- /dev/null +++ b/appmenus/whitelisted-appmenus.list @@ -0,0 +1,16 @@ +gnome-terminal.desktop +gnome-nautilus-home.desktop +dolphin.desktop +manage-print-jobs.desktop +mozilla-firefox.desktop +mozilla-thunderbird.desktop +openoffice.org-calc.desktop +openoffice.org-draw.desktop +openoffice.org-impress.desktop +openoffice.org-math.desktop +openoffice.org-writer.desktop +Kontact.desktop +kcalc.desktop +kwrite.desktop +ksysguard.desktop +fedora-keepassx.desktop