Change login message using GNOME

Hi all,

I am receiving following message directly after successful login before being forwarded to the desktop (so I am still on the login screen before pressing the okay button): “System-wide number of failed logins: 0”. I would like to add the time of the last successful login to this message but unfortunately I cannot find its origin anywhere and hence cannot change it. Does anyone have an idea where I could find and adjust this login message?

I am using SLES9 and GNOME 2.4 (not my decission).

It would also be fine to introduce a second message which contains the last successful login. I tried to do this by creating the file ​/etc/xdg/autostart/welcome.desktop and filling it with the text but there was no effect. I can neither use xmessages nor zenity like suggested in another thread because they are not installed (e.g. no /etc/x11 directory) and I cannot add new packages.

I just need a message appearing after successful login to show me the last successful login and all failed logins since. In the console I have realised this already using pam and motd but I have problems doing the same in the graphical interface (GNOME).

Thanks a lot in advance!

Okay, I found the solution. The text field is specified inside:
/etc/X11/xdm/Xstartup

Thereby I changed the line
echo -e “$FAILLOG

System-wide number of failed logins: $FAILED_LOGINS” | $xmessage -default okay -center -file -

into
cat /etc/motd | $xmessage -default okay -center -file -

So the login messages I am already dynamically creating inside motd are displayed for GNOME as well.

The thread can be closed.

On 05/08/16 15:24, Stargazer89 wrote:
[color=blue]

Okay, I found the solution. The text field is specified inside:
/etc/X11/xdm/Xstartup

Thereby I changed the line
echo -e “$FAILLOG

System-wide number of failed logins:
$FAILED_LOGINS” | $xmessage -default okay -center -file -

into
cat /etc/motd | $xmessage -default okay -center -file -

So the login messages I am already dynamically creating inside motd are
displayed for GNOME as well.

The thread can be closed.[/color]

Thanks for taking the time to report back as the above may help someone
else.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.