How to type a right to left language in terminal?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
8
down vote

favorite












I have installed Debian recently (without a GUI) to learn the CLI and C using the LearnCodeTheHardWay tutorials. Its going well, and I feel at this stage I do not need any GUI.



However, one thing I might need is to view, and edit in a right to left language, specifically Arabic using say... nano. Or with sqlite. Is that possible?



EDIT:
VIM or EMACS will be fine also. I do not mind the text editor. Also I would like to do this without install X, or any GUI stuff of any sort.



EDIT:
By Terminal what I understand is the black window with the $ symbol, which is what you get with the default Debian install. Its using Bash, and I use SSH to remote into it.










share|improve this question



















  • 1




    The nano editor is by definition minimalistic so I would be really surprised if you could configure it this way. The only editors I'm aware of that can display and edit text from right to left are emacs and vim.
    – jimmij
    Nov 13 '14 at 22:44










  • By “terminal”, do you mean the Linux console (i.e. outside X)? I don't think it supports right-to-left. It's an interface to repair the system, not for doing regular work. An editor such as Vim or Emacs should be able to cope, but the available Arabic fonts may be limited. X has advantages even if you only use it to run terminal emulators — and even Vim and Emacs are more comfortable in their own X window.
    – Gilles
    Nov 13 '14 at 23:52











  • @Gilles any kind of support, even limited would be good. I am a windows user, so all I do is add a new keyboard (AR) and away I go typing... what would be the steps in debian do at least type an arabic character in vim or emacs?
    – sprocket12
    Nov 14 '14 at 9:06










  • @Gilles whatever gave you the idea that the console is not for doing regular work?
    – Wouter Verhelst
    Mar 22 '17 at 7:23














up vote
8
down vote

favorite












I have installed Debian recently (without a GUI) to learn the CLI and C using the LearnCodeTheHardWay tutorials. Its going well, and I feel at this stage I do not need any GUI.



However, one thing I might need is to view, and edit in a right to left language, specifically Arabic using say... nano. Or with sqlite. Is that possible?



EDIT:
VIM or EMACS will be fine also. I do not mind the text editor. Also I would like to do this without install X, or any GUI stuff of any sort.



EDIT:
By Terminal what I understand is the black window with the $ symbol, which is what you get with the default Debian install. Its using Bash, and I use SSH to remote into it.










share|improve this question



















  • 1




    The nano editor is by definition minimalistic so I would be really surprised if you could configure it this way. The only editors I'm aware of that can display and edit text from right to left are emacs and vim.
    – jimmij
    Nov 13 '14 at 22:44










  • By “terminal”, do you mean the Linux console (i.e. outside X)? I don't think it supports right-to-left. It's an interface to repair the system, not for doing regular work. An editor such as Vim or Emacs should be able to cope, but the available Arabic fonts may be limited. X has advantages even if you only use it to run terminal emulators — and even Vim and Emacs are more comfortable in their own X window.
    – Gilles
    Nov 13 '14 at 23:52











  • @Gilles any kind of support, even limited would be good. I am a windows user, so all I do is add a new keyboard (AR) and away I go typing... what would be the steps in debian do at least type an arabic character in vim or emacs?
    – sprocket12
    Nov 14 '14 at 9:06










  • @Gilles whatever gave you the idea that the console is not for doing regular work?
    – Wouter Verhelst
    Mar 22 '17 at 7:23












up vote
8
down vote

favorite









up vote
8
down vote

favorite











I have installed Debian recently (without a GUI) to learn the CLI and C using the LearnCodeTheHardWay tutorials. Its going well, and I feel at this stage I do not need any GUI.



However, one thing I might need is to view, and edit in a right to left language, specifically Arabic using say... nano. Or with sqlite. Is that possible?



EDIT:
VIM or EMACS will be fine also. I do not mind the text editor. Also I would like to do this without install X, or any GUI stuff of any sort.



EDIT:
By Terminal what I understand is the black window with the $ symbol, which is what you get with the default Debian install. Its using Bash, and I use SSH to remote into it.










