Biont / sway-launcher-desktop

TUI Application launcher with Desktop Entry support. Made for SwayWM, but runs anywhere
GNU General Public License v3.0
606 stars 28 forks source link

Can't launch gedit #40

Closed alanorth closed 3 years ago

alanorth commented 3 years ago

For some reason I can't launch gedit. When I run sway-launcher-desktop from the command line and capture the debug log I get:

Starting launcher instance with the following providers: desktop user command
Launching command: screen-256color -e gedit

For comparison, here is what it looks like when I launch Firefox Nightly (from a .desktop file in my home directory):

Starting launcher instance with the following providers: desktop user command
Launching command: /usr/bin/sway-launcher-desktop run-desktop '/home/aorth/.local/share/applications/firefox-nightly.desktop'
Searching for pattern: ^\\[Desktop Entry\\]
Generated Launch command from .desktop file: /home/aorth/Downloads/firefox/firefox

I'm running Arch Linux on Sway. What's going on here? Thanks!

Biont commented 3 years ago

Are there any errors when you launch the command yourself? And am I reading correctly that this is using an arbitrary command (as opposed to picking the binary)?

alanorth commented 3 years ago

It seems to be picking the .desktop version of gedit. I'm just starting sway-launcher-desktop and typing "gedit". Here's how it looks from the command line:

2021-05-07T14:08:50,020951635+03:00-fs8

And after sway-launcher-desktop just exits seemingly normally:

2021-05-07T14:11:34,357984272+03:00-fs8

I'm on Arch Linux. They are using the upstream org.gnome.gedit.desktop file. As for your question about errors, when I launch gedit manually from the command line there are some warnings about missing spelling libraries:

** (gedit:215406): WARNING **: 14:15:15.403: Error loading plugin: libaspell.so.15: cannot open shared object file: No such file or directory
** (gedit:215406): WARNING **: 14:15:15.403: Error loading plugin: libhspell.so.0: cannot open shared object file: No such file or directory
** (gedit:215406): WARNING **: 14:15:15.404: Error loading plugin: libnuspell.so.4: cannot open shared object file: No such file or directory
** (gedit:215406): WARNING **: 14:15:15.404: Error loading plugin: libvoikko.so.1: cannot open shared object file: No such file or directory
Biont commented 3 years ago

...but it does start normally despite these errors right?

I now remember a quirk about gedit: The result you chose actually executes the binary as a command ( shown by the >_ glyph). To "execute" the desktop file (with a rocket glyph), you need to search for "Text Editor" which is how they chose to represent their application in the XDG universe. It's a bit unintuitive, but that's just how it is.

Not using the desktop file results in the gedit call to run through another teminal session which does work on my machine, but maybe is another source of error/complexity in your case.

Can you try running gedit from the Desktop file by searching for "Text Editor"?

alanorth commented 3 years ago

Yeah gedit starts normally if I launch it manually via the command line or using "gedit" from another launcher such as wofi or yofi.

And yes, gedit starts correctly if I launch it as "Text Editor" from sway-launcher-desktop.