From b81495171f140da071c374186b939cf51f000753 Mon Sep 17 00:00:00 2001 From: awokd <34515595+awokd@users.noreply.github.com> Date: Sat, 3 Mar 2018 14:53:40 +0000 Subject: [PATCH 1/4] add custom shortcut creation; consistency --- common-tasks/managing-appvm-shortcuts.md | 50 ++++++++++++++++++------ 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/common-tasks/managing-appvm-shortcuts.md b/common-tasks/managing-appvm-shortcuts.md index dcbf3613..17c18fd0 100644 --- a/common-tasks/managing-appvm-shortcuts.md +++ b/common-tasks/managing-appvm-shortcuts.md @@ -16,7 +16,7 @@ Clicking on such shortcut runs the assigned application in its AppVM. ![dom0-menu.png"](/attachment/wiki/ManagingAppVmShortcuts/dom0-menu.png) -To make newly installed applications show up in the menu, use the **qvm-sync-appmenus** command (Linux VMs do this automatically): +To make newly installed applications show up in the menu, use the `qvm-sync-appmenus` command (Linux VMs do this automatically): `qvm-sync-appmenus vmname` @@ -26,6 +26,40 @@ After that, select the *Add more shortcuts* entry in the VM's submenu to customi The above image shows that Windows HVMs are also supported (provided that Qubes Tools are installed). +What if my application has not been automatically included in the list of available apps? +----------------------------------------------------------------------------------------- + +Some times applications may not have included a `.desktop` file and may not be detected by `qvm-sync-appmenus`. +Other times, you may want to make a web shortcut available from the Qubes start menu. + +You can manually create new entries in the "available applications" list of shortcuts for all AppVMs based on a TemplateVM. +To do this: + +1. Open a terminal window to the TemplateVM. +2. Create a custom `.desktop` file in `/usr/local/share/applications` (you may need to first create the subdirectory). + Look in `/usr/share/applications` for existing examples, or see the full [file specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html). +3. In dom0, run `qvm-sync-appmenus `. +4. Go to VM Settings of the AppVM(s) to which you want to add the new shortcut, then the Applications tab. + Move the newly created shortcut to the right under selected. + +If you only want to create a shortcut for a single AppVM, you can create a custom menu entry instead: + +1. Open a terminal window to Dom0. +2. Create a custom `.desktop` file in `~/.local/share/applications`. + Look in the same directory for existing examples, or see the full [file specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html). + You may use `qvm-run` inside the `.desktop` file; see [Behind the scenes](/doc/managing-appvm-shortcuts/#behind-the-scenes) for more details. +3. Edit the `~/.config/menus/applications-merged/-vm.menu` file for the AppVM. +4. Add a custom menu entry referring to your newly created `.desktop` file. + + ~~~ + + Webmail + + custom.desktop + + + ~~~ + What about applications in DispVMs? ----------------------------------- @@ -42,9 +76,9 @@ In Windows it's a PowerShell script located in `c:\Program Files\Invisible Thing * R4.0 - The list of installed applications for each AppVM is stored in dom0's `~/.local/share/qubes-appmenus/vmname/apps.templates`. + The list of installed applications for each AppVM is stored in dom0's `~/.local/share/qubes-appmenus//apps.templates`. Each menu entry is a file that follows the [.desktop file format](https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html) with some wildcards (*%VMNAME%*, *%VMDIR%*). - Applications selected to appear in the menu are stored in `~/.local/share/qubes-appmenus/vmname/apps`. + Applications selected to appear in the menu are stored in `~/.local/share/qubes-appmenus//apps`. Actual command lines for the menu shortcuts involve `qvm-run` command which starts a process in another domain. Examples: `qvm-run -q -a --service -- %VMNAME% qubes.StartApp+7-Zip-7-Zip_File_Manager` or `qvm-run -q -a --service -- %VMNAME% qubes.StartApp+firefox` @@ -53,18 +87,12 @@ In Windows it's a PowerShell script located in `c:\Program Files\Invisible Thing * R3.2 - The list of installed applications for each AppVM is stored in dom0's `/var/lib/qubes/vm-templates/templatename/apps.templates` (or in case of StandaloneVM: `/var/lib/qubes/appvms/vmname/apps.templates`). + The list of installed applications for each AppVM is stored in dom0's `/var/lib/qubes/vm-templates//apps.templates` (or in case of StandaloneVM: `/var/lib/qubes/appvms//apps.templates`). Each menu entry is a file that follows the [.desktop file format](https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html) with some wildcards (*%VMNAME%*, *%VMDIR%*). - Applications selected to appear in the menu are stored in `/var/lib/qubes/appvms/vmname/apps`. + Applications selected to appear in the menu are stored in `/var/lib/qubes/appvms//apps`. Actual command lines for the menu shortcuts involve `qvm-run` command which starts a process in another domain. Examples: `qvm-run -q --tray -a w7s 'cmd.exe /c "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Accessories\\Calculator.lnk"'` or `qvm-run -q --tray -a untrusted 'firefox %u'` Note that you can create a shortcut that points to a .desktop file in your AppVM with e.g. `qvm-run -q --tray -a personal -- 'qubes-desktop-run /home/user/application.desktop'`. -What if my application has not been automatically included in the list of available apps? ------------------------------------------------------------------------------------------ - -You can manually create new entries in the "available applications" list of shortcuts. -See [Signal](/doc/signal/) for a working example of creating a new menu item for a Chrome .desktop shortcut. - From 6808814597fe7700edca19a275bc9b4dde183fc5 Mon Sep 17 00:00:00 2001 From: awokd <34515595+awokd@users.noreply.github.com> Date: Sat, 3 Mar 2018 19:12:37 +0000 Subject: [PATCH 2/4] add via OS package manager --- common-tasks/managing-appvm-shortcuts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-tasks/managing-appvm-shortcuts.md b/common-tasks/managing-appvm-shortcuts.md index 17c18fd0..adcce6c1 100644 --- a/common-tasks/managing-appvm-shortcuts.md +++ b/common-tasks/managing-appvm-shortcuts.md @@ -16,7 +16,7 @@ Clicking on such shortcut runs the assigned application in its AppVM. ![dom0-menu.png"](/attachment/wiki/ManagingAppVmShortcuts/dom0-menu.png) -To make newly installed applications show up in the menu, use the `qvm-sync-appmenus` command (Linux VMs do this automatically): +To make applications newly installed via the OS's package manager show up in the menu, use the `qvm-sync-appmenus` command (Linux VMs do this automatically): `qvm-sync-appmenus vmname` From 122743a3c82eb6eb1754d1db995c2a7c4bba2b00 Mon Sep 17 00:00:00 2001 From: awokd <34515595+awokd@users.noreply.github.com> Date: Wed, 7 Mar 2018 08:41:47 +0000 Subject: [PATCH 3/4] add .desktop example --- common-tasks/managing-appvm-shortcuts.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/common-tasks/managing-appvm-shortcuts.md b/common-tasks/managing-appvm-shortcuts.md index adcce6c1..3ef4734b 100644 --- a/common-tasks/managing-appvm-shortcuts.md +++ b/common-tasks/managing-appvm-shortcuts.md @@ -38,6 +38,19 @@ To do this: 1. Open a terminal window to the TemplateVM. 2. Create a custom `.desktop` file in `/usr/local/share/applications` (you may need to first create the subdirectory). Look in `/usr/share/applications` for existing examples, or see the full [file specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html). + It will be something like: + ``` + [Desktop Entry] + Version=1.0 + Type=Application + Terminal=false + Icon=/usr/share/icons/Adwaita/256x256/devices/scanner.png + Name=VueScan + GenericName=Scanner + Comment=Scan Documents + Categories=Office;Scanning; + Exec=vuescan + ``` 3. In dom0, run `qvm-sync-appmenus `. 4. Go to VM Settings of the AppVM(s) to which you want to add the new shortcut, then the Applications tab. Move the newly created shortcut to the right under selected. @@ -83,7 +96,7 @@ In Windows it's a PowerShell script located in `c:\Program Files\Invisible Thing Actual command lines for the menu shortcuts involve `qvm-run` command which starts a process in another domain. Examples: `qvm-run -q -a --service -- %VMNAME% qubes.StartApp+7-Zip-7-Zip_File_Manager` or `qvm-run -q -a --service -- %VMNAME% qubes.StartApp+firefox` - Note that you can create a shortcut that points to a .desktop file in your AppVM with e.g. `qvm-run -q -a --service -- personal qubes.StartApp+firefox` + Note that you can create a shortcut that points to a .desktop file in your AppVM with e.g. `qvm-run -q -a --service -- personal qubes.StartApp+firefox`. * R3.2 From bba6d1e6c372ec86ab0a21f0b69d0360e7b8d64a Mon Sep 17 00:00:00 2001 From: awokd <34515595+awokd@users.noreply.github.com> Date: Mon, 19 Mar 2018 01:35:58 +0000 Subject: [PATCH 4/4] /usr/share/applications --- common-tasks/managing-appvm-shortcuts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-tasks/managing-appvm-shortcuts.md b/common-tasks/managing-appvm-shortcuts.md index 3ef4734b..e4353e10 100644 --- a/common-tasks/managing-appvm-shortcuts.md +++ b/common-tasks/managing-appvm-shortcuts.md @@ -36,7 +36,7 @@ You can manually create new entries in the "available applications" list of shor To do this: 1. Open a terminal window to the TemplateVM. -2. Create a custom `.desktop` file in `/usr/local/share/applications` (you may need to first create the subdirectory). +2. Create a custom `.desktop` file in `/usr/share/applications` (you may need to first create the subdirectory). Look in `/usr/share/applications` for existing examples, or see the full [file specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html). It will be something like: ```