share|improve this question















I have installed Debian recently (without a GUI) to learn the CLI and C using the LearnCodeTheHardWay tutorials. Its going well, and I feel at this stage I do not need any GUI.



However, one thing I might need is to view, and edit in a right to left language, specifically Arabic using say... nano. Or with sqlite. Is that possible?



EDIT:
VIM or EMACS will be fine also. I do not mind the text editor. Also I would like to do this without install X, or any GUI stuff of any sort.



EDIT:
By Terminal what I understand is the black window with the $ symbol, which is what you get with the default Debian install. Its using Bash, and I use SSH to remote into it.







debian command-line nano right-to-left






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 7 at 23:45









Rui F Ribeiro

38.7k1479128




38.7k1479128










asked Nov 13 '14 at 22:12









sprocket12

1891111




1891111







  • 1




    The nano editor is by definition minimalistic so I would be really surprised if you could configure it this way. The only editors I'm aware of that can display and edit text from right to left are emacs and vim.
    – jimmij
    Nov 13 '14 at 22:44










  • By “terminal”, do you mean the Linux console (i.e. outside X)? I don't think it supports right-to-left. It's an interface to repair the system, not for doing regular work. An editor such as Vim or Emacs should be able to cope, but the available Arabic fonts may be limited. X has advantages even if you only use it to run terminal emulators — and even Vim and Emacs are more comfortable in their own X window.
    – Gilles
    Nov 13 '14 at 23:52











  • @Gilles any kind of support, even limited would be good. I am a windows user, so all I do is add a new keyboard (AR) and away I go typing... what would be the steps in debian do at least type an arabic character in vim or emacs?
    – sprocket12
    Nov 14 '14 at 9:06










  • @Gilles whatever gave you the idea that the console is not for doing regular work?
    – Wouter Verhelst
    Mar 22 '17 at 7:23












  • 1




    The nano editor is by definition minimalistic so I would be really surprised if you could configure it this way. The only editors I'm aware of that can display and edit text from right to left are emacs and vim.
    – jimmij
    Nov 13 '14 at 22:44










  • By “terminal”, do you mean the Linux console (i.e. outside X)? I don't think it supports right-to-left. It's an interface to repair the system, not for doing regular work. An editor such as Vim or Emacs should be able to cope, but the available Arabic fonts may be limited. X has advantages even if you only use it to run terminal emulators — and even Vim and Emacs are more comfortable in their own X window.
    – Gilles
    Nov 13 '14 at 23:52











  • @Gilles any kind of support, even limited would be good. I am a windows user, so all I do is add a new keyboard (AR) and away I go typing... what would be the steps in debian do at least type an arabic character in vim or emacs?
    – sprocket12
    Nov 14 '14 at 9:06










  • @Gilles whatever gave you the idea that the console is not for doing regular work?
    – Wouter Verhelst
    Mar 22 '17 at 7:23







1




1




The nano editor is by definition minimalistic so I would be really surprised if you could configure it this way. The only editors I'm aware of that can display and edit text from right to left are emacs and vim.
– jimmij
Nov 13 '14 at 22:44




The nano editor is by definition minimalistic so I would be really surprised if you could configure it this way. The only editors I'm aware of that can display and edit text from right to left are emacs and vim.
– jimmij
Nov 13 '14 at 22:44












By “terminal”, do you mean the Linux console (i.e. outside X)? I don't think it supports right-to-left. It's an interface to repair the system, not for doing regular work. An editor such as Vim or Emacs should be able to cope, but the available Arabic fonts may be limited. X has advantages even if you only use it to run terminal emulators — and even Vim and Emacs are more comfortable in their own X window.
– Gilles
Nov 13 '14 at 23:52





By “terminal”, do you mean the Linux console (i.e. outside X)? I don't think it supports right-to-left. It's an interface to repair the system, not for doing regular work. An editor such as Vim or Emacs should be able to cope, but the available Arabic fonts may be limited. X has advantages even if you only use it to run terminal emulators — and even Vim and Emacs are more comfortable in their own X window.
– Gilles
Nov 13 '14 at 23:52













