waveterm icon indicating copy to clipboard operation
waveterm copied to clipboard

[Bug]: Setting locale issue

Open GenderlessThreat opened this issue 11 months ago • 4 comments

Current Behavior

defaults to "standard locale" aside from the fact that I have installed and run "US.UTF-8".

  • [ ] Only occurs in waveterm and does not occur in any of my other terminal applications
  • [ ] Occurs regardless of attempt to fix including having a script to launch waveterm (which ill list below).
  • [ ] I've also tried to add a similar fix such as the script below but exporting within the ~/.zshrc or ~/.bashrc

# Error Message:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US",
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

# Script ~/waveterm-launch.sh

#!/bin/bash
# Point LOCPATH to the system locale directory
export LOCPATH=/usr/lib/locale
# Use the locale that you have available (here we use the lowercase variant if that’s what your system lists)
export LANG=en_US.utf8
export LC_ALL=en_US.utf8
# Launch WaveTerm
exec /snap/bin/waveterm "$@"

Expected Behavior

run as normal

Steps To Reproduce

unsure why it is occurring. i typically run oh_my_zsh though if that could be causing the issue?

Wave Version

Client Version 0.11.0 (202501250008) Update Channel: latest

Platform

macOS

OS Version/Distribution

Linux Mint 21.2 x86_64

Architecture

arm64

Anything else?

No response

Questionnaire

  • [ ] I'm interested in fixing this myself but don't know where to start
  • [ ] I would like to fix and I have a solution
  • [ ] I don't have time to fix this right now, but maybe later

GenderlessThreat avatar Feb 05 '25 21:02 GenderlessThreat

I've tried playing around in waveterm some more and it looks like the issue only occurs when im using zsh shell. when im using bash this does not occur.

  • [ ] Not sure if this helps but here is my "nano ~/.zshrc"
# Enable Powerlevel10k instant prompt. Should stay close to t>
# Initialization code that may require console input (passwor>
# confirmations, etc.) must go above this block; everything e>
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt>
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt>
fi

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH

# Path to your Oh My Zsh installation.
export ZSH="$HOME/.oh-my-zsh"

cowsay -f ghostbusters 'Hello Compatriot' | lolcat

eval $(thefuck --alias)

alias AINSTALL='sudo apt-get install'
alias INSTALL='sudo apt install'
alias UPDATE='sudo apt update | lolcat'
alias UPGRADE='sudo apt upgrade | lolcat'
alias chm='chmod +x'




# Set name of the theme to load --- if set to "random", it wi>
# load a random theme each time Oh My Zsh is loaded, in which>
# to know which specific one was loaded, run: echo $RANDOM_TH>
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh >
# a theme from this variable instead of looking in $ZSH/theme>
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completi>
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive comp>
# Case-sensitive completion must be off. _ and - will be inte>
# HYPHEN_INSENSITIVE="true"

# Uncomment one of the following lines to change the auto-upd>
# zstyle ':omz:update' mode disabled  # disable automatic upd>
# zstyle ':omz:update' mode auto      # update automatically >
# zstyle ':omz:update' mode reminder  # just remind me to upd>

# Uncomment the following line to change how often to auto-up>
# zstyle ':omz:update' frequency 13

# Uncomment the following line if pasting URLs and other text>
# DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting termin>
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correct>
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst wai>
# You can also set it to another string to have that shown in>
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline promp>
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking>
# under VCS as dirty. This makes repository status check for >
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the comm>
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format s>
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custo>
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
plugins=(git zsh-autosuggestions)
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)




source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='nvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch $(uname -m)"

# Set personal aliases, overriding those provided by Oh My Zs>
# plugins, and themes. Aliases can be placed here, though Oh >
# users are encouraged to define aliases within a top-level f>
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
# - $ZSH_CUSTOM/aliases.zsh
# - $ZSH_CUSTOM/macos.zsh
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# To customize prompt, run `p10k configure` or edit ~/.p10k.z>
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export PATH="$HOME/.local/bin:$PATH"

GenderlessThreat avatar Feb 05 '25 21:02 GenderlessThreat

Same problem here,

I have the following error messages: when i run locale command: locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory warning: The LOCPATH variable is set to "/usr/lib/locale"

fixed by adding to ~/.zshrc: if [ "$WAVETERM" = "1" ]; then unset LOCPATH fi

when I open a new terminal this error show up: manpath: can't set the locale; make sure $LC_* and $LANG are correct

I tried to set vars in ~/.zshrc: export LANG=fr_FR.UTF-8 export LANGUAGE=fr_FR.UTF-8 export LC_ALL=fr_FR.UTF-8 export LC_CTYPE=fr_FR.UTF-8 export LC_MESSAGES=fr_FR.UTF-8

Didn't managed to fix this for now.

Thoses errors don't occur in terminator terminal or other terminal apps.

Wynferth avatar Jul 22 '25 09:07 Wynferth

Actually,

solution given here fixed all : https://github.com/wavetermdev/waveterm/issues/1963#issuecomment-2659287054

thanks !

Wynferth avatar Jul 22 '25 09:07 Wynferth

Faced with the same problem.

Actually,

solution given here fixed all : https://github.com/wavetermdev/waveterm/issues/1963#issuecomment-2659287054

thanks !

Unfortunately, this solution is not suitable for Fedora OS.

zdens avatar Sep 17 '25 07:09 zdens