Compare commits

...

6 Commits

Author SHA1 Message Date
unman cbd8cde8f1
Fix minor typos 2024-05-04 02:45:29 +00:00
unman c10adcc2dc
Describe adding a menu entry for applications under wine
Merge branch 'pr-1254'
2024-05-04 02:40:19 +00:00
Dr. Gerhard Weck 8805362897
Clarify renaming of desktop files 2024-04-26 10:47:38 +02:00
Dr. Gerhard Weck b6b621151c
Update app-menu-shortcut-troubleshooting.mdChange the wine description for Qubes R4.2 2024-04-24 14:52:14 +02:00
Dr. Gerhard Weck d0aef81db6
Merge branch 'QubesOS:main' into patch-7 2023-12-20 10:15:39 +01:00
Dr. Gerhard Weck 5d676db9f1
Update app-menu-shortcut-troubleshooting.md 2022-05-26 17:02:31 +02:00
1 changed files with 13 additions and 9 deletions

View File

@ -16,11 +16,11 @@ Clicking on such shortcut runs the assigned application in its app qube.
![dom0-menu.png"](/attachment/doc/r4.0-dom0-menu.png)
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):
To make applications newly installed via the OS's package manager show up in the menu, use the `qvm-sync-appmenus` command (Linux qubes do this automatically):
`qvm-sync-appmenus vmname`
After that, select the *Add more shortcuts* entry in the VM's submenu to customize which applications are shown:
After that, select the *Add more shortcuts* entry in the qube's submenu to customize which applications are shown:
![dom0-appmenu-select.png"](/attachment/doc/r4.0-dom0-appmenu-select.png)
@ -29,7 +29,7 @@ The above image shows that Windows HVMs are also supported (provided that Qubes
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`.
Sometimes 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 app qubes based on a template.
@ -75,7 +75,7 @@ If you only want to create a shortcut for a single app qube, you can create a cu
</Menu>
~~~
What about applications in DispVMs?
What about applications in disposables?
-----------------------------------
[See here](/doc/disposable-customization/).
@ -101,17 +101,21 @@ $ rm -i ~/.local/share/applications/my-old-vm-*
Behind the scenes
-----------------
`qvm-sync-appmenus` works by invoking *GetAppMenus* [Qubes service](/doc/qrexec/) in the target domain.
This service enumerates installed applications and sends formatted info back to the dom0 script (`/usr/libexec/qubes-appmenus/qubes-receive-appmenus`) which creates .desktop files in the app qube/template directory.
`qvm-sync-appmenus` works by invoking the *GetAppMenus* [Qubes service](/doc/qrexec/) in the target domain.
This service enumerates applications installed in that qube and sends formatted info back to the dom0 script (`/usr/libexec/qubes-appmenus/qubes-receive-appmenus`) which creates `.desktop` files in the app qube/template directory of dom0.
For Linux VMs the service script is in `/etc/qubes-rpc/qubes.GetAppMenus`.
For Linux qubes the service script is in `/etc/qubes-rpc/qubes.GetAppMenus`.
In Windows it's a PowerShell script located in `c:\Program Files\Invisible Things Lab\Qubes OS Windows Tools\qubes-rpc-services\get-appmenus.ps1` by default.
The list of installed applications for each app qube is stored in dom0's `~/.local/share/qubes-appmenus/<vmname>/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`.
Actual command lines for the menu shortcuts involve `qvm-run` command which starts a process in another domain.
Actual command lines for the menu shortcuts involve the `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 app qube 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 app qube with e.g. `qvm-run -q -a --service -- personal qubes.StartApp+firefox`.
While this works well for standard applications, creating a menu entry for Windows applications running under *wine* may need an additional step in order to establish the necessary environment in *wine*. Installing software under *wine* will create the needed `.desktop` file in the target Linux qube in the directory `~/.local/share/applications/wine/Programs/` or a subdirectory thereof, depending on the Windows menu structure seen under *wine*. If the name of this file contains spaces, it will not be found, because the `qvm-run` command is falsely seen as terminating at this space. The solution is to remove these spaces by renaming the `.desktop` file accordingly, e.g. by renaming `Microsoft Excel.desktop` to `Excel.desktop`. Refreshing the menu structure will then build working menu entries.
**Note:** Applications installed under *wine* are installed in AppVMs, not in the template on which these AppVMs are based, as the file structure used by *wine* is stored under `~/.wine`, which is part of the persistent data of the AppVM and not inherited from its template.