WoozyMasta / dayz-ctl

Command Line Linux Launcher for DayZ Standalone with Fuzzy Finding
http://dayz-ctl.woozymasta.ru/
Apache License 2.0
34 stars 5 forks source link

Usage of Serverbrowser / Missing Error Message #13

Open JanzenJohn opened 1 year ago

JanzenJohn commented 1 year ago

cant launch directly into server on archlinux

using all-server > [SELECT SERVER] -> Play

the tool exits without doing anything, wether I'm ingame / outside of the game

there is no error message i get, am i misunderstanding the usage ?

Launching the game normaly via Launch Game works fine

WoozyMasta commented 1 year ago

Can you provide a debug log file or publish it in some pastebin

Run with debug:

exec 3>dayz-ctl.log
export BASH_XTRACEFD=3
bash -x dayz-ctl 

Show me the dayz-ctl.log and I'll try to help

JanzenJohn commented 1 year ago

yeah attached log here dayz-ctl.log

WoozyMasta commented 1 year ago

image

Okay, I see that this is a problem in the final loop before starting the game, and the script exit exactly in the options menu
This behavior is similar to not having a selected menu item, such as when pressing the ESC key

You can run this command and say the result

printf '%s\n' Play 'Add to favorites' 'Create Desktop Entry' | gum choose --no-limit; echo $?

For example, when I select Play, it returns

Play
0

and when selecting multiple items Play and Add to favorites, it returns

Play
Add to favorites
0
WoozyMasta commented 1 year ago

Or this example where we also test the menu selection operation from the case loop

while read -r option; do case $option in
  'Play') echo 'go go go';;
  *) echo 'wtf';;
esac; done < <(printf '%s\n' Play None | gum choose --no-limit)

Must be

And tell me what version of gum you use

gum --version
WoozyMasta commented 1 year ago

@JanzenJohn, this issue still relevant?

JanzenJohn commented 1 year ago

i think i have narrowed down the "error" using the

printf '%s\n' Play 'Add to favorites' 'Create Desktop Entry' | gum choose --no-limit; echo $?

example

i didn't know you needed to press spacebar, i navigated to the entry i wanted to select / use and hit enter

JanzenJohn commented 1 year ago

also sorry for the late reply, i somehow did not get any push messages until today

JanzenJohn commented 1 year ago

Could you maybe add a message / change the gum usage to not allow to "select nothing"

WoozyMasta commented 1 year ago

i didn't know you needed to press spacebar, i navigated to the entry i wanted to select / use and hit enter

@JanzenJohn, pressing Enter on the currently selected element selects it. At least that's what happens to me.

Can you tell me which terminal emulator and OS are you using?

JanzenJohn commented 1 year ago

@WoozyMasta I'm using Arch-Linux-6.2.11 Gum version 0.10.0 (0f0f8e9)

Happens in any terminal I tried so far

(TTY via SSH, kgx (gnome), and xterm)

But are you sure using --no-limit it still works for you with only enter on the current element and not using any other arguments?

WoozyMasta commented 1 year ago

It turns out that in the version of gum 0.10 the multi-selection was broken https://github.com/charmbracelet/gum/issues/339

WoozyMasta commented 1 year ago

Let's see what the author of gum will answer, if it is recognized that this is a mistake (I believe that it is), we will wait for the update, if not, then I will think about how to make it work for different versions .

In the meantime, you can rollback to any version 0.7-0.9 or press the space bar each time to select an element

@JanzenJohn, thanks for helping me find the problem