How do I add locale to ubuntu server?

1
...
0 0
2
W

hat is a “locale” on a Linux operating system? How do I set or get locals (i18n) values on a Linux operating system?


Locales defines language and country specific setting for your programs and shell session. You can use locales to see date, time, number, currency and other values formatted as per your country or language on a Linux or Unix-like system. To set system’s locale you need use shell variable. For example, LANG variable can be used to set en_US (English US) language.

How do I show current locale settings on a Linux or Unix?

The syntax is:

Examples

Simply type the following command:
$ locale

Fig.01 Show current locale on a Linux or Unix

Display all available locales on your Linux or Unix-like system

Pass the -a option to locale command:
$ locale -a
Sample outputs:

C C.UTF-8 en_IN en_IN.utf8 POSIX

You also run the following command on a Debian or Ubuntu based system to see...

0 0
3

So I am running Spree e-commerce in Rails. When I click on 'place order' after I have added items to my cart and proceed to checkout i got this error. (same question as this person)

Errno::ECONNREFUSED in Spree::CheckoutController#update Connection refused - connect(2) for "localhost" port 25

I believe it has something to do with the email but I am not 100 percent sure. As for spree is defaulted to port 25 as referred to here

I checked my port using

telnet mydroplet'sIPaddress 25

and it said (as expected)

telnet: Unable to connect to remote host: Connection refused

I tried a solution to unblock my port 25 by adding the line below as suggested in another question here.

iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT

and recheck using the same method and still no good.

I even went to setup my firewall using ufw and made sure my port 25 is available by following this tutorial

sudo ufw allow 25/tcp

still no good...

PLEASE...

0 0
4

Ubuntu Server is like any Linux variety, and has full multi-user capabilities, and a common task on any server is adding users.

useradd

The useradd command will let you add a new user easily from the command line:

useradd

This command adds the user, but without any extra options your user won’t have a password or a home directory.

Note: if you get a message saying that the command is not found, try using the full path, like this:

/usr/sbin/useradd

You can use the -d option to set the home directory for the user. The -m option will force useradd to create the home directory. We’ll try creating a user account with those options, and then use the passwd command to set the password for the account. You can alternatively set a password using -p on the useradd command, but I prefer to set the password using passwd.

sudo useradd -d /home/testuser -m testuser

sudo passwd testuser

This will create the user named...

0 0
5
...
0 0
6

On Thu, Jul 13, 2006 at 01:17:15PM +0100, Adam Funk wrote:

> On 2006-07-13, Nik

[hidden email]

> wrote:

>

> > Can't you use:

> >

> > locale-gen

>

> I've tried that with partial success --- see below. Any idea why the

> other three don't work, or how to force them to work?

Adam,

