0

I've install Ubuntu as web server without desktop mode. I'm also running website and I need to develop it with Thai language.

Question 1: If I login on server directly, how can i read/write Thai language (with default command in English)?

Question 2: If I ssh remote from my Mac, how can i read/write Thai language same (this question after i pass first question i may adjust by myself)?

Thank you all.

1 Answer 1

1

You can type Thai text quite normally inside programs and whatnot that are unicode compliant (for example, vi and nano).

However, the commands must still be run in English, as the system does not know what the translation of each command is to Thai. Note that you can usually pass arguments (like --name <name>) in Thai, but this depends on the application at hand.

In order to do this, you just need to set your keyboard layout to Thai format, and make sure your SSH client can forward and see the Thai letters and unicode symbols correctly. You can do this by setting your locale.

Edit your ~/.ssh/config (or whatever SSH config file you use) on your side of the link and add the below lines:

Host *
SendEnv LC_*

Restart your shell session, and be sure your local shell actually does support Thai.

9
  • 1
    Sorry Kaz, after i got your answer I try to open my file with vi and try to type Thai, but i don't know how to change keyboard language to thai. I means within text mode only because i don't have desktop mode, no gnome, no kde.
    – Thanasarut
    Sep 17, 2016 at 0:33
  • @Thanasarut That needs to be done on your side of the machine, so however you normally swap layouts. The tunnel doesn't honestly care what layout you're using in this case.
    – Kaz Wolfe
    Sep 17, 2016 at 0:35
  • Possibly helpful: askubuntu.com/questions/149876/… I think the language code is th
    – Elder Geek
    Sep 17, 2016 at 0:36
  • @KazWolfe if so... skip my first question... can you help me to answer the second question.... if I remote ssh from my mac in this way the application is my terminal on my mac, and surely i can configure my terminal to be able to read thai language, also on my mac i can switch to thai keyboard layout, how can the ssh terminal know that i typing the thai keyboard?
    – Thanasarut
    Sep 17, 2016 at 0:55
  • @Thanasarut Because SSH doesn't care about how you're typing. It will just forward whatever characters are typed into it. Your computer decides what is typed. The SSH tunnel just moves that over, without doing any sort of thinking.
    – Kaz Wolfe
    Sep 17, 2016 at 0:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .