# /etc/login.conf doesnot work



## sw2wolf (Jun 22, 2012)

```
#uname -a
FreeBSD mybsd.zsoft.com 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 01:47:53 UTC 2012     
root@i386-builder.daemonology.net:[FILE]/usr/obj/usr/src/sys/GENERIC[/FILE]  i386

#cat /etc/login.conf
...
[color="red"]chinese[/color]|Chinese Users Acconts:\
        :charset=UTF-8:\
        :lang=zh_CN.UTF-8:\
        :setenv=LC_ALL=zh_CN.UTF-8:\
        :setenv=LC_CTYPE=zh_CN.UTF-8:\
        :setenv=LC_COLLATE=zh_CN.UTF-8:\
        :setenv=LC_TIME=zh_CN.UTF-8:\
        :setenv=LC_NUMERIC=zh_CN.UTF-8:\
        :setenv=LC_MONETARY=zh_CN.UTF-8:\
        :setenv=LC_MESSAGES=zh_CN.UTF-8:\
        :setenv=XMODIFIERS="@im=fcitx":\
        :setenv=GTK_IM_MODULE=fcitx:\
        :setenv=QT_IM_MODULE=fcitx:\
        :tc=default:
...
#grep ^sw2wolf [FILE]/etc/master.passwd[/FILE]
sw2wolf:$1$nT.3fDYR$QICkAncat8yttt3Ldr0Qf.:1001:1001:[color="Red"]chinese[/color]:0:0:User &:/home/sw2wolf:/bin/csh
```

Of course, *I* have run [cmd=]cap_mkdb /etc/login.conf[/cmd] However, after loginning logging in, *I* still get:

```
>locale 
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
```

What's the problem?

Sincerely!


----------



## sw2wolf (Jun 22, 2012)

By googling, *I* found:

```
Since slim do not use login(1) to log your user in, everything set in
[FILE]/etc/login.conf[/FILE] won't be present on your session. If you did set some
settings they won't appear.

in the [FILE]/usr/local/etc/slim.conf[/FILE] you can see:

login_cmd           exec [FILE]/bin/sh[/FILE] - [FILE]~/.xinitrc[/FILE] %session

As described in the sh(1) manpage, the dash after the [FILE]/bin/sh[/FILE] should
be a login shell, but it does not work. I'm guessing if we can do some
hack to make the [FILE]/etc/login.conf[/FILE] used by slim.

Demelier David
```

So Slim cannot use /etc/login.conf?


----------



## FIlIPy65 (Jul 2, 2012)

It's not very elegant, but you can use the .xinitrc: http://www.edsel.nu/2010/06/04/slim-simple-login-manager-on-freebsd/
I'm doing it here right now. =|

Cheers.


----------



## sw2wolf (Jul 3, 2012)

FIlIPy65 said:
			
		

> It's not very elegant, but you can use the .xinitrc: http://www.edsel.nu/2010/06/04/slim-simple-login-manager-on-freebsd/
> I'm doing it here right now. =|
> Cheers.



Yes, I am using ~/.xinitrc.


----------



## zeissoctopus (Jul 6, 2012)

Check http://http://www.freshports.org/x11/slim/

slim had been patched with PAM support.


----------



## hexadecagram (Sep 9, 2013)

Apologies for the necropost, but I've built slim with PAM support (9.1-STABLE), restarted slim, and /etc/login.conf still isn't being read. Any thoughts?


```
% ldd /usr/local/bin/slim | grep pam
        libpam.so.5 => /usr/lib/libpam.so.5 (0x280df000)
% cat /usr/local/etc/pam.d/slim
auth            include         system
account         include         system
session         include         system
password        include         system
% locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
```


----------



## hexadecagram (Sep 10, 2013)

Also,


```
% ls -l /etc/login.conf*
-rw-r--r--  1 root  wheel   8324 Jun 13 04:02 /etc/login.conf
-rw-r--r--  1 root  wheel  36864 Sep  9 00:16 /etc/login.conf.db
```


----------

