diff --git a/dom0/misc/qubes-templatevm.directory.template b/dom0/misc/qubes-templatevm.directory.template new file mode 100644 index 00000000..596fffaf --- /dev/null +++ b/dom0/misc/qubes-templatevm.directory.template @@ -0,0 +1,5 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Directory +Name=Template: %VMNAME% +Icon=/usr/share/qubes/icons/template.png diff --git a/dom0/misc/qubes-vm.directory.template b/dom0/misc/qubes-vm.directory.template new file mode 100644 index 00000000..6825d200 --- /dev/null +++ b/dom0/misc/qubes-vm.directory.template @@ -0,0 +1,5 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Directory +Name=Domain: %VMNAME% +Icon=%VMDIR%/icon.png diff --git a/dom0/qvm-tools/qvm-sync-appmenus b/dom0/qvm-tools/qvm-sync-appmenus index c444bbb8..da5f5c97 100755 --- a/dom0/qvm-tools/qvm-sync-appmenus +++ b/dom0/qvm-tools/qvm-sync-appmenus @@ -25,6 +25,7 @@ import re import os import sys import fnmatch +import shutil from optparse import OptionParser from qubes.qubes import QubesVmCollection,QubesException from qubes.qubes import qrexec_client_path @@ -156,6 +157,10 @@ def main(): if not os.path.exists(vm.appmenus_templates_dir): os.mkdir(vm.appmenus_templates_dir) + if vm.is_template(): + shutil.copy('/usr/share/qubes/qubes-templatevm.directory.template', vm.appmenus_templates_dir) + else: + shutil.copy('/usr/share/qubes/qubes-vm.directory.template', vm.appmenus_templates_dir) # Create new/update existing templates if options.verbose: @@ -181,9 +186,3 @@ def main(): os.unlink(vm.appmenus_templates_dir + '/' + appmenu_file) main() - - - - - - diff --git a/rpm_spec/core-dom0.spec b/rpm_spec/core-dom0.spec index 5223a3ca..5b6e1519 100644 --- a/rpm_spec/core-dom0.spec +++ b/rpm_spec/core-dom0.spec @@ -111,6 +111,8 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/qubes/dvmdata mkdir -p $RPM_BUILD_ROOT/usr/share/qubes/icons cp icons/*.png $RPM_BUILD_ROOT/usr/share/qubes/icons +cp misc/qubes-vm.directory.template $RPM_BUILD_ROOT/usr/share/qubes/ +cp misc/qubes-templatevm.directory.template $RPM_BUILD_ROOT/usr/share/qubes/ mkdir -p $RPM_BUILD_ROOT/usr/bin cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes @@ -271,6 +273,8 @@ fi %attr(770,root,qubes) %dir /var/lib/qubes/backup %attr(770,root,qubes) %dir /var/lib/qubes/dvmdata %dir /usr/share/qubes/icons/*.png +/usr/share/qubes/qubes-vm.directory.template +/usr/share/qubes/qubes-templatevm.directory.template /usr/lib/qubes/qubes_setup_dnat_to_ns /usr/lib/qubes/qubes_fix_nm_conf.sh /etc/dhclient.d/qubes_setup_dnat_to_ns.sh