zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
20.47k stars 637 forks source link

strange behavior when setting `[shell]` in Alacritty #3270

Closed burgessa23 closed 4 months ago

burgessa23 commented 4 months ago

2. Issues with the Zellij UI / behavior / crash

Issue description

Setting zellij as the default program in alacritty config yields differing results depending on how Alacritty is launched. I'm not sure if this is even an issue with zellij, but opening this for awareness

Minimal reproduction

This is quite strange, I'm not sure what the difference is between opening an app via its icon vs. via the open cli command

  1. in alacrity.toml set

    [shell]
    program = "zellij"
    args = ["-l", "welcome"]

    as per https://zellij.dev/tutorials/session-management/#setting-up-the-welcome-screen-to-open-on-terminal-startup

  2. launch alacritty by clicking the icon in finder

  3. notice alacritty fails to open

  4. open terminal

  5. launch alacritty via open command

  6. notice it opens as expected

Other relevant information

zellij 0.4.0

burgessa23 commented 4 months ago

Another interesting development... using a precmd hook in .zshrc that calls a function:

function zellij_autostart() {
    exec zellij -l welcome
}

works as expected.

TheKissOfDragon commented 4 months ago

my Alacritty can't launch agin,when i set the config as below later [shell] program = "zellij" args = ["-l", "welcome"]

imsnif commented 4 months ago

So - while I totally believe you, I am not reproducing this. Anything in the logs? Either Zellij or Alacritty? In linux the logs are in /tmp/zellij-log - I'm not sure offhand where they are in mac (it's a system setting)

imsnif commented 4 months ago

Some more guesses (though I could really use info either from the Zellij or the Alacritty logs):

  1. If you set the shell in alacritty to the absolute path of Zellij, does it work?
  2. Is Alacritty running from the same user as Zellij is installed as?
NyxAlexandra commented 4 months ago

I'd imagine the difference is due to not having zellij on path when running without your shell setting the env first

TheKissOfDragon commented 4 months ago

Thank you for the explanation. Regarding the specific absolute path of Zellij, it is working fine for me. That's great! I have encountered a small issue, which may or may not be a problem, as shown in the second picture.

image image
imsnif commented 4 months ago

That's not a problem - it's art. ;)

Glad it's sorted!

burgessa23 commented 4 months ago
  1. If you set the shell in alacritty to the absolute path of Zellij, does it work?

That was it, Thanks