# Change login message using GNOME

**URL:** <https://forums.suse.com/t/change-login-message-using-gnome/28500>\
**Category:** SLES Configure-Administer\
**Created:** [August 4, 2016, 7:04pm UTC](https://forums.suse.com/t/change-login-message-using-gnome/28500 "2016-08-04T19:04:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stargazer89](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Stargazer89](https://forums.suse.com/u/Stargazer89)\
**Post date:** [August 4, 2016, 7:04pm UTC](https://forums.suse.com/t/change-login-message-using-gnome/28500/1 "2016-08-04T19:04:59Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Stargazer89](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Stargazer89](https://forums.suse.com/u/Stargazer89)\
**Post date:** [August 5, 2016, 5:19pm UTC](https://forums.suse.com/t/change-login-message-using-gnome/28500/2 "2016-08-05T17:19:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [August 5, 2016, 5:44pm UTC](https://forums.suse.com/t/change-login-message-using-gnome/28500/3 "2016-08-05T17:44:44Z")

</div>

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.
