Any command to start for opening Qubes Application Menu

Dear Members

Is there any way for opening Qubes Application Menu in fastest and correct way? Otherwise it is always needed to open it with the mouse or with the touchpad.

What I tried (on dom0): Via Keyboard Layout (Settings) - Tab: Application Shortcuts - Add new command:

a) /usr/bin/qubes-app-menu with Ctrl+Alt+Q
It works. But this Application Menu is always opening on that place where the mouse is. It should be on the top left where the Qubes Logo is to see. And in addition: After opening that Application Menu, sometimes it does not work with selecting any app or whatever any item there.

b) gdbus call --session --dest org.qubesos.appmenu --object-path "/org/qubesos/appmenu" --method org.freedesktop.Application.Activate "{}" with Super L

Any idea what I could try?

Thanks for sharing that with me.

Kind regards,
AC

No. Not at the moment. Related issue:

Now that I reconsider this issue, it would be easy to add a command line option to force
GTK to open it at top left of the screen. :thinking:

p.s. Related line in Glade file:

1 Like

There is a workaround. Note that it moves your mouse for a moment. It uses the option b you have already tried.

From this guide:


p.s.
It is off topic, but do you really need to open the app menu from keyboard, at all? Native xfce appfinder has the same options, but more versatile since it is keyboard-friendly, has search and allows running commands too.

2 Likes

Thanks a lot @otter2 for this workaround. A good idea or alternative to know. The problem is: That I have two different displays… this might causes the next problem. :slight_smile:

  1. Display - Laptop
  2. Display - Eizo (as extended monitor)

Between: I do not really need this variant: Open the Application Menu from keyboard (for getting fast the Qubes Application Menu), but I find it somehow useful, to open some other apps faster. :slight_smile: (some steps far)

Oh, I just saw this option with the Application Finder. It is also a nice option.

But interesting: Why is there not any “Super L” shortcut for opening Qubes Application Menu implemented? Is that because of any security reason?

it’s not possible to bind “Super L” out of the box, you need to use xcape for that

this should explain how to proceed: Problem assigning meta key / Desktop / Xfce Forums

Basically, xcape will listen on “Super L” and send a custom combination you want (pick something unique like ctrl+shift+F7 or whatever :smiley: ) and use this combination in xfce menu

2 Likes

I’m not sure about the two display situation, but from what I can gather from the guide description, any monitor configuration that differs from 1920x1080 points can be fixed by changing the coordinates in this line:

xdotool mousemove 5 5

This also should apply to you moving the panel or the launcher to a different spot.

1 Like

I did test it and it works… I can see the small effect on that Qubes Logo. But the Application menu does not open. Did I miss something?

I did follow that setup steps as you described:

[dom0] In dom0 create a script containing the code below (expandable).
Make it executable (chmod +x) and bind to keyboard shortcut.

The script file: qubes-menu.sh
Located: /usr/bin/

eval $(xdotool getmouselocation --shell)
xdotool mousemove 5 5
gdbus call --session --dest org.qubesos.appmenu --object-path "/org/qubesos/appmenu" --method org.freedesktop.Application.Activate "{}"
if [ $X -lt 720 ] && [ $Y -lt 775 ]; then
	X=720	# prevent the mouse from selecting items in the app menu when opening it with the keyboard
fi		# note that these values may need adjusting if using a screen with a resolution other than 1080p
xdotool mousemove $X $Y

Finally, I did bind via Application Shortcut as “Ctrl+Alt+Q” to run this script.

What? Somehow I can… Maybe I have weird hardware. Maybe it was fixed since.:person_shrugging:

If works for me just fine. Try running it from shell to see if there are any errors.

Edit:
If you are going to troubleshoot it, try executing just gdbus call part of the script. It opens the menu, thus must be broken in you case.

1 Like

Hi @ac.qubes-os
I use the alternate Whisker application menu and mapped it to the Super L.

1 Like

But I could bind with “Super L”. It works with X1. No xcape needed. Anyway, opening Qubes Application Menu does not open. This is as discussed here another issue.

1 Like

I tried to run in termina this: qubes-menu.sh
I got this then: line 3: qdbus: command not found

Not sure if this script is located in right directory: /usr/bin

I think you have a typo in this line:

gdbus call --session --dest org.qubesos.appmenu --object-path "/org/qubesos/appmenu" --method org.freedesktop.Application.Activate "{}"

Check the script and replace qdbus with gdbus

1 Like

Indeed. It was a type issue. But it still not running:

Error: /org/qubesos/appmenu is not a valid object path

I think it can return that error when the method is wrong too. Can you check it?

Thanks @alimirjamali for your reply today. I also want to try with your suggestion. How do you imagine for adding a command line option in addition to force it:

gdbus call --session --dest org.qubesos.appmenu --object-path "/org/qubesos/appmenu" --method org.freedesktop.Application.Activate "{}"

I am working on a complete solution for this at the moment. The Qubes Menu Settings will have a drop-down option for Menu Position. The options will be left, center, right, and mouse position (the current behaviour). It will set the menu-position feature of dom0 (or GUIVM). And Appmenu will behave based on this feature.

I believe the patch will be ready in few hours for submission. Usually it takes some time for it to be reviewed and approved. Then it will take around one or two month to be tested in testing repository. And finally merged to stable repository.

1 Like

Interesting. Method seems to be fine. I could fire this command below in the terminal and the Application Menu appears:

gdbus call --session --dest org.qubesos.appmenu --object-path "/org/qubesos/appmenu" --method org.freedesktop.Application.Activate "{}"

But it is still not working with the complete bash script. :face_with_monocle:

It should. Check the script.

Another reason I can think of is you running the script as another user, for example - with sudo, instead of running it as your user.

1 Like

Sneak peek
menu_position1
menu_position2

2 Likes