Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 345
  • Last Modified:

You have mail Wav.

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
bross073097
Asked:
bross073097
  • 6
  • 4
1 Solution
 
ahoffmannCommented:
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
 
bross073097Author Commented:
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
 
ahoffmannCommented:
login shell is specified in /etc/passwd
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
bross073097Author Commented:
It's not mentioned there, it is in mgetty.config, it shows bin/login

Thanks
Bob Ross

0
 
bross073097Author Commented:
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
 
bross073097Author Commented:
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
 
ahoffmannCommented:
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
 
bross073097Author Commented:
The mime.types show

audio/x-wav            wav

That's it.

Bob

0
 
ahoffmannCommented:
mime.types was useless, sorry.

On my system the programs are named  play  and  x-play
0
 
bross073097Author Commented:
Any other Idea to make this work?.

Thanks
Bob Ross

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now