changing login prompt / login screen

ok, i’ve edited the /etc/issue file to display what i want but how can i get it to clear the screen every time it’s called (i.e. when a user logs out or when the system comes up)?

also, how do i edit the following:

systemname login:

so that system name is NOT displayed and that login and password are different colors. is this possible?

I don’t think you can hide the host name… and what sense would it make? You can read the man pages for login and login.defs but there isn’t such an option. Some telnet servers will hide the host name if login is executed with the option -H but this won’t help you here.

To change the color of both ‘login:’ and ‘password:’, you can write an escape sequence in /etc/issue and another one in /etc/motd (to change the color after login) … but you can’t have login and password in different colors unless the login programm itself provides this option. I wouldn’t use escape sequences in these files though if people connect to this server remotely from many different terminals. It shouldn’t be a problem but it’s not worth the risk to get a garbaged prompt, IMHO.

So I would have to use an escape sequence in /etc/issue to clear the screen?

Put a “clear” command in each user’s $HOME/.bash_logout.

No. That would be to change the color of the displayed text., something like:

Welcome to openSUSE 11.4 "Celadon" - Kernel \r (\l).

would display the text which follows (login:, password[noparse]:)[/noparse] in bright green - which suits to openSUSE. But “^” has to be the escape character, not a caret and a square bracket. I used them here because posting escape sequences in the forum doesn’t work.


if you use kdm as your login manager, you should try editing the file


as root.

That will, I believe, give you quite some control over how items are displayed.



On 2011-09-22 04:26, proteanthread wrote:
> So I would have to use an escape sequence in /etc/issue to clear the
> screen?

No, it’s done elsewhere. Notice that tty2…6 clears the screen after
logout, but not tt1, so start looking at inittab. That was asked not long
ago around here, but I don’t remember the exact file/place.

Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)