Snap Apps Topic is solved

Please post all general support questions for LXDE here.
Locked
Tacuabe
Posts: 8
Joined: Thu Jul 07, 2011 1:37 am

Snap Apps  Topic is solved

Post by Tacuabe »

I will appreciate if anyone can provide information on how to create a keybinding for a snap-store app. I have created several keybindings to my liking but failed miserably when trying with a useful app from the store. Tried every trick I knew to no avail. This is my first attempt in this area.

The snap app does show in the menu, will run from a "Run" keybinding I have and even starts automatically after booting.
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Snap Apps

Post by drooly »

You can assign any command that executes in a shell to a keybinding.
Do you know how to do launch the app in question from the command line?
Once that is established, it's a small step to assign a hotkey to it.

BTW, what distro do you use? Did it come with LXDE preinstalled?
Tacuabe
Posts: 8
Joined: Thu Jul 07, 2011 1:37 am

Re: Snap Apps

Post by Tacuabe »

Hello Drooly and thanks for getting in touch.
I'm using Debian 10 Buster which I installed with the LXDE option.
The snap app I'm using is nimblenote, a note taking app that works using only keyboard commands. I can run it from the command line by just typing its name. However, as soon as I close the CL window it will also close the app.
Using the Run keybinding I can run it with env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/nimblenote_nimblenote.desktop /snap/bin/nimblenote. In this case, the terminal window does not appear and nimblenote remains in the Taskbar permanently during my session (which is what I want). I also tried running it with just its name or with nimblenote_nimblenote.desktop but nothing happens. BTW, this last one is what appears in the lxde-applications.menu. From the menu it runs OK.
Here is the keybinding I was trying to use:
<keybind key="A-n">
<action name="Execute">
<command>nimblenote</command>
</action>
</keybind>
When copying this code for you, I realized that in some other keybindings I had a different structure and tried this:
<!-- Launch nimblenote -->
<keybind key="A-n">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>nimblenote_nimblenote.desktop</name>
</startupnotify>
<command>env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/nimblenote_nimblenote.desktop /snap/bin/nimblenote</command>
</action>
</keybind>
Surprisingly this worked just as I wanted. Using startupnotify made the difference.
So, once more thanks for your help and please mark this request as solved.
Locked