DevAlien/workspaces

Change the way we retrieve the apps

DevAlien opened this issue · 7 comments

We can try to retrieve the apps the same way the application switchboard plug does it.
https://github.com/elementary/switchboard-plug-applications/blob/dc3b3acdbf19017f3e9a6890552f14cd6298ab90/src/Startup/Utils.vala Which is probably better and would show the flatpak apps as well?

Hi! I am not sure if it is the same or a different issue.
I tried the app today and I was able to choose Slack from flatpak. But unfortunately, I wasn't able to run it.
Not sure if it is relevant but I installed it via AppCenter on Elementary.

Opening FlatPack applications

[EDIT] I tested the version from flatpak and that one indeed doesn't show flatpak apps.

Hey! Thanks for your quick response!

I am on 5.1.7
Screenshot from 2020-12-20 19-45-57

I uninstalled Flatpak version and installed AppCenter version back.

I run workspaces with /usr/bin/com.github.devalien.workspaces and there is zero output when I click the workspace name. It just finishes the program and gets back to the command line.

As an experiment I've set Run in terminal and then when I click test it opens a new tab and prints:

error: No command specified

See '/usr/bin/flatpak --help'

When I hit ESC to leave preferences I also see: (com.github.devalien.workspaces:7438): GLib-GObject-CRITICAL **: 19:52:37.614: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

If there is a way to provide you with more helpful logs or enable verbose mode, I am happy to help :)

No need to apologize :) Happy to help :) BTW, If that env variable is the standard way of getting info for bug reports, I'd encourage to add it to issue template alongside the system information.

Here is the log.

╭─tomasz@tomasz-X570-AORUS-ULTRA ~ 
╰─$ G_MESSAGES_DEBUG=all com.github.devalien.workspaces                                                                                                                                                           
** (process:3769): DEBUG: 06:20:46.163: Application.vala:227: Ensuring dir exists: /home/tomasz/.local/share/com.github.devalien.workspaces
(com.github.devalien.workspaces:3769): Gtk-DEBUG: 06:20:46.189: Connecting to session manager
** (com.github.devalien.workspaces:3769): DEBUG: 06:20:46.189: WorkspacesStore.vala:33: store initialized in path /home/tomasz/.local/share/com.github.devalien.workspaces/data.json
** (com.github.devalien.workspaces:3769): DEBUG: 06:20:46.189: WorkspacesStore.vala:117: loading store
** (com.github.devalien.workspaces:3769): DEBUG: 06:20:46.189: WorkspacesStore.vala:50: 1
** (com.github.devalien.workspaces:3769): DEBUG: 06:20:46.189: WorkspacesStore.vala:135: loaded store size: 1
** INFO: 06:20:48.586: Item.vala:52: Command to launch: /usr/bin/flatpak 

The program prints the first 5 lines after the start and only the last one when clicking the workspace name. The same line prints when I hit the test button in preferences.

Looks like for flatpack it doesn't provide which program it wants to actually run. That would explain why only flatpack programs don't work.

Ok I found the issue, I just have to find a better way to execute those apps!

same here:
workspaces does not find the apps from $HOME/.local/share/flatpak/exports/share/applications/

workarround is to start it by commandline.
e.g.:
flatpak run com.gitlab.librebob.Athenaeum