Solved

You have mail Wav.

Posted on 1998-01-14
10
300 Views
Last Modified: 2008-02-01
I would like to setup a "You have Mail" wav file so when a user logs into the server and if they have mail it will play the wav over their speakers. Or put a window up on their system. Which ever way would be easier.

Is there an easy way to do this.

Thanks
Bob Ross
0
Comment
Question by:bross073097
  • 6
  • 4
10 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 1635379
in /etc/.profile:

if [ -s /var/spool/mail/$user ] ; then
   echo You have mail.
   your_wv_playing_program your.wav
fi

Similar in /etc/csh.login, or whatever your user shell's startup file is.
0
 

Author Comment

by:bross073097
ID: 1635380
They log in with PAP, I'm not sure which login shell is used.

I will try the above and let you know.

Thanks for the quick response.

Bob Ross

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1635381
login shell is specified in /etc/passwd
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:bross073097
ID: 1635382
It's not mentioned there, it is in mgetty.config, it shows bin/login

Thanks
Bob Ross

0
 

Author Comment

by:bross073097
ID: 1635383
You mention your_wv_playing_program.

I'm not sure what to put here. In an html, I just tell it to play a wave and it does. This will play on the user end after they get connected if it does.

Thanks
Bob

0
 

Author Comment

by:bross073097
ID: 1635384
mgetty uses it's own login, I found login.c. My system is set for AutoPPP, the password file does not give a shell unless I give a shell account /bin/bash, all other users get /dev/null so they can't log in at the prompt.

I can send it to you if you want.

Thanks
Bob Ross
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1635385
Send it (email), it's nice to see other/new configurations :-)

You may find  your_wv_playing_program  in your servers mime.types configuration file.
Or search with:
  find / -xdev -perm +x -name '*wav*' -print

Ciao
Achim   hoagascht@gmx.net
0
 

Author Comment

by:bross073097
ID: 1635386
The mime.types show

audio/x-wav            wav

That's it.

Bob

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1635387
mime.types was useless, sorry.

On my system the programs are named  play  and  x-play
0
 

Author Comment

by:bross073097
ID: 1635388
Any other Idea to make this work?.

Thanks
Bob Ross

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question