Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    2.3.3-RELEASE tmux locale problem

    Scheduled Pinned Locked Moved General pfSense Questions
    9 Posts 5 Posters 3.8k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      l3lu3
      last edited by

      I've been running tmux on pfsense over ssh for years now and had zero issue with it. After my upgrade to 2.3.3-RELEASE, it's spitting out:

      tmux: need UTF-8 locale (LC_CTYPE) but have US-ASCII
      

      I referenced this topic :https://forum.pfsense.org/index.php?topic=124487.0, with no solution. I've edited /etc/profile , ~/.profile , ~/.login_conf with settings that should work. I was able to set LANG to en_US.UTF-8 but then complains:

      tmux: invalid LC_ALL, LC_CTYPE or LANG
      

      I noticed that /usr/share/locale/en_US.UTF-8 was empty, populated it with files from a working fbsd box. No dice. I'm getting ready to spin up a 2.3.2 vm and compare, just hoping to get some guidance as well. I'm surely not the only one with this issue, and since it is in the official repo now, it'd be great to get a little help :) Thanks in advance

      1 Reply Last reply Reply Quote 0
      • L Offline
        l3lu3
        last edited by

        Bump. I'm still coming up with nothing. Anyone got any ideas?

        1 Reply Last reply Reply Quote 0
        • L Offline
          l3lu3
          last edited by

          I'm still coming up with zilch. I saw the recent update and crossed my fingers this was magically fixed, but nope. Anyone have any ideas? I've tried setting every usual fbsd option, even populated the corresponding locale dirs, but tmux still complains. There's also a reddit post about this as well, with no answers. It'd be great if a dev could speak up and offer some guidance on what has changed. There's zero point in having the package available if it's unusable :) Any help is greatly appreciated!

          1 Reply Last reply Reply Quote 0
          • jimpJ Offline
            jimp Rebel Alliance Developer Netgate
            last edited by

            What version of pfSense were you running before the upgrade?

            And what version of tmux?

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • jimpJ Offline
              jimp Rebel Alliance Developer Netgate
              last edited by

              Looks like it's actually from the latest version of tmux not liking that we don't ship with the locale files at the moment.

              If you grab the UTF-8 locale files from a FreeBSD box of the same vintage, it works. For example, if you grab http://atxfiles.pfsense.org/jimp/fbsd-10.3-en_US.UTF-8.tgz and then decompress it in /usr/share/locale/en_US.UTF-8 then tmux runs.

              Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • I Offline
                ioiioi
                last edited by

                just in case if someone need, I found that mosh need utf-8 too, when I use mobaxterm on windows to access pfsense with mosh. it pop up error message: the client's charset is zh_CN.UTF-8, but pfsense absense. so I have to find zh_CN.UTF-8 of freebsd 10.3 and put it on to /usr/share/locale/zh_CN.UTF-8.

                the trick is all locale are located on freebsd's base.txz.

                here is a link: http://ftp.jaist.ac.jp/pub/FreeBSD/releases/i386/i386/10.3-RELEASE/base.txz

                1 Reply Last reply Reply Quote 0
                • L Offline
                  l3lu3
                  last edited by

                  @jimp:

                  Looks like it's actually from the latest version of tmux not liking that we don't ship with the locale files at the moment.

                  If you grab the UTF-8 locale files from a FreeBSD box of the same vintage, it works. For example, if you grab http://atxfiles.pfsense.org/jimp/fbsd-10.3-en_US.UTF-8.tgz and then decompress it in /usr/share/locale/en_US.UTF-8 then tmux runs.

                  You nailed it Jim! I didn't think there would be a difference in locale files between 10.3 and 11. Now I know :) Much appreciated again. Glad to know I had the right idea, just the wrong set of files.

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mike3606
                    last edited by

                    I know this is an old thread, but in case anyone had trouble after attempting to utilize the en_US.UTF-8 files at the links referenced within some of the answers I wanted to share what I did in order to get tmux up and running.

                    Environemnt:

                    PFSense box

                    uname -a
                    FreeBSD [FQDN-REMOVED] 11.2-RELEASE-p10 FreeBSD 11.2-RELEASE-p10 #12 10fea60fdde(factory-RELENG_2_4_4): Thu May 16 06:02:25 EDT 2019     root@buildbot1-nyi.netgate.com:/build/factory-crossbuild-244/obj/armv6/tDULKC6G/arm.armv6/build/factory-crossbuild-244/pfSense/tmp/FreeBSD-src/sys/pfSense-SG-3100  arm
                    

                    Windows 10 host w/vagrant

                    vagrant -v 
                    Vagrant 2.2.4     # w/ freebsd/FreeBSD-12.0-CURRENT box & vmware_desktop provider (The provider should not make any difference as well as the host.)
                    

                    Check to see if tmux is not working for you:

                    1. Ensure tmux is installed on the pfsense system
                    pkg install tmux
                    
                    1. Check the version (versions shouldn't be affected however for reference in the future this is the version I was working with.)
                    tmux -V
                    tmux 2.7
                    
                    1. Attempt to run tmux
                    tmux
                    
                    tmux: need UTF-8 locale (LC_CTYPE) but have US-ASCII OR 
                    tmux: invalid LC_ALL, LC_CTYPE or LANG
                    
                    1. Check your locale
                    locale
                    
                    LANG=""
                    LC_CTYPE="C"
                    LC_COLLATE="C"
                    LC_TIME="C"
                    LC_NUMERIC="C"
                    LC_MONETARY="C"
                    LC_MESSAGES="C"
                    LC_ALL=
                    
                    1. Check to see if /usr/share/locale/en_US.UTF-8/* has any files
                    ls /usr/share/locale/en_US.UTF-8
                    

                    <Empty>

                    If the steps above displayed similar results AND THE LC_* information doesn't report en_US.UTF-8 then this will likely mean tmux cannot run and the steps below may help you get tmux up and running.

                    Steps I took to fix my tmux install:

                    1. edit /etc/login.conf with the default profile to reflect the following attributes for lang & setenv.
                    /etc/login.conf
                    -- SNIPPED --
                    default:\                                                                                                                                                                                                                                                                                                                                                              
                            :passwd_format=sha512:\                                                                                                                                                                                                                                                                                                                                        
                            :copyright=/etc/COPYRIGHT:\                                                                                                                                                                                                                                                                                                                                    
                            :welcome=/etc/motd:\                                                                                                                                                                                                                                                                                                                                           
                            :lang=en_US.UTF-8:\                                                                                                                                                                                                                                                                                                                                            
                            :setenv=LC_ALL=en_US.UTF-8,LC_COLLATE=en_US.UTF-8,LC_CTYPE=en_US.UTF-8,LC_MESSAGES=en_US.UTF-8,LC_MONETARY=en_US.UTF-8,LC_NUMERIC=en_US.UTF-8,LC_TIME=en_US.UTF-8,MAIL=/var/mail/$,BLOCKSIZE=K:\ 
                    -- SNIPPED -- 
                    
                    1. run cap_mkdb (see ref #3)
                    cap_mkdb /etc/login.conf
                    
                    1. Ensure you have vagrant some sort of VM provider to install a fresh version for FreeBSD.
                    vagrant init freebsd/FreeBSD-12.0-CURRENT
                    vagrant up
                    vagrant ssh
                    
                    1. From inside the FreeBSD 12 vm provided by vagrant scp your files over to your pfsense box
                    scp /usr/share/locale/en_US.UTF-8/* root@<pfsense_ip>:/usr/share/locale/en_US.UTF-8/
                    
                    1. SSH into the pfsesne box and reboot the box for good measure and to ensure the login conf has been applied
                    ssh root@<pfsense_ip>
                    reboot
                    
                    1. Run tmux again and profit
                    tmux
                    

                    References:

                    1. https://www.reddit.com/r/PFSENSE/comments/5xh00z/tmux_need_utf8_locale/
                    2. https://forum.netgate.com/topic/112049/2-3-3-release-tmux-locale-problem/7
                    3. https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/using-localization.html
                    D 1 Reply Last reply Reply Quote 1
                    • D Offline
                      daplumber @mike3606
                      last edited by

                      Just a quick note that I'm using 2.5.2-RELEASE which is FreeBSD 12.2

                      In order too get tux and mosh to work I had to copy both en_US.UTF-8 and C.UTF-8 from the 12.2 base into /usr/share/locale since LC_CTYPE is a link.

                      โ€“--------
                      This user has been carbon dated to the 8-bit era...

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.