albert icon indicating copy to clipboard operation
albert copied to clipboard

Terminal wezterm missing probably due to flatpak

Open igorzhilin opened this issue 1 year ago • 5 comments

Hi Manuel

I have wezterm installed via flatpak. I use alias wezterm='flatpak run org.wezfurlong.wezterm'.

In the Albert source code file terminalprovider.cpp, I see the static const vector<ExecutableTerminal> exec_terminals that contains a bunch of terms including wezterm. But the problem is that my wezterm is flatpak. which wezterm returns nothing.

I suppose that's why it's not appearing.

What would be your suggestion to this? I guess the quickest workaround is to create a symlink wezterm somewhere in $PATH so that which wezterm can find it.

But maybe another solution?

igorzhilin avatar Dec 14 '23 23:12 igorzhilin

can you tell how one does run a command in this terminal from command line? I mean does the flatpak have a cli like flatpak run org.wezfurlong.wezterm -x <any commandline>?

ManuelSchneid3r avatar Dec 20 '23 10:12 ManuelSchneid3r

Wait theres still the problem that it would not be detected correctly. Wouldnt it make sense for such terminals to install a bootstrapper shell script into /usr/local/bin? Something like

#!/usr/bin/env sh
# Filename: /usr/local/bin/wezterm
flatpak run org.wezfurlong.wezterm $@

ManuelSchneid3r avatar Dec 20 '23 10:12 ManuelSchneid3r

@igorzhilin i am not that familar with flatpak. Is it common practice to ship a bootstrapper script or a desktop file?

ManuelSchneid3r avatar Dec 29 '23 13:12 ManuelSchneid3r

was just fiddling with flatpak and found that it automatically does what i suggested. flatpak also modifies PATH. doesnt wezterm do it?

Bildschirmfoto vom 2024-04-23 21-46-30

ManuelSchneid3r avatar Apr 23 '24 19:04 ManuelSchneid3r

@igorzhilin I have not a linux box available atm, but I am working on putting the terminal functionality in a plugin. I think it is not that hard to cover flatpaks too. I mean we maintain a hard coded list anyway so we could simply use flatpak list to check for availability and add terms like "flatpak run org.wez….wezterm" to run. The thing I wonder now: is it even possible to run flatpak terminals like regular terminals using a commandline with parameters? i mean can we call things like "flatpak run org.foo.Bar -e my_fancy_commandline with_params"? Can you please check this quickly?

ManuelSchneid3r avatar May 11 '24 13:05 ManuelSchneid3r