@Gilles any kind of support, even limited would be good. I am a windows user, so all I do is add a new keyboard (AR) and away I go typing... what would be the steps in debian do at least type an arabic character in vim or emacs?
– sprocket12
Nov 14 '14 at 9:06




@Gilles any kind of support, even limited would be good. I am a windows user, so all I do is add a new keyboard (AR) and away I go typing... what would be the steps in debian do at least type an arabic character in vim or emacs?
– sprocket12
Nov 14 '14 at 9:06












@Gilles whatever gave you the idea that the console is not for doing regular work?
– Wouter Verhelst
Mar 22 '17 at 7:23




@Gilles whatever gave you the idea that the console is not for doing regular work?
– Wouter Verhelst
Mar 22 '17 at 7:23










2 Answers
2






active

oldest

votes

















up vote
1
down vote













see comparison of text editors , do an intersection between "right-to-left and bidirectional text" and "text shell integration" .




:set lefttoright


for vim . see documentation and this question .



--



emacs generally can autodetect language and do the corresponding layout , on a per paragraph basis . see documentation .






share|improve this answer
















  • 1




    this won't fix right to left support through ssh. also @لَا إِلٰهَ إِلَّا الله is clearly asking for character support, and not switching the cursor to the right.
    – moubarak
    Feb 26 '15 at 2:38

















up vote
0
down vote













This worked for me on Ubuntu



sudo apt-get install language-pack-en-base
sudo apt-get install language-pack-ar-base
sudo locale-gen en
sudo locale-gen ar


Then edit (i used vim) /etc/default/locale or /etc/environment to contain just the following



LC_ALL=en_US.UTF-8 
LANG=en_US.UTF-8


Finally



sudo dpkg-reconfigure locales


These steps will give you arabic over an ssh terminal.






share|improve this answer






















  • you don't say what editor programme you use .
    – 把友情留在无盐
    Feb 26 '15 at 1:41










  • updated the answer
    – moubarak
    Feb 26 '15 at 1:44










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f167856%2fhow-to-type-a-right-to-left-language-in-terminal%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













see comparison of text editors , do an intersection between "right-to-left and bidirectional text" and "text shell integration" .




:set lefttoright


for vim . see documentation and this question .



--



emacs generally can autodetect language and do the corresponding layout , on a per paragraph basis . see documentation .






share|improve this answer
















  • 1




    this won't fix right to left support through ssh. also @لَا إِلٰهَ إِلَّا الله is clearly asking for character support, and not switching the cursor to the right.
    – moubarak
    Feb 26 '15 at 2:38














up vote
1
down vote













see comparison of text editors , do an intersection between "right-to-left and bidirectional text" and "text shell integration" .




:set lefttoright


for vim . see documentation and this question .



--



emacs generally can autodetect language and do the corresponding layout , on a per paragraph basis . see documentation .






share|improve this answer
















  • 1




    this won't fix right to left support through ssh. also @لَا إِلٰهَ إِلَّا الله is clearly asking for character support, and not switching the cursor to the right.
    – moubarak
    Feb 26 '15 at 2:38












up vote
1
down vote










up vote
1
down vote









see comparison of text editors , do an intersection between "right-to-left and bidirectional text" and "text shell integration" .




:set lefttoright


for vim . see documentation and this question .



--



emacs generally can autodetect language and do the corresponding layout , on a per paragraph basis . see documentation .






share|improve this answer












see comparison of text editors , do an intersection between "right-to-left and bidirectional text" and "text shell integration" .




:set lefttoright


for vim . see documentation and this question .



--



emacs generally can autodetect language and do the corresponding layout , on a per paragraph basis . see documentation .







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 26 '15 at 1:56









把友情留在无盐

530310




