[qubes-users] Help creating menu entry in a template based AppVM where the App itself is not installed in the template

Hello,

I am running Crossover (to start Office 2010) within Qubes and have some trouble with the App-shortcuts.

The setup:

- I have a template VM ("t-debian-10-crossover") which is based on debian-10-minimal and which has crossover installed

- I have an AppVM ("my-crossover") which is based on the above template VM

- I have installed some windows apps (Notepad++ / Office 2010) in the AppVM. The application are installed in ~/.cxoffice

- I can launch the windows apps from the crossover menu or from an AppVM terminal (for example to launch MS Word from the AppVM Terminal

I would like to add a menu entry to the Qubes AppVM menu and tried to follow the directions from the Qubes docs, but the menu didn't show up.
While the Crossover App itself is installed in a template VM, the windows application are installed in a folder ~/.cxoffice in the AppVM (which based on the crossover template).

The following command will launch a windows app via Crossover in the AppVM:

qvm-run --auto my-crossover '/home/user/.cxoffice/Microsoft_Office_2010/desktopdata/cxmenu/StartMenu.C^5E3A_users_crossover_Start^2BMenu/Programs/Microsoft+Office/Microsoft+Word+2010.lnk'

I have followed the Qubes docs from this link:

/home/user/.cxoffice/Microsoft_Office_2010/desktopdata/cxmenu/StartMenu.C^5E3A_users_crossover_Start^2BMenu/Programs/Microsoft+Office/Microsoft+Word+2010.lnk

I have therefore:

1) created a new .desktop file:

[user@dom0 ~]$ nano ~/.local/share/applications/my-crossover-ms-word.desktop

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
X-Qubes-VmName=my-crossover
Icon=/home/user/.local/share/qubes-appmenus/my-crossover/apps.icons/cxmenu-cxoffice-0-29ra4ke-CrossOver.png
Name=my-crossover: MS-Word
Comment=Run Microsoft Word with CrossOver Linux
Categories=;X-Qubes-VM;
Exec=qvm-run --auto my-crossover /home/user/.cxoffice/Microsoft_Office_2010/desktopdata/cxmenu/StartMenu.C^5E3A_users_crossover_Start^2BMenu/Programs/Microsoft+Office/Microsoft+Word+2010.lnk

2) added the newly creaed my-crossover-ms-word.desktop file to a new .menu file (as mentioned in the Qubes docs)

[user@dom0 ~]$ cat ~/.config/menus/applications-merged/my-crossover-vm.menu
<Menu>
<Name>MS-Word</Name>
<Include>
<Filename>my-crossover-ms-word.desktop</Filename>
</Include>
</Menu>

BUT ... doing so, is _not_ adding anything the applications menu of my AppVM.

Any ideas what I am missing?

- One7two99

Hello,

I am running Crossover (to start Office 2010) within Qubes and have some
trouble with the App-shortcuts.

The setup:

  • I have a template VM (“t-debian-10-crossover”) which is based on
    debian-10-minimal and which has crossover installed

  • I have an AppVM (“my-crossover”) which is based on the above template VM

  • I have installed some windows apps (Notepad++ / Office 2010) in the
    AppVM. The application are installed in ~/.cxoffice

  • I can launch the windows apps from the crossover menu or from an AppVM
    terminal (for example to launch MS Word from the AppVM Terminal

I would like to add a menu entry to the Qubes AppVM menu and tried to
follow the directions from the Qubes docs, but the menu didn’t show up.
While the Crossover App itself is installed in a template VM, the
windows application are installed in a folder ~/.cxoffice in the AppVM
(which based on the crossover template).

The following command will launch a windows app via Crossover in the AppVM:

qvm-run --auto my-crossover
‘/home/user/.cxoffice/Microsoft_Office_2010/desktopdata/cxmenu/StartMenu.C^5E3A_users_crossover_Start^2BMenu/Programs/Microsoft+Office/Microsoft+Word+2010.lnk’

I have followed the Qubes docs from this link:

/home/user/.cxoffice/Microsoft_Office_2010/desktopdata/cxmenu/StartMenu.C^5E3A_users_crossover_Start^2BMenu/Programs/Microsoft+Office/Microsoft+Word+2010.lnk

I have therefore:

  1. created a new .desktop file:

[user@dom0 ~]$ nano ~/.local/share/applications/my-crossover-ms-word.desktop

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
X-Qubes-VmName=my-crossover
Icon=/home/user/.local/share/qubes-appmenus/my-crossover/apps.icons/cxmenu-cxoffice-0-29ra4ke-CrossOver.png
Name=my-crossover: MS-Word
Comment=Run Microsoft Word with CrossOver Linux
Categories=;X-Qubes-VM;
Exec=qvm-run --auto my-crossover
/home/user/.cxoffice/Microsoft_Office_2010/desktopdata/cxmenu/StartMenu.C^5E3A_users_crossover_Start^2BMenu/Programs/Microsoft+Office/Microsoft+Word+2010.lnk

  1. added the newly creaed my-crossover-ms-word.desktop file to a new
    .menu file (as mentioned in the Qubes docs)

[user@dom0 ~]$ cat ~/.config/menus/applications-merged/my-crossover-vm.menu

MS-Word my-crossover-ms-word.desktop

BUT … doing so, is not adding anything the applications menu of my
AppVM.

Any ideas what I am missing?

You can try this a different way. Try creating a basic my-crossover-ms-word.desktop with the command you would run in that AppVM. Then copy that to the template in /usr/share/applications. Force a sync of the menus in that template, and finally go to the AppVM qubes dialog and add your app to your AppVM menu. As long as you know to only run the program in that one VM then you are OK if it’s not actually installed in that template.

Once it is in the menu you can always go back and diff the changes and see what edits you should have done manually. I find it’s just easier to let the system edit the menus, because otherwise it will just get overwritten sometime anyway. As long as you remember to copy those desktop files to the next template upgrade version, it should just work like any other standard application.