# Problem with login.conf



## Markand (Jan 18, 2009)

Hi there

I'm running FreeBSD 7.1-STABLE on my computer, I tried to edit my login.conf to make french locales. This is what I did:


```
default:\
        :passwd_format=md5:\
        :copyright=/etc/COPYRIGHT:\
        :welcome=/etc/motd:\
        :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
        :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin ~/bin:\
        :nologin=/var/run/nologin:\
        :cputime=unlimited:\
        :datasize=unlimited:\
        :stacksize=unlimited:\
        :memorylocked=unlimited:\
        :memoryuse=unlimited:\
        :filesize=unlimited:\
        :coredumpsize=unlimited:\
        :openfiles=unlimited:\
        :maxproc=unlimited:\
        :sbsize=unlimited:\
        :vmemoryuse=unlimited:\
        :priority=0:\
        :ignoretime@:\
        :umask=022:
        :charset=iso-8859-15:\
        :lang=fr_FR.ISO8859-15:
        lang=fr_FR.ISO8859-15:\
        lc_all=fr_FR.ISO8859-15:\
        lc_collate=fr_FR.ISO8859-15:\
        lc_cty pe=fr_FR.ISO8859-15:\
        lc_messages=fr_FR.ISO8859-15:\
        lc_monetary=fr_FR.ISO8859-15:\
        lc_numeric=fr_FR.ISO8859-15:\
        lc_time=fr_FR.ISO8859-15:\
```

I launched cap_mkdb /etc/login.conf but there is still "C" locales.. Is there a mistake?


----------



## DutchDaemon (Jan 18, 2009)

I see some non-continued lines in there (missing the trailing \), like the umask and the lang=fr lines. Only the last line of that block doesn't need one.


----------



## Markand (Jan 18, 2009)

Thanks it solved my problem, but in fact the login.conf is only for tty login isn't it ? Because if I start a session by a *DM program such as (GDM or KDM) the locales are not set.


----------



## DutchDaemon (Jan 18, 2009)

Yes, login.conf is about logging into the system, not into X.


----------



## Markand (Jan 18, 2009)

Is there a way to set globally locales so ?


----------



## DutchDaemon (Jan 18, 2009)

I don't think so. X has its own localisation resource (non-BSD specific), and maybe different desktop and window managers have their own interpretations as well.


----------



## Markand (Jan 18, 2009)

Can we use login.conf for *DM ?


----------



## kamikaze (Jan 27, 2009)

XDM runs as a terminal session and thus obeys the login.conf settings. If you start your DM from /etc/ttys, it should work.


----------



## DutchDaemon (Jan 27, 2009)

XDM is a login manager, so it is possible that it applies login.conf settings; however, the resulting X session doesn't inherit these locale settings, I think.


----------



## SirDice (Jan 27, 2009)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/l10n.html


----------



## kamikaze (Feb 2, 2009)

DutchDaemon said:
			
		

> XDM is a login manager, so it is possible that it applies login.conf settings; however, the resulting X session doesn't inherit these locale settings, I think.


It does. Login.conf settings apply everywhere. Of course with such a broken login.conf it's no wonder things don't work.

The following lines are obsolete:
	
	



```
lang=fr_FR.ISO8859-15:\
        lc_all=fr_FR.ISO8859-15:\
        lc_collate=fr_FR.ISO8859-15:\
        lc_cty pe=fr_FR.ISO8859-15:\
        lc_messages=fr_FR.ISO8859-15:\
        lc_monetary=fr_FR.ISO8859-15:\
        lc_numeric=fr_FR.ISO8859-15:\
        lc_time=fr_FR.ISO8859-15:\
```

And of course there's the trailing \ missing in the umask line as mentioned by DutchDaemon.

I use login.conf to set my locale and it works perfectly fine in X.


----------



## Markand (Feb 5, 2009)

SirDice said:
			
		

> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/l10n.html



It's what I read, I will try with /etc/ttys thanks


----------



## Brandybuck (Feb 28, 2009)

delete


----------