530310







  • 1




    this won't fix right to left support through ssh. also @لَا إِلٰهَ إِلَّا الله is clearly asking for character support, and not switching the cursor to the right.
    – moubarak
    Feb 26 '15 at 2:38












  • 1




    this won't fix right to left support through ssh. also @لَا إِلٰهَ إِلَّا الله is clearly asking for character support, and not switching the cursor to the right.
    – moubarak
    Feb 26 '15 at 2:38







1




1




this won't fix right to left support through ssh. also @لَا إِلٰهَ إِلَّا الله is clearly asking for character support, and not switching the cursor to the right.
– moubarak
Feb 26 '15 at 2:38




this won't fix right to left support through ssh. also @لَا إِلٰهَ إِلَّا الله is clearly asking for character support, and not switching the cursor to the right.
– moubarak
Feb 26 '15 at 2:38












up vote
0
down vote













This worked for me on Ubuntu



sudo apt-get install language-pack-en-base
sudo apt-get install language-pack-ar-base
sudo locale-gen en
sudo locale-gen ar


Then edit (i used vim) /etc/default/locale or /etc/environment to contain just the following



LC_ALL=en_US.UTF-8 
LANG=en_US.UTF-8


Finally



sudo dpkg-reconfigure locales


These steps will give you arabic over an ssh terminal.






share|improve this answer






















  • you don't say what editor programme you use .
    – 把友情留在无盐
    Feb 26 '15 at 1:41










  • updated the answer
    – moubarak
    Feb 26 '15 at 1:44














up vote
0
down vote













This worked for me on Ubuntu



sudo apt-get install language-pack-en-base
sudo apt-get install language-pack-ar-base
sudo locale-gen en
sudo locale-gen ar


Then edit (i used vim) /etc/default/locale or /etc/environment to contain just the following



LC_ALL=en_US.UTF-8 
LANG=en_US.UTF-8


Finally



sudo dpkg-reconfigure locales


These steps will give you arabic over an ssh terminal.






share|improve this answer






















  • you don't say what editor programme you use .
    – 把友情留在无盐
    Feb 26 '15 at 1:41










  • updated the answer
    – moubarak
    Feb 26 '15 at 1:44












up vote
0
down vote










up vote
0
down vote









This worked for me on Ubuntu



sudo apt-get install language-pack-en-base
sudo apt-get install language-pack-ar-base
sudo locale-gen en
sudo locale-gen ar


Then edit (i used vim) /etc/default/locale or /etc/environment to contain just the following



LC_ALL=en_US.UTF-8 
LANG=en_US.UTF-8


Finally



sudo dpkg-reconfigure locales


These steps will give you arabic over an ssh terminal.






share|improve this answer














This worked for me on Ubuntu



sudo apt-get install language-pack-en-base
sudo apt-get install language-pack-ar-base
sudo locale-gen en
sudo locale-gen ar


Then edit (i used vim) /etc/default/locale or /etc/environment to contain just the following



LC_ALL=en_US.UTF-8 
LANG=en_US.UTF-8


Finally



sudo dpkg-reconfigure locales


These steps will give you arabic over an ssh terminal.







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 26 '15 at 22:27

























answered Feb 26 '15 at 1:36









moubarak

1093




1093











  • you don't say what editor programme you use .
    – 把友情留在无盐
    Feb 26 '15 at 1:41










  • updated the answer
    – moubarak
    Feb 26 '15 at 1:44
















  • you don't say what editor programme you use .
    – 把友情留在无盐
    Feb 26 '15 at 1:41










  • updated the answer
    – moubarak
    Feb 26 '15 at 1:44















you don't say what editor programme you use .
– 把友情留在无盐
Feb 26 '15 at 1:41




you don't say what editor programme you use .
– 把友情留在无盐
Feb 26 '15 at 1:41












updated the answer
– moubarak
Feb 26 '15 at 1:44




updated the answer
– moubarak
Feb 26 '15 at 1:44

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f167856%2fhow-to-type-a-right-to-left-language-in-terminal%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

Peggy Mitchell

The Forum (Inglewood, California)

Palaiologos