[GH-ISSUE #65] [BUG] <title>./launcher.sh: line 246: cd: SillyTavern: No such file or directory</title> #27

Open
opened 2026-10-15 18:06:19 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @LO7O7 on GitHub (Jul 31, 2024).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Launcher/issues/65

Environment

🐧 Linux

System

OS : EndeavourOS x86_64 ;; Kernel : Linux 6.10.2-arch1-1 ;; WM : Hyprland (Wayland)

Describe the problem

After doing sh ./launcher.sh and selecting 1) start silly tavern
1️⃣ Minor issue :- the menu reappears again but it doesn't throw any error
2️⃣ Major issue :- after selecting 1) start silly tavern it throws the error ./launcher.sh: line 246: cd: SillyTavern: No such file or directory while it should start the start_sh function to start the shell script. BTW manually starting the start.sh script allows ST to run just fine.

Additional info

image

Please tick the boxes

Originally created by @LO7O7 on GitHub (Jul 31, 2024). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Launcher/issues/65 ### Environment 🐧 Linux ### System OS : EndeavourOS x86_64 ;; Kernel : Linux 6.10.2-arch1-1 ;; WM : Hyprland (Wayland) ### Describe the problem After doing sh ./launcher.sh and selecting 1) start silly tavern :one: Minor issue :- the menu reappears again but it doesn't throw any error :two: Major issue :- after selecting 1) start silly tavern it throws the error _**./launcher.sh: line 246: cd: SillyTavern: No such file or directory**_ while it should start the start_sh function to start the shell script. BTW manually starting the start.sh script allows ST to run just fine. ### Additional info ![image](https://github.com/user-attachments/assets/804e40c1-15a0-40c6-be5d-e400b4f3bd89) ### Please tick the boxes - [X] I have explained the issue clearly, and I included all relevant info - [X] I have checked that this [issue hasn't already been raised](https://github.com/SillyTavern/SillyTavern/issues?q=is%3Aissue) - [X] I have checked the [docs](https://docs.sillytavern.app/) ![important](https://img.shields.io/badge/Important!-F6094E)
Author
Owner

@BruhDudeWew commented on GitHub (Oct 14, 2024):

So after running bash -x, I've found out where it failed:

  1. The find_terminal() function doesn't work. It just returned x-terminal-emulator which I (and maybe you too doesn't have). I just make the function to return "konsole" since that's what I used and it worked.
  2. When it failed to launch due to missing x-terminal-emulator and you got thrown back to menu, the shell is still in the SillyTavern folder. That's why when it tried to cd back into SillyTavern again, it can't because it's already there.

I hope this help

<!-- gh-comment-id:2411075416 --> @BruhDudeWew commented on GitHub (Oct 14, 2024): So after running bash -x, I've found out where it failed: 1. The find_terminal() function doesn't work. It just returned x-terminal-emulator which I (and maybe you too doesn't have). I just make the function to return "konsole" since that's what I used and it worked. 2. When it failed to launch due to missing x-terminal-emulator and you got thrown back to menu, the shell is still in the SillyTavern folder. That's why when it tried to cd back into SillyTavern again, it can't because it's already there. I hope this help
Author
Owner

@popcat19 commented on GitHub (Jan 4, 2025):

So after running bash -x, I've found out where it failed:

1. The find_terminal() function doesn't work. It just returned x-terminal-emulator which I (and maybe you too doesn't have). I just make the function to return "konsole" since that's what I used and it worked.

2. When it failed to launch due to missing x-terminal-emulator and you got thrown back to menu, the shell is still in the SillyTavern folder. That's why when it tried to cd back into SillyTavern again, it can't because it's already there.

I hope this help

So replacing x-terminal-emulator with any terminal (e.g. konsole, alacritty, kitty, etc) should temporarily fix the issue.

# Function to find a suitable terminal emulator
find_terminal()
{
    for term in "$TERM"
    do
        if command -v "$term" > /dev/null 2>&1; then
            echo "$term"
            return 0
        fi
    done
    for terminal in "$TERMINAL"
    do
        if command -v "$terminal" > /dev/null 2>&1; then
            echo "$terminal"
            return 0
        fi
    done
    # Return a default terminal if none is found
    echo "x-terminal-emulator" # <-- Replace `x-terminal-emulator` with your terminal emulator
    return 1
}

They should at least add an input field (e.g. 'What terminal would you like <program/cmd> to use? ') instead of x-terminal-emulator.

<!-- gh-comment-id:2570670920 --> @popcat19 commented on GitHub (Jan 4, 2025): > So after running bash -x, I've found out where it failed: > > 1. The find_terminal() function doesn't work. It just returned x-terminal-emulator which I (and maybe you too doesn't have). I just make the function to return "konsole" since that's what I used and it worked. > > 2. When it failed to launch due to missing x-terminal-emulator and you got thrown back to menu, the shell is still in the SillyTavern folder. That's why when it tried to cd back into SillyTavern again, it can't because it's already there. > > > I hope this help So replacing `x-terminal-emulator` with any terminal (e.g. konsole, alacritty, kitty, etc) should temporarily fix the issue. ``` # Function to find a suitable terminal emulator find_terminal() { for term in "$TERM" do if command -v "$term" > /dev/null 2>&1; then echo "$term" return 0 fi done for terminal in "$TERMINAL" do if command -v "$terminal" > /dev/null 2>&1; then echo "$terminal" return 0 fi done # Return a default terminal if none is found echo "x-terminal-emulator" # <-- Replace `x-terminal-emulator` with your terminal emulator return 1 } ``` They should at least add an input field (e.g. 'What terminal would you like <program/cmd> to use? <text-input>') instead of `x-terminal-emulator`.
Author
Owner

@deffcolony commented on GitHub (Feb 24, 2025):

launcher got a massive update which fixed most bugs so should now be fixed at github.com/SillyTavern/SillyTavern-Launcher@240badb9c9 (diff-070e0054c9)

please update the launcher and let me know if everything works stable

<!-- gh-comment-id:2678325354 --> @deffcolony commented on GitHub (Feb 24, 2025): launcher got a massive update which fixed most bugs so should now be fixed at https://github.com/SillyTavern/SillyTavern-Launcher/commit/240badb9c9083ba1606dc51a10aadd438ea6fd73#diff-070e0054c9dc9d591e46936a2a58e2d098882038c888c1122fa439c3800532b9 please update the launcher and let me know if everything works stable
Sign in to join this conversation.
No description provided.