This is what I successfully used, the one time I needed to restore an
ISO-8859-1 based locale. (My personal record of the problem is shown
below, at "Debug:".

localedef -i en_AU -f ISO-8859-1 en_AU

Note:
--help # Lists options not in the manpage, and:

System's directory for character maps : /usr/share/i18n/charmaps
repertoire maps: /usr/share/i18n/repertoiremaps
locale path : /usr/lib/locale:/usr/share/i18n

Also,
localedef --list-archive # Same as "locale -a", but omitting C & POSIX.
# Probably probes...

0 0
7

I told you already about how to install essential “things” on your Ubuntu server (also works on Debian) to build a live server to host your websites, forums or blogs. Those “things” I am talking about here are Nginx which is a world’s most popular web server , MySQL, PHP and Postfix. With those “things” installed, you are already having all necessary stuff and you can now put your website’s files and database in it. But wait, you will still need to know where your files should be located / stored in your server, how to make your website accessible, and also how to install fresh CMS script (eg; WordPress) on it.

Are you curious? Read on!!

p.s: When I say “server” it refers to both VPS or Dedicated one.

p.p.s: This guide will also answer your question about how to setup Nginx virtual hosts file to add new site in Ubuntu server.

Prerequisite

A server running either Ubuntu or Debian. In this example I use Ubuntu 12.04. You’ll need either Putty in...
0 0
8

I run Ubuntu 12.04, I can't set the locale to en_US.utf8. I set the LANG by configuring /etc/default/locale as described here.

$cat /etc/default/locale LANG=en_US.utf8 $locale LANG= LANGUAGE= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL=POSIX

But it doesn't work, as you can see above. How do I set this LANG variable to en_US.utf8?

The reason I am asking is, when I run echo -e "\x03\bb", I get a unicode greek letter lambda symbol displayed correctly, but my issue is with emacs. In the emacs, I can't display unicode symbols, eg: C-x 8 RET 03bb outputs \u03bb, instead of a greek letter lambda symbol. I thought the issue is with these locale settings, but I can't set them.

Edit: I think the problem is fixed.

$su $USER -c 'env; echo ==; locale' | egrep '==|LANG'...
0 0
9

There are literally thousands of Ubuntu programs available to meet the needs of Ubuntu users. Many of these programs are stored in software archives commonly referred to as repositories. Repositories make it easy to install new software, while also providing a high level of security, since the software is thoroughly tested and built specifically for each version of Ubuntu.

Ubuntu distinguishes between software that is "free" and software that is not free. For details of Ubuntu's Free Software Philosophy please see here.

The four main repositories are:

Main - Canonical-supported free and open-source software.

Universe - Community-maintained free and open-source software.

Restricted - Proprietary drivers for devices.

Multiverse - Software restricted by copyright or legal issues.

The Ubuntu Install CDs contain software from the "Main" and "Restricted" repositories, so if you have no internet connection you can still install...

0 0
10

Use Ubuntu language packs. All supported languages are available in default repositories:

apt-cache search language-pack

A full example of locale switching in Ubuntu (server) version:

jani@example:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

All available (i.e. already installed) locales can be listed with:

locale -a

My current locale is en_IE:

jani@example:~$ locale LANG=en_IE.UTF-8 LANGUAGE= LC_CTYPE="en_IE.UTF-8" LC_NUMERIC="en_IE.UTF-8" LC_TIME="en_IE.UTF-8" LC_COLLATE="en_IE.UTF-8" LC_MONETARY="en_IE.UTF-8" LC_MESSAGES=POSIX LC_PAPER="en_IE.UTF-8" LC_NAME="en_IE.UTF-8" LC_ADDRESS="en_IE.UTF-8" LC_TELEPHONE="en_IE.UTF-8" LC_MEASUREMENT="en_IE.UTF-8" LC_IDENTIFICATION="en_IE.UTF-8" LC_ALL= jani@example:~$ date Sat Nov 1 15:36:51 UTC 2014 jani@example:~$

Because I didn't have ru locales I have to install ru language pack:

jani@example:~$ sudo apt-get -y install...
0 0
11

Current accepted answer is not sufficient in the troubleshoot strategy because you can have an human error. You setup your system to en_US but you have en_GB enabled in/etc/locale.gen like I had in the thread here for Raspberry Pi 3b. You should have all your used locales enabled in /etc/locale.gen.

I had en_GB.UTF-8 UTF-8 only enabled in /etc/locale.gen. I should have there only enabled en_US.UTF-8 UTF-8 because of other commands run for it. So I commended GB and uncommented US, and everything work now

masi@raspberrypi:~ $ sudo vim /etc/locale.gen masi@raspberrypi:~ $ sudo locale-gen Generating locales (this might take a while)... en_US.UTF-8... done Generation complete. masi@raspberrypi:~ $ sudo a2enmod rewrite && a2enmod headers && a2enmod ssl Module rewrite already enabled Module headers already enabled Considering dependency setenvif for ssl: Module setenvif already enabled Considering dependency mime for ssl: Module mime already enabled Considering dependency...
0 0
12

I have a remote server which I installed and have been trying to unsuccessfully change the locale to french for a few hours. Below are the contents of my locale files:

//============ /etc/default/locale LANG="fr_FR.UTF-8" LANGUAGE="fr_FR.UTF-8" LC_CTYPE="fr_FR.UTF-8" LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL="fr_FR.UTF-8 //==================== /var/lib/locales/supported.d/local fr_FR.UTF-8 UTF-8 en_US.UTF-8 UTF-8 en_GB ISO-8859-1 en_GB.UTF-8 UTF-8 en_GB.ISO-8859-15 ISO-8859-15 fr_BE.UTF-8 UTF-8 fr_CA.UTF-8 UTF-8 fr_CH.UTF-8 UTF-8 fr_LU.UTF-8 UTF-8 fr_FR ISO-8859-1

Everything is still defaulting to english dates and the $ currency in my web app. Is there something else I'm overlooking? I should also mention that I have dpkg...

0 0
13

There are several methods to accomplished that, depending of what you really need to do.

In order to forward remote apps to local X environment, you need to install X11 on your Mac (you can find it at apple support site): http://support.apple.com/kb/DL1605?viewlocale=en_US&locale=en_US

From the X11 app, open the terminal, and then access the remote host with:

ssh -XC user@host

Then, when logged, simply run the command for the desired app, ex: firefox, nautilus, thunderbird, whatever...

You can even launch only the system (Ubuntu, Xubuntu, Mint, etc..) Main Menu, and interact with the remote system from there, without the need of a full graphical front-end. On a remote Linux Mint env, i simply run:

mintmenu&

If you really need it, you can even start the remote graphical environment locally at your Mac's X11, simply running:

ubuntu-session xubuntu-session etc... (depends of your remote environment)

Better than any VNC, even better...

0 0
14

Environment variables provide a way to influence the behaviour of software on the system. For example, the "LANG" environment variable determines the language in which software programs communicate with the user.

Environment variables consist of names that have values assigned to them. For example, on a typical system in the US we would have the value "en_US.UTF-8" assigned to the "LANG" variable.

The meaning of an environment variable and the format of its value are determined by the application using it. There are quite a few well-known environment variables for which the meaning and the format have been agreed upon and they are used by many applications.

While quite a few graphical system configuration applications actually manipulate environment variables in the background, the command-line allows for maximum flexibility when manipulating environment variables.

Note: The shell techniques explained in the following sections apply to the Bourne...

0 0
15

Installing a web server for a production environment, with Ubuntu as operating system, is not too difficult because most of the required packages don’t need a lot of configurations. In this tutorial we create a (power) user, we install Apache, PHP and MySQL, phpMyAdmin and several other services needed to run a powerful and secure web server.

Preparations
First you need a web server (VPS or a dedicated server). Try to get a cloud server, they are very powerful, redundant and flexible. Choose a Linux image like Ubuntu 10.04 LTS and validate that the SSH server is up and running. Don’t use an image where any web service is pre-installed.

Creating the “Admin” user

Login via SSH using root user account Create a new user with useradd -d /home/newuser -m newuser (-d points to the directory and -m will create the directory). Use passwd newuser to create a password for the user. Make the new user owner of the newly created user directory: chown newuser:newuser...
0 0