LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-18-2007, 12:38 AM   #1
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221

Rep: Reputation: 24
How to get an motd (or equivalent) to users of gdm?


Hi -- My enthusiasm for Linux and computational physics has
lead me to start a small lab in which all the clients have
nfs-mounted the same server drive. This gives the student users
access to their data and configuration files no matter which
client in the lab they log into. I have some cute routines for
propagating password changes from the host to all the clients -- and they also propagate an motd file. I would like to make use of this motd. Problem is, most users login through gdm, so they
never see an motd.

I have two questions

1) Is there a facility for gdm comparable to motd?
(I see there is a "postlogin" feature)
http://www.gnome.org/projects/gdm/docs/gdmtalk.pdf

2) How can I distinguish whether user has launched a bash
shell on the local machine or is using ssh?

Even if users log in through GDM, many of them will eventually launch a terminal. I could edit the default .bashrc as follows:

Code:
if test -f /etc/motd
   then
   cat /etc/motd
fi
The problem is that if users login remotely via (ssh), they'll see the motd twice. This is not elegant. So I need to check whether they are using ssh or launching a local xterm. There are some posts about shopt, but I discovered that it did not do a good job
telling me whether a shell was remote or on the local machine.
I welcome suggestions.
 
Old 09-18-2007, 01:54 PM   #2
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
Bring up your GDM config

Code:
gdmsetup
Change Welcome message to custom and enter your text
and/or
Change Style to "Plain with face browser"
and Enable Logo image

Make a custom .png image file with your custom message in it and use this as your logo.
 
Old 09-19-2007, 12:14 AM   #3
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221

Original Poster
Rep: Reputation: 24
Thanks Doublejoon. I'm still soliciting ideas, as a
a plain old text file is a lot easier to edit than changing a .png file everytime you
want to change the log-on message.

I also have used the welcome message -- but it appears to only be good for
about 3-4 words.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GDM doesn't work: Authdir /usr/var/gdm does not exist jimhap Linux - Newbie 11 06-08-2007 04:22 PM
Users Locked Out, Gdm Gone Beserk,14 hours @ work. No Solution yet. fragmented_user Linux - Newbie 17 09-02-2005 06:07 AM
motd Master Fox Linux - Software 2 08-25-2004 07:40 AM
Is there any MOTD software available besides /etc/motd? csif Linux - Software 1 04-24-2004 06:36 AM
gdm overwrites /etc/gdm/Session/fluxbox _flaab_ Mandriva 0 12-21-2003 10:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration